Flatten Comments Box

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

jps8834
User
Posts: 15
Joined: Tue Jan 27, 2009 2:38 pm

Flatten Comments Box

Post by jps8834 »

Hello,

I was looking at your program and notice that you have the "Flatten Comments" box, which I had never noticed before. Is there a way to use the functionality of flattening everything without bringing up the box? (Sometimes we need to flatten everything before the user can send out their PDFs, and we want to do this automatically).

If there is a way to do this without using the javascript, that would be preferable.
User avatar
Chris - PDF-XChange
Site Admin
Posts: 798
Joined: Tue Apr 14, 2009 11:33 pm

Re: Flatten Comments Box

Post by Chris - PDF-XChange »

Looking into this for you will post when I find out.

Cheers,
Chris
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.


Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
User avatar
Chris - PDF-XChange
Site Admin
Posts: 798
Joined: Tue Apr 14, 2009 11:33 pm

Re: Flatten Comments Box

Post by Chris - PDF-XChange »

No the only way to do that right now is via the dialog or using Javascript

With the javascript you'll need to call
this.flattePages function - its description is:

flattenPages

Converts all annotations in a page range to page contents. If a page range is not specified, all annotations in the document are converted.
Note:Great care must be used when using this method. All annotations—including form fields, comments, and links—on the specified range of pages are flattened. They may have appearances, but they will no longer be annotations.
Parameters

nStart
(optional) A 0-based index that defines the start of an inclusive range of pages in the current document. If only nStart is specified, the page range is the single page specified by nStart.

nEnd
(optional) A 0-based index that defines the end of an inclusive range of pages in the current document.

nNonPrint
(optional) This parameter determines how to handle non-printing annotations. Values are
0 — (default) Non-printing annotations are flattened.
1 — Non-printing annotations are left as is.
2 — Non-printing annotations are removed from the document.

Example
Flatten all pages in the document.
this.flattenPages();

Hope that helps,

Chris
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.


Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com