Flatten a PDF?

Hey Everyone!

I am hoping someone can help me out - I am currently pulling a pdf from an API call and attaching the pdf to an email.

My problem is that the PDF enclosed as an attachment in the email is fully editable - I want to have it completely flattened.

I have tried using pdf.co and the “FlattenDocument” profile but I get an error regarding profiles… Not sure if I am inputting the profile incorrectly or potentially that “FlattenDocument” profile is specific to a pdf.co operation.

Any help would be greatly appreciated!

-Sam

Hey @Darcy (Sam) - could you provide either a screenshot of your flow, or even better export the blueprint of the flow for me to take a look at to get a better idea where things are going wrong?

I think it’ll be a pretty simple fix but I just don’t have enough information to go off of right now.

2 Likes

Sure here is a screenshot of the current setup:


The second one shows my pdf.co setup for compressing the document.

It throws an error with this profile setup to flatten the document but that is due to it not being a " PDF Form Filler" request (I have now learned this from experimenting).

So at the end of the day, I just want the downloaded pdf to be sent to email without it being editable.

Appreicate the help!

If pdf.co doesn’t work for you, since it requires the PDF to be generated by “Form Filler” first,

Try ConvertAPI has a Flatten PDF and a Protect PDF endpoints, those two linked pages have examples (expand the advanced fields) so you can test them out before building a scenario.

2 Likes

Hello Darcy,

We apologize for any inconvenience you may have experienced while attempting to flatten your document. The profiles you have been using are specifically designed for flattening form fields using the PDF Form Filler. We recommend following these steps to achieve the desired result:

  1. Once you have compressed your PDF file, add another PDF.co module.
  2. Utilize the Make PDF.co API Call feature and use the API endpoint /v1/pdf/makeunsearchable. This API tool will convert your editable document into a scanned PDF, effectively flattening the entire document.

Here’s a sample screenshot for your reference:

If you have any questions or require assistance during the process, please don’t hesitate to let us know. We are here to help!

3 Likes

@PDF.co or you can simply create a module for that – it shouldn’t be too much effort since you’ve already got the base integration set up and a similar module you can copy from.

3 Likes

Thanks for the info!

2 Likes

Hello Darcy,

You’re welcome! If you come across any issues or have any questions related to PDF.co, please feel free to reach out to us directly via email at support@bytescout.com. Our dedicated support team is available to assist you and offer solutions to any problems you may encounter.

Best regards,

Customer Support @ PDF.co