Page 1 of 1

Flattening with PDFXEditCore.x86.dll

Posted: Wed Jun 12, 2019 1:31 pm
by sbensen

We have a license for PDFXEditCore.x86.dll.

Would like to know whether this dll will support the flattening operation. If so, can you please send the usage of it. A sample code will help.


Re: Flattening with PDFXEditCore.x86.dll

Posted: Wed Jun 12, 2019 8:43 pm
by sbensen
Is there any way we can programmatically achieve the UI functionality of Comments->flattening, with any API calls?

We have license for the PDFXEdit version of the dll. It is highly appreciated if you can tell a way to do this using the PDF Xchange editor API’s. The below code is written in

Dim filename As String = "C:\pdf-to-flatten.pdf"
Dim filename2 As String = "C:\flattened.pdf"

Dim m_CurDoc As PDFXCoreAPI.IPXC_Document
Dim pdfInst As PDFXCoreAPI.PXC_Inst
Dim acroForm As PDFXCoreAPI.IPXC_AcroForm

pdfInst = New PDFXCoreAPI.PXC_Inst()

m_CurDoc = pdfInst.OpenDocumentFromFile(filename, Nothing)
acroForm = m_CurDoc.AcroForm()

acroForm.FlattenAllFields() 'this line should flatten the PDF but the saved PDF(flattened.pdf) is not flatten. How can we achieve this?

Re: Flattening with PDFXEditCore.x86.dll

Posted: Thu Jun 13, 2019 6:34 am
by Sasha - Tracker Dev Team
Hello sbensen,

Try using the Editor SDK's ... ts_flatten operation. There is a code sample on how to use that.