Dear Concerned,

what are the steps to edit/modify the same pdf?
for example to rotate the pdf following steps are followed:

PDDocument document = PDDocument.load(new 
File("D:\\work\\samples\\pdf\\111.pdf"));
            PDPage page = document.getDocumentCatalog().getPages().get(0);
             int rotation = 180;
            page.setRotation(rotation);

          /** Set Page rotation test 2**/
          PDPageContentStream cs = new PDPageContentStream(document, page, 
PDPageContentStream.AppendMode.APPEND, true, true);
          Matrix matrix = Matrix.getRotateInstance(Math.toRadians(rotation), 0, 
0);
          cs.transform(matrix);
          cs.close();
            
         document.save(new File("D:\\work\\samples\\pdf\\111_.pdf"));
          document.close();

How we can edit the same pdf?

Thanks in advance

Regards,

Komal Walia


Thanks & Best Regards,

Komal Walia

Senior Lead Design Engineer, Genesis

Newgen Software Technologies Ltd.

D-152, Okhla Phase - 1, New Delhi - 11 00 20

Office :+91-1140773700 | Ext. : 143  | Mob. : +918585969448

NOTE: Please create a helpdesk ticket / drop an email to 
helpd...@newgen.co.in<mailto:helpd...@newgen.co.in> & cc 
ip_qu...@newgen.co.in<mailto:ip_qu...@newgen.co.in> for any issues !! It will 
be handled according to priority!


Disclaimer: This e-mail and any attachment may contain confidential, 
proprietary or legally privileged information. If you are not the original 
intended recipient and have erroneously received this message, you are 
prohibited from using, copying, altering or disclosing the content of this 
message. Please delete it immediately and notify the sender. Newgen Software 
Technologies Ltd (NSTL) accepts no responsibilities for loss or damage arising 
from the use of the information transmitted by this email including damages 
from virus and further acknowledges that no binding nature of the message shall 
be implied or assumed unless the sender does so expressly with due authority of 
NSTL.

Reply via email to