mergePDF node is not working


#1

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!


#2

Hi @d.jansenMM3LJ

What does the error says?


#3

“The document has no pages”


#4

@d.jansenMM3LJ Could you show us file types.


#5

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


#6

Hi,

What is the preview of the Print PDF node ? Are the pdf created ?
Can you test the behaviour of the node mergepdf (ttps://forum.dynamobim.com/t/dynamo-exporting-pdf-by-adobe-pdf/18706/22) ?

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


#7

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


#8

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


#9

This is the entire script.


#10

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 :


#11

Goodmorning,

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?


#12

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?


#13

Hi,

Your FilePath is still not correct.

It is necessary to indicate the extension (.pdf)

S:\10_projekten\Eindhoven\test.pdf


#14

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?


#15

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.


#16

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.


#17

Yes that exactly the error.

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


#18

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”


#19

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 !


#20

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.