Skip to main content
harmoniium
Known Participant
Nov 5, 2019 3:52 PM UTC
Answered

Flatten a Form from VB.NET

We have a program that merges multiple PDFs into one and then there is an option to create an electronic signature to a separate PDF that is post fixed to the merged files.  We found a problem doing this when one of those initially merged files is a submittal form.  I'd like to flatten those files programmatically before being merged.  Is there a way to do this in DC from VB.NET?

 

Thank you

This topic is closed to new replies. Start a new post to keep the conversation going.
Thom Parker
Thom ParkerCorrect answer
Community Expert
Nov 5, 2019 6:54 PM UTC

Yes, have you looked at the IAC reference?  You can call JavaScript functions from the IAC, so you can call the doc.flattenPages() function.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often

2 replies

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
Nov 5, 2019 6:54 PM UTC

Yes, have you looked at the IAC reference?  You can call JavaScript functions from the IAC, so you can call the doc.flattenPages() function.

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
harmoniium
Known Participant
Nov 6, 2019 6:28 PM UTC

Thank you!  I just used GetJSObject() to reference the flattenPages() function and it works.  

Translate