You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2021/11/26 07:07:00 UTC

[jira] [Commented] (PDFBOX-5332) media box size changes after addPage

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

Tilman Hausherr commented on PDFBOX-5332:
-----------------------------------------

What is "newPdf" ? Also the first line has a wrong syntax, so your actual code is different.

> media box size changes after addPage
> ------------------------------------
>
>                 Key: PDFBOX-5332
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5332
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Sally Oh
>            Priority: Major
>             Fix For: 2.0.25
>
>         Attachments: 실패하지 않는 책 스터디.pdf
>
>
> After addPage to a new PDDocument, it seems like that added page size is changed to 'Letter size'
> {code:java}
> val page = PDDocument.load(File(path).pages.get(0)
> println(page.mediaBox.height) // prints 540.0
> newPdf.addPage(page)
> println(newPdf.getPage(0).mediaBox.height) // prints 792.0{code}
> Every other pdf files I have doesn't have this issue but only this file.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org