[ 
https://issues.apache.org/jira/browse/PDFBOX-1255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-1255:
------------------------------------
    Description: 
As part of some ground-testing work I've been doing for pdf embedding 
enhancements in Apache FOP, I've modified PDFBox's Overlay.java to support 
translation, rotation and scaling of the PDF being overlaid.

This may be a useful feature for PDFBox, so I thought I'd send it in.

Right now it uses the target PDF document's co-ordinate units for translations, 
so it's hard for users to know what translation to specify without trial and 
error. I'm not sure what the best way to remedy this is to make for a better 
user interface, but I suspect that adding the ability to set an origin (TL, BL, 
TR, BR, or center) that'd help. That way it's easier for them to say "position 
the overlay on the top left" for example. The actual translation amount could 
be given as a percentage of the target document size in that axis, maybe, or 
accept different unit suffixes like "%" or "cm". I'm not sure what the best 
approach is, and I won't need to explore it for my current project, but it 
should be easy enough to add.

diffstat:

Overlay.java |  168 +++++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 123 insertions(+), 45 deletions(-)

Next patch in series: PDFBOX-1256

  was:
As part of some ground-testing work I've been doing for pdf embedding 
enhancements in Apache FOP, I've modified PDFBox's Overlay.java to support 
translation, rotation and scaling of the PDF being overlaid.

This may be a useful feature for PDFBox, so I thought I'd send it in.

Right now it uses the target PDF document's co-ordinate units for translations, 
so it's hard for users to know what translation to specify without trial and 
error. I'm not sure what the best way to remedy this is to make for a better 
user interface, but I suspect that adding the ability to set an origin (TL, BL, 
TR, BR, or center) that'd help. That way it's easier for them to say "position 
the overlay on the top left" for example. The actual translation amount could 
be given as a percentage of the target document size in that axis, maybe, or 
accept different unit suffixes like "%" or "cm". I'm not sure what the best 
approach is, and I won't need to explore it for my current project, but it 
should be easy enough to add.

diffstat:

Overlay.java |  168 +++++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 123 insertions(+), 45 deletions(-)

Next patch in series: https://issues.apache.org/jira/browse/PDFBOX-1256


> [PATCH] Support translate/scale/rotate of overlay in Overlay.java
> -----------------------------------------------------------------
>
>                 Key: PDFBOX-1255
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1255
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.7.0
>         Environment: N/A
>            Reporter: Craig Ringer
>            Priority: Minor
>         Attachments: Overlay-transform.patch
>
>
> As part of some ground-testing work I've been doing for pdf embedding 
> enhancements in Apache FOP, I've modified PDFBox's Overlay.java to support 
> translation, rotation and scaling of the PDF being overlaid.
> This may be a useful feature for PDFBox, so I thought I'd send it in.
> Right now it uses the target PDF document's co-ordinate units for 
> translations, so it's hard for users to know what translation to specify 
> without trial and error. I'm not sure what the best way to remedy this is to 
> make for a better user interface, but I suspect that adding the ability to 
> set an origin (TL, BL, TR, BR, or center) that'd help. That way it's easier 
> for them to say "position the overlay on the top left" for example. The 
> actual translation amount could be given as a percentage of the target 
> document size in that axis, maybe, or accept different unit suffixes like "%" 
> or "cm". I'm not sure what the best approach is, and I won't need to explore 
> it for my current project, but it should be easy enough to add.
> diffstat:
> Overlay.java |  168 
> +++++++++++++++++++++++++++++++++++++++++++----------------
>  1 file changed, 123 insertions(+), 45 deletions(-)
> Next patch in series: PDFBOX-1256



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to