Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Flattening a PDF Form


Level 6
Is there a service I can use that will convert a PDF Form to a non-form PDF similar to what you would get doing a print to PDF in Acrobat?
4 Replies


Level 4
S. Bishop,<br /><br />The title of this thread requests how to Flatten a PDF but after reading your post I'm unclear if that is what you are specifically trying to do =). One way you can flatten a PDF form is to stick it in an xfaForm variable and run it through Output's generatePDFOutput service.<br /><br />This service accepts many parameters as input but most are optional. The ones to concern yourself with at first would be:<br /><br />1) Transformation Format: The format which you would like to flatten your PDF to. You may choose either PDF (as in going from dynamic to static) or PDF/A (commmon archival standard PDF)<br /><br />2) Form: This is a string that represents the URL path to your form's template. If you are using an xfaForm variable, then you can just pass the variable's templateURL property in here.<br /><br />3) Content Root: The Content Root URL associated with the repository in which 2) above resides. The value of 2) above is actually appended to the end of this. The value to pass in for this is most often "repository://" (no quotes).<br /><br />4) Input Data: This is where you would specify any data you'd like populate the flattened PDF with. If you are using an xfaForm variable, you should pass in "process_data/<your xfa variable>/object/data/xdp/datasets/data/*" (no quotes).<br /><br />The service returns:<br /><br />1) PDF Output: The flattened PDF as a Document variable.<br /><br />Shoot me an email should you run into any snags as I'd be happy to help.<br /><br />Josh Boyle<br /><br />Cardinal Solutions Group


Level 6
This is for the archived version of the form. My primary goal is to shrink the size of the files. I already lock down the fields through script. I had already found and tried the one Jasmin suggested. That did shrink the size significantly although my attachments were gone. I can try your suggestion as well. I think I will still end up with one thing my customers won't like. I add the attachments with script. There is a button to view them. That button won't work. I'll have to ask my customer if the savings in database space is worth the users having to follow a different set of steps to see attachments.


Level 9
You can combine the attachments with the flattened PDF into a PDF package (v8) or portfolio (v9) using the Assembler service.

You should also set the buttons in your form to be invisible when printed - that way, users won't be tempted to try to click on what is really a picture of a button, rather than a button.