# Making PDF with multiple views

**URL:** <https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853>\
**Category:** Revit\
**Created:** [January 22, 2020, 3:29pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853 "2020-01-22T15:29:57Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 24, 2020, 1:39pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/21 "2020-01-24T13:39:29Z")

</div>

The _Genius Loci_ package should work from Revit 2017 to Revit 2020 and is compatible with Dynamo 1.3.

---

<div class="post-metadata">

**Author:** ![dylanUZJPA](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dylanUZJPA](https://forum.dynamobim.com/u/dylanUZJPA)\
**Post date:** [January 24, 2020, 1:40pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/22 "2020-01-24T13:40:28Z")

</div>

Hmm still getting errors even though I manually add them with a zip file

---

<div class="post-metadata">

**Author:** ![dylanUZJPA](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dylanUZJPA](https://forum.dynamobim.com/u/dylanUZJPA)\
**Post date:** [January 24, 2020, 1:48pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/23 "2020-01-24T13:48:44Z")

</div>

@bvs1982 and @Alban_de_Chasteigner, Thanks a lot guys I got it to work installed a little bit older version of loci and got it to work cheers guys!

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [January 24, 2020, 1:49pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/24 "2020-01-24T13:49:10Z")

</div>

@dylanUZJPA

Best is so remove ALL packages and reinstall the ones you need manually.  
Your packages don’t even have to be in the Roaming folder. They can be in any folder.  
Also best is not to have the same package(s) in multiple files and locations.

![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/b/3b696c2b5791f1ced2e49cd4e93f135f69a673c0.png)

@Alban_de_Chasteigner

Maybe bit off-topic, but do you also have a way to remove the single PDFs after the merge.  
The **OOTB node** File System \> **DeleteFile** only work for a single File.  
I need a way to remove File **S** (so i don’t have too look them up and remove them manually).

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 24, 2020, 1:56pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/25 "2020-01-24T13:56:43Z")

</div>

> [@bvs1982](#):
>
> The **OOTB node** File System \> **DeleteFile** only work for a single File.

Pretty sure I’ve used this for more than one file at a time. Post your current graph and a testable Revit file (asking for both as noted above, Revit and Dynamo version play a key part in the complexities here), and I’ll try and find time to review later.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [January 24, 2020, 2:12pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/26 "2020-01-24T14:12:08Z")

</div>

@jacob.small

When i use @Alban_de_Chasteigner solution to created a merged PDF and i want to delete  
the unnecessary files afterwards - using the FileSystem.DeleteFile node - two of the PDFs are in the merged file (and are deleted) and the last PDF isn’t in the merged PDF and isn’t deleted either.  
The other files are Deleted even tho the Node gives **null** s. 🤯

 ![Capture.PNG](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/7/8738a486f4e524ce2e90ca0abb4d9aed7527b9c5.jpeg)  
[BatchPrint.dyn](https://forum.dynamobim.com/uploads/short-url/fCllREwvU2ZqZQQPuuo3NtJ4yCb.dyn) (31.1 KB)  
[BatchPrintWithDelete.dyn](https://forum.dynamobim.com/uploads/short-url/1lA8sjcnW0PEAxsZLeycyFCs7pl.dyn) (34.4 KB)  
[Project1.rvt](https://forum.dynamobim.com/uploads/short-url/hwg83wtZUZIsVljFcx8QomExubd.rvt) (1.5 MB)  
**Revit**  
19.2.10.7  
20190225\_1515(x64)  
2019.2.1  
**Dynamo**  
Core 2.02.6826  
Revit 2.02.6833

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 24, 2020, 2:17pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/27 "2020-01-24T14:17:30Z")

</div>

I checked the FileSystem.DeleteFile node and it works normally.

 ![Delete files dynamo 1.3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/a/fa25107ffd1af69b990ba398438bdd7919dd529e.png)  
One “null” for each deleted file.

There are sometimes problems with the speed of execution of actions between the different nodes. Passthrough does not always manage to force the execution order.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [January 24, 2020, 2:21pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/28 "2020-01-24T14:21:48Z")

</div>

> [@Alban\_de\_Chasteigner](#):
>
> There are sometimes problems with the speed of execution of actions between the different nodes. Passthrough does not always manage to force the execution order.

Is there a way to solve that?

At this moment, when i run my Graph, two of the files are merged and deleted and the third one isn’t…

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 24, 2020, 2:28pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/29 "2020-01-24T14:28:50Z")

</div>

By the looks of this the file may still be in use from an application (Revit or the pdf combining action), though its admittedly hard to tell.

Try restarting Revit, freeze the delete node, run the graph, unfreeze the node, run the graph again. As long as no inputs change then the other nodes shouldn’t execute, and whatever ‘held’ the last PDF may have let it go.

If that pans out then it might be possible to write a delayed combinator via python, but this is something I haven’t experimented with yet.

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 24, 2020, 2:40pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/30 "2020-01-24T14:40:20Z")

</div>

You could wait a few seconds for the PDF merge to complete before deleting the old pdf files :

> [@Wait for specific amount of time](https://forum.dynamobim.com/t/wait-for-specific-amount-of-time/25761/2):
>
> You could use time.sleep:

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [January 24, 2020, 2:40pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/31 "2020-01-24T14:40:36Z")

</div>

@jacob.small

Tested a few things.  
Or all files are deleted or just the two, but ALLWAYS just the two files are in the merged PDF (instead of three).

---

<div class="post-metadata">

**Author:** ![dylanUZJPA](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@dylanUZJPA](https://forum.dynamobim.com/u/dylanUZJPA)\
**Post date:** [January 24, 2020, 2:41pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/32 "2020-01-24T14:41:28Z")

</div>

Got almost everything to work except for this. It writes the files but makes the host PDF corrupt in some way or form any idea whats happening?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/b/0b42c8c8e5ddbf5ba5ee95edfe294eafcfdea2cf.png)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 24, 2020, 3:04pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/33 "2020-01-24T15:04:15Z")

</div>

It’s probably the same problem with the order of the operations and the speed of the virtual PDF Printer than @bvs1982 :  
Try that instead. It will wait 10s before merging the pdf together :

 ![Batch Print PDF Merge](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/f/df16ed27cd3e0f4a9fbc7ac0400aa47de92ffd7a.png)

[Batch Print PDF Merge.dyn](https://forum.dynamobim.com/uploads/short-url/jTtxFThcUmbofJ5WunRJBobq1Jy.dyn) (33.7 KB)

If necessary, the 10 seconds can be increased.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [January 24, 2020, 3:08pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/34 "2020-01-24T15:08:20Z")

</div>

Did i wire it correctly like this (for ‘my’ problem)?  
I get the expected result this time (3 files in the merged PDF and all of the deleted),  
but i wanna make sure it is not ‘by accident’.

 ![Annotation 2020-01-24 160356](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/f/0f782a8d5025246e25f3f4bb2b53ebdccc25b02a.png)

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 24, 2020, 3:10pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/35 "2020-01-24T15:10:46Z")

</div>

It seems correct to me.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [January 24, 2020, 3:14pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/36 "2020-01-24T15:14:18Z")

</div>

Thanks for your confirmation and ALL your help and time today. Much appreciated! 🙏

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [January 24, 2020, 3:23pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/37 "2020-01-24T15:23:05Z")

</div>

@Alban_de_Chasteigner

I cheered to early…

Tried it a second time (wired like this)… Back to only two pages in the merged PDF.

I see the PDFs appear in the folder and get deleted after the ~10s.

I will look into it further next week (with a clear head)… Now it is time for weekend

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 24, 2020, 3:26pm UTC](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853/38 "2020-01-24T15:26:33Z")

</div>

Try to increase the waiting time if there are a lot of pdf to print with large color applats.  
Or create seperate dynamo graphs :

- One to print.
- One to merge and delete single pdfs files.

[Previous page](https://forum.dynamobim.com/t/making-pdf-with-multiple-views/45853.md?page=1)
