PDF.co Two Operations merged to one?

Hello,

I’m trying to merge two operations into one pdf with PDF.co. What am I missing here? It only generates a pdf with the last operation as I assume the first gets overwritten.

Welcome to the Make community!

Your “merge a pdf” module outputs two bundles, I assume that’s the issue.

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.
Screenshot_2023-10-06_141025

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

1 Like

Your merge PDF is generating 2 operations and as a result the second call to optimize is doing 2 operations as well one for each output bundle I assume from the previous merge PDF module.

You can aggregate the array using an array aggregator to combine 2 or more bundles from the module whose data you are collecting to merge into the PDF. That will ensure merge PDF generates just one file and as a result the next module will generate one file for the compress and optimize as well.

2 Likes

Hello Alex,

Thank you for your reply. I have an aggregator in place and all the correct data shows in the module including the output but for some reason only the first array output is sent through to pdf.co. Very frustrating

Trying to upload txt file but it will not allow me.

How did you modify your pdf.co settings after the aggregator? You’re going to need to use array functions to retrieve the items of the array to access them from the output bundle of the aggregator.

2 Likes

I’m not sure that pdf.co has that feature…

They are array functions built into Make…

2 Likes

Thank you. I’m not sure how that would be inputted as far as the set variable. Never used one before… Just learning Make

Yeah that makes sense. It’s a bit of an uphill learning curve. You can use the get() function inside the PDF.co module to retrieve various parts of the array you have aggregated. Check the make help or Make Academy to learn more abou thow to use these.

2 Likes

Hello Jay,

You can try using the text aggregator tool to combine the URLs into one URL. Then, use this combined URL with PDF.co to convert them into a single PDF file.

If the problem continues, you can add the iterator tool first. This tool will go through all the files and pass them to the text aggregator.

I hope this information is helpful. Thank you!

2 Likes