Flattening PDF documents.

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Flattening PDF documents.

Post by IntegraHarlan »

HI,
Other PDF API's that I have worked with have flatten features to flatten the document, annotations, and form fields.
I do not see any flatten methods in the VintaSoft API. Is there a way to perform the flatten functionality in VintaSoft?

Thanks
Harlan
Alex
Site Admin
Posts: 2303
Joined: Thu Jul 10, 2008 2:21 pm

Re: Flattening PDF documents.

Post by Alex »

Hi Harlan,

If you want to flatten PDF document, please use the Vintasoft.Imaging.Pdf.Processing.PdfSimplifyContentCommand class.

Best regards, Alexander
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Re: Flattening PDF documents.

Post by IntegraHarlan »

Thank you for your quick reply.
I have a couple questions about using the PdfSimplifyContentCommand.
1. I see how to apply the command to documents and pages, but is there a way to apply the command to just annotations, or just FormFields?
2 Also, I am unsure what properties to set to flatten the document, pages, annotations, or form fields. Can you provide information on what properties to set to flatten these items?

Thanks
Harlan
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Re: Flattening PDF documents.

Post by IntegraHarlan »

Hi,
I was able to play with flattening and get some things figured out. I still have some questions.
I would like to flatten most of the annotations, but would like to exclude some annotation types. Specifically the Link annotations. I would like the Link annotations to not be flattened if possible.
Also, When I flatten a document, some items in the page BasicOpject are removed on flatten. Is there a way I can retain all of the items in the page BasicObject property when I flatten a document?

Thanks
Alex
Site Admin
Posts: 2303
Joined: Thu Jul 10, 2008 2:21 pm

Re: Flattening PDF documents.

Post by Alex »

Hi Harlan,

Sorry for delay.


I would like to flatten most of the annotations, but would like to exclude some annotation types. Specifically the Link annotations. I would like the Link annotations to not be flattened if possible.
If you want to flatten annotation only, you do not need to use the Vintasoft.Imaging.Pdf.Processing.PdfSimplifyContentCommand class.

For flatten annotations on PDF page you need to do the following steps:
Also, When I flatten a document, some items in the page BasicObject are removed on flatten. Is there a way I can retain all of the items in the page BasicObject property when I flatten a document?
I am not sure I have understood this problem. Please send me more info.

Best regards, Alexander
Alex
Site Admin
Posts: 2303
Joined: Thu Jul 10, 2008 2:21 pm

Re: Flattening PDF documents.

Post by Alex »

Please see how to flatten annotations in PDF document here: https://www.vintasoft.com/forums/viewto ... 9952#p9952

Please see how to flatten form fields in PDF document here: https://www.vintasoft.com/forums/viewto ... =23&t=5861

Best regards, Alexander
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Re: Flattening PDF documents.

Post by IntegraHarlan »

Thank you for your reply.
I will try your suggestion for flatting annotations.
I suspect that this method will fix the issue with the page BasicObject items being removed. I will let you know if I still have problems with that.

Thanks again.
Post Reply