setAutoScale ( true ) // Center the page contents on the page Double ( 0, 0, width, height ) ) // Scale the page contents to fit the new page size ResizePageOptions options = new ResizePageOptions ( ) // Get the page size A3 (297mm x 420mm) in points double width = 297 / 25.4 * 72.0 double height = 420 / 25.4 * 72.0 // Set the new Media Box getPage ( 0 ) // Create ResizePageOptions object PDFDocument pdfDoc = new PDFDocument ( "C:/qoppa/test/in.pdf", null ) // Get the first page of the PDF The page content is re-scaled and centered to fit the new format. Media Box and Crop Box will be resized to A3. Here is a Java sample program that will open a PDF and resize its pages to A3 format. ![]()
0 Comments
Leave a Reply. |