pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A...@swmc.com
Subject Re: Edit existing PDF
Date Wed, 10 Nov 2010 17:11:58 GMT
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.


"T. Groch" <t.groch@gmail.com>
11/10/2010 04:47
Edit existing PDF


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

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

Best regards,


- 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.  
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message