mergePDF node is not working

Hi all,

I have this print pdf script which i’m trying to automate with the MergePDF node from GeniusLoci.
However, even it is given pages, it is not creating the booklet. Am I missing something. It also doesn’t work when I restart Dynamo.

Any suggestions are welcome!

Hi @d.jansenMM3LJ

What does the error says?

“The document has no pages”

@d.jansenMM3LJ Could you show us file types.

I restarted Revit as a whole and still get the same error.


What is the preview of the Print PDF node ? Are the pdf created ?
Can you test the behaviour of the node mergepdf (ttps:// ?

Be sure you don’t have restrictions on the dll.

I’m not in front on a computer right now but I will able to help you more later

When I test it like this it works. I forgot the .pdf but added that later and it was fine.

The PDF’s are created by the PDF print node btw. No problems there.

This is the entire script.

Hi @d.jansenMM3LJ,

I tested your graph and it’s almost correct.
You need to write a real path in the FilePath.
In your case it’s C:\Users\RUA\Desktop\Prints\2018_testboekje.pdf

Your graph works :


When I type the complete path like you suggest, it dismisses the C:\Users\RUA\Desktop and it only picks the Prints\2018_testboekje.pdf and then it still doesn’t work. Is there another way to input the complete file path?

So I tried plotting the files to a different map with a real file path, but it still doesn’t work.
Do the File paths that go into the PDF plot node have to be same as the TargetPdf?


Your FilePath is still not correct.

It is necessary to indicate the extension (.pdf)


I tried that but with same outcome.

I copied the whole thing to a new script so the file path does take the complete path but again same thing.

I did notice however that in the file ( Prints folders ) the booklet is produced before the last single document appears. Could that have anything to do with it?

The merge pdf node does btw produce a file, but it is only 1 Kb big and gives the message that it is damaged when I try to open it.

Actually there is a problem with the order of operations.
The node passthrough always works for me.

Does the error says “The document has no pages” ?

Maybe try with fresh folder where there are no pdf files and no overwrite to do.

Yes that exactly the error.

I always plot in a completely empty folder so I don’t understand what else could be wrong…

Your graph runs well on my computer but the Passthrough node doesn’t seem to work for you.

You can freeze the node MergePDF for the first run. The pdfs will be created with the Print PDF node.
Once the PDF are created, unfreeze MergePDF node and hit Run a second time.

Or you can replace Passthrough node by the codeblock : {passthrough,waitfor}[0];
or by the bakery node “Wait Then Passthrough”

I tried to do this, but same result.

So what I’m going to do is create a second script with the merge node in it, because it worked fine then. The reason I wanted it in this script is because of a project that has weird numbers so the sheets don’t follow the right order in the end folder. So we’re going to change the numbering of the project and keep this little issue in mind.

Thanks anyway for thinking along @Alban_de_Chasteigner !

You’re welcome.
It’s odd that no workaround works.

If you split your graph in two separate graphs, you can keep the collect of sheets and obtains the names of pdfs with FilenameToFilePath and connect to MergePDF.
By this way, you will keep your order in the graph with MergePDF.