Skip to main content

Hi!

 

I've tried looking for a solution for this but can't really get it to work.

I have a folder with several PDF files that I just want to merge into one. Ideally I'm looking to specify that folder and then let FME do the job and spit out a Merged.pdf.

Is there a simple way to do this? Tried a solution, but several attributes from the original PDF were lost in the translation. I want this to work with multipage input PDFs.

I someone has a good solution to this and can give an example .fmw it would be appreciated!

 

Thanks 🙂

Hi @virre,

Have you already checked out this answer from Holly on a similar question about merging PDFs, or this thread where lau has shared a test workspace? I think these might be helpful places to start for writing to a single pdf.

For the missing attributes in your workspace, can you tell us a bit more about what seems to be missing? Are they related to form fields or annotations by any chance? If you're able to share any screenshots or sample data about the missing attributes, that might encourage some more suggestionsfrom our Community. Thanks!


Hi!

Thank you for your answer.

Just tried the test workspace from lau and still get the errors. It seems like the reader grabs all attributes from the PDF and then prints it out again, where the data is distorted (fonts, positions, images lost, etc). Is it possible to make the reader take the PDF like a "picture" in order to not mess the data up.

See attached snippets where you can clearly see some things missing or distorted. Some data is masked.

 

ORIGNAL

AFTER FME


Hi!

Thank you for your answer.

Just tried the test workspace from lau and still get the errors. It seems like the reader grabs all attributes from the PDF and then prints it out again, where the data is distorted (fonts, positions, images lost, etc). Is it possible to make the reader take the PDF like a "picture" in order to not mess the data up.

See attached snippets where you can clearly see some things missing or distorted. Some data is masked.

 

ORIGNAL

AFTER FME

To fix this problem, the first thing I would try is changing the "Spatial Text" mode to "Feature Per Character (Vector)".

This makes it so that your text is drawn onto the PDF instead of written.

 

If that doesn't work, then try setting "Non Spatial > Read Rasterized Pages" to "Yes".

This will create images of each page that you can write instead of all of the individual features.


To fix this problem, the first thing I would try is changing the "Spatial Text" mode to "Feature Per Character (Vector)".

This makes it so that your text is drawn onto the PDF instead of written.

 

If that doesn't work, then try setting "Non Spatial > Read Rasterized Pages" to "Yes".

This will create images of each page that you can write instead of all of the individual features.

Hi Jake,

Thank you for the suggestion. It helped, a bit at least.

This time some issues were solved using the suggested Spatial options, however, some persist. This time I can see that all data came through using an inspector before writing. Some is lost after write. See attached pictures from Inspector and after Write.

No attributes came through using non spatial.

Inspector:

Wrtier:


Hi Jake,

Thank you for the suggestion. It helped, a bit at least.

This time some issues were solved using the suggested Spatial options, however, some persist. This time I can see that all data came through using an inspector before writing. Some is lost after write. See attached pictures from Inspector and after Write.

No attributes came through using non spatial.

Inspector:

Wrtier:

Hi @virre, if you want the non-spatial option to work then you will need to either re-add the Reader or import Reader Feature Types, since the rasterized pages will come out of a different feature type that is not currently on your canvas.

By the way, it seems strange that only a few features in the bottom-right corner are missing. I wonder if they are being clipped somehow, or if the page size settings are a bit strange. It's very hard to tell without seeing an example PDF and a workspace. Maybe you should send it to Safe if you want to keep the PDF confidential.


Reply