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
Flattening PDF documents.
Moderator: Alex
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Flattening PDF documents.
Hi Harlan,
If you want to flatten PDF document, please use the Vintasoft.Imaging.Pdf.Processing.PdfSimplifyContentCommand class.
Best regards, Alexander
If you want to flatten PDF document, please use the Vintasoft.Imaging.Pdf.Processing.PdfSimplifyContentCommand class.
Best regards, Alexander
-
- Posts: 85
- Joined: Fri Jan 24, 2020 3:37 am
Re: Flattening PDF documents.
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
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
-
- Posts: 85
- Joined: Fri Jan 24, 2020 3:37 am
Re: Flattening PDF documents.
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
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
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Flattening PDF documents.
Hi Harlan,
Sorry for delay.
For flatten annotations on PDF page you need to do the following steps:
Best regards, Alexander
Sorry for delay.
If you want to flatten annotation only, you do not need to use the Vintasoft.Imaging.Pdf.Processing.PdfSimplifyContentCommand class.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.
For flatten annotations on PDF page you need to do the following steps:
- Open graphics object associated with PDF page (Vintasoft.Imaging.Pdf.Tree.PdfPage.GetGraphics method).
- Get all annotations on PDF page (Vintasoft.Imaging.Pdf.Tree.PdfPage.Annotations property).
- If annotation should be flatten
- Draw annotation on PDF page using PdfGraphics.DrawAnnotation method.
- Remove annotation from PDF page
I am not sure I have understood this problem. Please send me more info.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?
Best regards, Alexander
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Flattening PDF documents.
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
Please see how to flatten form fields in PDF document here: https://www.vintasoft.com/forums/viewto ... =23&t=5861
Best regards, Alexander
-
- Posts: 85
- Joined: Fri Jan 24, 2020 3:37 am
Re: Flattening PDF documents.
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.
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.