Thanks all. I missed that point. Stupid me! -----Message d'origine----- De : John Hewson [mailto:[email protected]] Envoyé : vendredi 27 mars 2015 16:35 À : [email protected] Objet : Re: How can i get the image document size?
Divide the px values by the dpi which you rendered the page at (the default is 72). inches = px / dpi Alternatively call PDPage.findCropBox() and divide the result by 72. -- John > On 27 Mar 2015, at 00:30, BUSSINGER Fabien <[email protected]> > wrote: > > Hi, > > I’m unable to find the way to capture the size of an image in a PDF with > v1.8.8 of PDFBox. > I know how to get the real size like 3000px*2000px but I would like to know > the way to capture the document relative size. Like 3in*2in for example. > I tried with extending the PDFStreamEngine classe but the value returned > didn’t seem to be good. > > Thanks for the responses > > > Fabien BUSSINGER > Projets « Elections » > BU DIGITAL PLATFORM > DOCAPOST Grands-Comptes /ETI > > > > Les Vaisseaux – Bât C – Rue du Vallon – BP 49 – 06901 Sophia-Antipolis > Cedex Tél. : +33 (0)4 93 95 76 42 – [email protected] > www.docapost.com > > > > DOCAPOST est une filiale du Groupe La Poste Adoptez l'éco-attitude : > n'imprimez que si cela vous semble vraiment nécessaire. >

