![]() ![]() If i convert the 17cm and 29,70cm to pixels, and set it in the img. img.scaleToFit(2090, 1208) // i tried a lot of modifications, i can set i to 500x500 or something like this in have all showed in the pdf, but how can i calculate marginsÄoc.add(new Paragraph("TEST: text under the b4 image") Image img = Image.getInstance(arraypath) // the array store the path to the image Os = new FileOutputStream(arquivonomecompleto) If i do this: doc = new Document(PageSize.A4, 0, 0, 0, 0) but im unable to scale it with margins, and not even without margins, i need to insert the B4 image into the PDF A4 size, using LEFT margin of 2,5cm and the RIGH margin 2cm, but how can i make it fit calculating the sizes, since a paper Ax3508, the B4 image has 2048x2929, if i insert, it cut? the b4 is bigger :| how? considering size of A4, and the b4 should fit perfectly inside the A4 If you export your page to an image format like JPEG or PNG, set the resolution to 300, and open the image in Photoshop, it have the 24803508 pixel dimension. InDesign pages have no resolutionthey are not image objects. Im creating a PDF as A4 size (2480px x 3508px) using itext. The 24803508 pixel size you are looking for translates into A4 dimensions at 300ppi. Its scanned have the size in pixels -> 2048 x 2929
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |