Getting the PDPage from a file is easy.  Check this out:

PDDocument source = null;
try {
        source = PDDocument.load("/home/user/adobe1.7spec.pdf");
        List<PDPage> pages = source.getDocumentCatalog().getAllPages();
} finally {
        if(source != null)
                try { source.close(); } catch(Exception sorry) { }
}

I haven't needed to edit anything other than bookmarks in my PDFs, so I 
can't help you on that front, but I'm sure someone else on the list will 
chime in shortly with some helpful pointers.

---- 
Thanks,
Adam





From:
"T. Groch" <[email protected]>
To:
[email protected]
Date:
11/10/2010 04:47
Subject:
Edit existing PDF



Hi,

I just followed the example code to write some text inside a created 
PDPage
via PDPageContentStream.

How can I read in an existing PDF file and edit a page (let's say the 
first
one) in it? I can't get a PDPage from the PDDocument.
Thanks in advance.

Best regards,

obias





- FHA 203b; 203k; HECM; VA; USDA; Conventional 
- Warehouse Lines; FHA-Authorized Originators 
- Lending and Servicing in over 45 States 
www.swmc.com   -  www.simplehecmcalculator.com   
Visit  www.swmc.com/resources   for helpful links on Training, Webinars, Lender 
Alerts and Submitting Conditions  

This email and any content within or attached hereto from Sun West Mortgage 
Company, Inc. is confidential and/or legally privileged. The information is 
intended only for the use of the individual or entity named on this email. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or taking any action in reliance on the 
contents of this email information is strictly prohibited, and that the 
documents should be returned to this office immediately by email. Receipt by 
anyone other than the intended recipient is not a waiver of any privilege. 
Please do not include your social security number, account number, or any other 
personal or financial information in the content of the email. Should you have 
any questions, please call (800) 453 7884.  

Reply via email to