At 04:28 PM 11/18/2004, Nguyen, Daniel wrote:
2- I am using PdfImportedPage as shown in the code extract: copy.getImportedPage () ... copy.addPage (...). Isn't this what you are advising me to do ?
 

        Correct - that should copy the source page as an XObject onto the new page automatically removing the annotations.


3- You are refering to PdfStamper to add extra infos (ie: annotation's normal appearance, ...)
 

        PdfStamper will actually be used to place the text/numbers on the pages.

        For the annotation appearances - I would look at the form flattening functionality and use that, perhaps prior to copying with PdfImportedPage.


Q1: Do you mean I should split the behavior into several steps as follows ?
1- use PdfCopy to only copy pages of interest witout annotations into a temp pdf file #1
2- use PdfStamper to add annotation normal appearance into  into a temp pdf file #2
3- use PdfWriter to create the final pdf including recap of comment for each annotated page into final pdf file
 

        Pretty close...

* Create a new/empty PDF
* Open the document you are summerizing
For each page of the source document
* Create a new page in the new doc
* Flatten the annots on the source page (to get their appearances)
* Use PdfImportedPage to place the source page on the destination page (scaled, of course)
* Use PdfContent to place additional content on the page (numbers)
Then
* Write out the new doc



Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:[EMAIL PROTECTED]>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                             215-938-0880 (fax)

Reply via email to