You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2009/12/01 21:01:20 UTC

[jira] Commented: (PDFBOX-137) Does not detect paper format

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

Andreas Lehmkühler commented on PDFBOX-137:
-------------------------------------------

It seems that we don't need all the rotation stuff. With version 885893 the mediabox is used to define the paperformat and the cropbox to define the imageableare on that paper. This works with several pdfs I've tested (PDFBOX-107, PDFBOX-51, PDFBOX-358 and 2 of the files from our testarena: test-landscape2.pdf and rotation.pdf).

Most of these landscape pdfs have a portrait papersize with rotated content using a transformation matrix. Others are using a landscape papersize with non-rotated content. We don't have to rotate anything in both cases before printing.
I'm experiencing some issues with the printdialog on my linux, but I've successfully tested my changes on MacOS.

@Damien
I didn't use your patch by it was suitable hint where to look for a solution. Please run some tests on your files with my changes. 


> Does not detect paper format
> ----------------------------
>
>                 Key: PDFBOX-137
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-137
>             Project: PDFBox
>          Issue Type: Bug
>         Attachments: acrobat-landscape.pdf, jira_PDFBOX-137_PDDocument.diff, word-landscape.pdf
>
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1435244
> Originally submitted by nobody on 2006-02-20 06:55.
> Pdfbox does not detect the paper format of the PDF. It
> always says "Orientation 1" even after changing it from
> java:
> document.getPageFormat(0).setOrientation(PageFormat.LANDSCAPE);
> and alternates between "Height 595.0, Width 842.0" and
> "Height 842.0, Width 595.0" (which both is A1 if
> interpreted as mm)
> I tried several PDF-Creators (itext, Openoffice), but
> the Pdfbox always wants to print LETTER in PORTRAIT
> orientation. (the pages are A4)
> Settings the orientation in the printer dialog does not
> help. 
> I believe it get's its info from: 
> /Rotate 90/MediaBox[0 0 595 842]
> regards, 
> JPT, j.p.t.@gmx.net
> (pdfbox 0.7.2, itext 1.3.6)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.