# Export and merging PDFs

**URL:** <https://forum.dynamobim.com/t/export-and-merging-pdfs/82570>\
**Category:** Uncategorized\
**Created:** [October 28, 2022, 4:01pm UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570 "2022-10-28T16:01:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaofmoco](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joaofmoco/32/148856_2.png) [@joaofmoco](https://forum.dynamobim.com/u/joaofmoco)\
**Post date:** [October 28, 2022, 4:01pm UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/1 "2022-10-28T16:01:05Z")

</div>

Hello everyone,

I am developing a dynamo script and it’s pretty much complete. However, the missing step is:

- Exporting a set of selected views automatically (giving names without human inputs and saving) to PDF files.
- Merge the created PDF files into one PDF file, containing all the views.

Here are my questions:  
1 - I have experimented with the GeniusLoci node to Merge PDFs but it says that the document has no pages. How can I fix/circumvent this issue?

2 - Is there a way to use the “Select” print range while naming and saving files automatically?

3 - Is there a way to turn on the printer software so that it’s ready to go when the PDF exporting commences?

Dynamo script bellow:

 ![structureV16_2022-10-28_04-56-36](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/4/a4b144493d98404d0075aa7fb6dc95f47a6a1b96.png)

All files involved in this process:  
[bars.xlsx](https://forum.dynamobim.com/uploads/short-url/rAdKBWmpXvJWul6gLR1qnN0gR1l.xlsx) (23.8 KB)  
[nodes.xlsx](https://forum.dynamobim.com/uploads/short-url/A2EOarCwIEJcTvz7gCneNmaqs7p.xlsx) (16.6 KB)  
[structureV16.dyn](https://forum.dynamobim.com/uploads/short-url/epJu7rbE2aizpX4Tt8yvLNPTRJC.dyn) (853.4 KB)  
[Template.rvt](https://forum.dynamobim.com/uploads/short-url/5GhROV6s6jpHmGG3n7hMCikxzoE.rvt) (3.4 MB)

Any feedback is appreciated. I’m fairly new to Dynamo and this forum has been so valuable in the help and tips received and I can only thank you all for this 🙂

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [October 29, 2022, 12:11am UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/2 "2022-10-29T00:11:50Z")

</div>

What version of Revit are you working in? In 2022 they greatly improved PDF exporting.

> [@Export PDF in Revit 2022 - Quick Example](https://forum.dynamobim.com/t/export-pdf-in-revit-2022-quick-example/62697):
>
> I wanted to share this quick graph that enables you to export PDF’s in Revit 2022. I can’t believe just how easy it is now. #Sean Page, 2021 import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import \* clr.AddReference('System') from System.Collections.Generic import List clr.AddReference('RevitNodes') import Revit clr.ImportExtensions(Revit.Elements) clr.AddReference('RevitServices') import RevitServices from RevitServices.Persistence import DocumentManager doc = DocumentManage…

---

<div class="post-metadata">

**Author:** ![joaofmoco](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joaofmoco/32/148856_2.png) [@joaofmoco](https://forum.dynamobim.com/u/joaofmoco)\
**Post date:** [October 29, 2022, 9:01am UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/3 "2022-10-29T09:01:50Z")

</div>

Hello and thank you for your reply,

I’ve noticed that the 2022 version has a lot of PDF export settings.  
However, I’m currently working with Revit 2020 as it is the version that the company I work with uses.

Kind regards,

---

<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:** [October 29, 2022, 10:00am UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/4 "2022-10-29T10:00:12Z")

</div>

Hi,

Depending on the number of sheets to print and your virtual PDF printer, one _PassThrough_ node may not be sufficient.  
You should add a _Thread.Pause_ node to be sure that all the pdf files have been created before merging.

> [@Merge/Combine PDF Export](https://forum.dynamobim.com/t/merge-combine-pdf-export/70789/2):
>
> Hi @Dynamo_Ann, Depending on the number of sheets to print, one PassThrough node may not be sufficient. You must then add a Thread.Pause to be sure that all the pdf files have been created. That said, I have already added in the ExportPDF node of the Genius Loci package the ability to combine the sheets between them. (input Combine) [PDF\_Export\_1.6 w python filter V2.dyn](https://forum.dynamobim.com/uploads/short-url/9wskdHJKRCapPqtiCsW3gvBJFi7.dyn) (41.0 KB)

---

<div class="post-metadata">

**Author:** ![joaofmoco](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joaofmoco/32/148856_2.png) [@joaofmoco](https://forum.dynamobim.com/u/joaofmoco)\
**Post date:** [October 29, 2022, 11:20am UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/5 "2022-10-29T11:20:31Z")

</div>

Hello and thank you for your reply,

I tried the method you referenced and it didn’t return the expected results. Maybe I did something wrong/differently but I’m not really sure of what I did wrong exactly.  
Currently I don’t have my laptop with me but I’ll get back on this topic on Monday. I just have these questions that I wanted to ask

Kind regards,

---

<div class="post-metadata">

**Author:** ![joaofmoco](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joaofmoco/32/148856_2.png) [@joaofmoco](https://forum.dynamobim.com/u/joaofmoco)\
**Post date:** [November 2, 2022, 9:04am UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/6 "2022-11-02T09:04:57Z")

</div>

Hello again and I’m sorry for the lack of response from my end, I had some personal issues that I needed to deal with.  
I have implemented the pause node with a 15 second gap and the MergePDF node returned this warning:

“Warning: Merge.MergePDFs operation failed.  
Access to the path ‘C:\Program Files\Autodesk\Revit 2020\Success’ is denied.”

How can this be fixed?

Here’s the updated script:

 ![structureV16_2022-11-02_09-01-34](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/e/7ed98c597dc961fe56b76250740238c81a1d458d.png)

.dyn file:  
[structureV16.dyn](https://forum.dynamobim.com/uploads/short-url/bMXpQ7w5OUyuiTOZbHkOdBkJ2Wt.dyn) (856.2 KB)  
Revit Template:  
[Template.rvt](https://forum.dynamobim.com/uploads/short-url/5GhROV6s6jpHmGG3n7hMCikxzoE.rvt) (3.4 MB)  
Excel files:  
[bars.xlsx](https://forum.dynamobim.com/uploads/short-url/rAdKBWmpXvJWul6gLR1qnN0gR1l.xlsx) (23.8 KB)  
[nodes.xlsx](https://forum.dynamobim.com/uploads/short-url/A2EOarCwIEJcTvz7gCneNmaqs7p.xlsx) (16.6 KB)

Kind regards,

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [November 2, 2022, 9:12am UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/7 "2022-11-02T09:12:03Z")

</div>

Hey,

Could you zoom in a little more when creating an export so we can read the node titles and such

---

<div class="post-metadata">

**Author:** ![joaofmoco](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joaofmoco/32/148856_2.png) [@joaofmoco](https://forum.dynamobim.com/u/joaofmoco)\
**Post date:** [November 2, 2022, 9:15am UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/8 "2022-11-02T09:15:22Z")

</div>

Hello and thank you for pointing that out. Already replaced the image

---

<div class="post-metadata">

**Author:** ![joaofmoco](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joaofmoco/32/148856_2.png) [@joaofmoco](https://forum.dynamobim.com/u/joaofmoco)\
**Post date:** [November 2, 2022, 12:45pm UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/9 "2022-11-02T12:45:19Z")

</div>

Hello everyone,

Here’s an update regarding the situation:

- Made use of Alban’s PDF export script and incorporated it into my own.
- Created names automatically for the PDFs that were created.

Right now, the only part that’s currently missing is the PDF Merge procedure.  
Like I mentioned before, the PDF Merge node gives the following warning:

“Warning: Merge.MergePDFs operation failed.  
Access to the path ‘C:\Program Files\Autodesk\Revit 2020\Success’ is denied.”

How can this be fixed?

Kind regards,

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [November 2, 2022, 12:59pm UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/10 "2022-11-02T12:59:46Z")

</div>

Have you tried a different folder?  
Sounds like it doesnt have write permission or something or its in use…

---

<div class="post-metadata">

**Author:** ![joaofmoco](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/joaofmoco/32/148856_2.png) [@joaofmoco](https://forum.dynamobim.com/u/joaofmoco)\
**Post date:** [November 2, 2022, 1:47pm UTC](https://forum.dynamobim.com/t/export-and-merging-pdfs/82570/11 "2022-11-02T13:47:30Z")

</div>

Hello and thank you for your reply,

That was exactly what was missing! It’s working as intended now 🙂
