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

Pei-Tang Huang commented on PDFBOX-2922:
----------------------------------------

I tried `printWithPaper()` too, combination matrix as following:

|| No. || Scaling || PaperSize || PageFormat.orientation || Result (rotation) 
|| Result (not cropped) || Result (scale 1:1) ||
| 1 | SHRINK_TO_FIT | 210x297mm | default | x | *v* | x |
| 2 | SHRINK_TO_FIT | 297x210mm | default | x | x | x |
| 3 | ACTUAL_SIZE | 210x297mm | default | x | x | *v* |
| 4 | ACTUAL_SIZE | 297x210mm | default | x | x  | *v* |
| 5 | ACTUAL_SIZE | 210x297mm | LANDSCAPE | *v* | *v* | *v* |
| 6 | ACTUAL_SIZE | 297x210mm | LANDSCAPE | *v* | x | *v* |

Only the 5th combination is ok on my printer, and the pageFormat received in 
{{PDFPrintable.print}} was:

{code:none}
pageFormat = {PageFormat@2137} 
 mPaper = {Paper@2203} 
  mHeight = 841.8897399902344
  mWidth = 595.2755813598633
  mImageableArea = {Rectangle2D$Double@2204} 
"java.awt.geom.Rectangle2D$Double[x=0.0,y=0.0,w=595.2755813598633,h=841.8897399902344]"
 mOrientation = 0
{code}

Does it mean I can write my own {{PDFPageable}} which will also rotate paper 
size when modifying the orientation?

> Make PDFPrintable and PDFPageable extandable
> --------------------------------------------
>
>                 Key: PDFBOX-2922
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2922
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: Pei-Tang Huang
>            Assignee: John Hewson
>         Attachments: landscape.pdf, rotated_cropping_failed.jpg, success.jpg
>
>
> Would you please remove the {{final}} modifier from {{PDFPrintable}} and 
> {{PDFPageable}} so that one can extending those classes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to