HI ,
I have to find out the margin size of PDF. can you share me the sample code to open a pdf and find out the left and right margin size of a pdf.
Thanks and Regards,
Saran Raj.
HI ,
I have to find out the margin size of PDF. can you share me the sample code to open a pdf and find out the left and right margin size of a pdf.
Thanks and Regards,
Saran Raj.
HI ,
I have to find out the margin size of Existing PDF. can you share me the sample code to open a pdf and find out the left and right margin size of a pdf.
Thanks and Regards,
Saran Raj.
Hi Saran,
We apologize for your inconvenience.
Hi Saran,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.Pdf
I am afraid the requested feature is currently not supported. A new feature request has been registered in our issue tracking system as PDFNEWJAVA-33206. We will further investigate this requirement in details and will keep you informed regarding any updates.
Sorry for the inconvenience.<?xml:namespace prefix = u1 />
Hi Saran,
Document doc = new Document(path+“temp.pdf”);<o:p></o:p>
System.out.println(doc.getPages().get_Item(1).getPageInfo().getMargin().getLeft());
System.out.println(doc.getPages().get_Item(1).getPageInfo().getMargin().getRight());
//Also, you can get some more page config information:
System.out.println(doc.getPages().get_Item(1).getPageInfo().getWidth());
System.out.println(doc.getPages().get_Item(1).getPageInfo().getHeight());
System.out.println(doc.getPages().get_Item(1).getMediaBox().toString());
System.out.println(doc.getPages().get_Item(1).getCropBox().toString());
doc.close();
Most of the code does not work. I have 2 PDF documents.
One document page size is 11x16 and another document
page size is 10x7. Both width/height and margin info print out the
exact same information.
Hi Saran,