[ 
https://issues.apache.org/jira/browse/PDFBOX-5008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226318#comment-17226318
 ] 

Tilman Hausherr commented on PDFBOX-5008:
-----------------------------------------

{code}
PDRectangle mediaBox = doc.getPage(0).getMediaBox();
System.out.println(doc.getPage(0).getMediaBox() + " " + mediaBox.getHeight() / 
mediaBox.getWidth());
{code}
output:
{noformat}
[0.0,0.0,595.0,842.0] 1.4151261
{noformat}

You won't find it in the COSDictionary because it is higher up (this is 
unusual, but allowed).


> Wrong page dimensions
> ---------------------
>
>                 Key: PDFBOX-5008
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5008
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.21
>         Environment: Java 11, Windows 10
>            Reporter: m m
>            Priority: Major
>
> For certain PDF files the dimensions seem incorrect when read, in comparison 
> to what other tools like Adobe Acrobat Reader gives (when inspecting document 
> properties).
> I will attach a PDF file as an example. With Acrobat Reader i get the normal 
> page dimensions (210mm/297mm  = *1.41*), but with PDFBox for each page, with 
> Crop box and Media box i get 612/792 = *1.29*. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to