[
https://issues.apache.org/jira/browse/PDFBOX-2692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14336709#comment-14336709
]
Tilman Hausherr commented on PDFBOX-2692:
-----------------------------------------
>From [~danielwilson] in PDFBOX-2691 (closed as duplicate):
A change from PDFBox 1.8.8 and earlier makes PageDrawer a final class --
prohibiting classes from inheriting it.
This will prevent me from upgrading to version 2.0.0 because I use PDFBox to
render PDF's in .Net. That requires that a few methods be overridden to use
.Net drawing objects and libraries rather than Java objects and libraries. In
order to override those methods, I define a class thus:
{code}
namespace PDFBox_Net
{
public class PageDrawer_Net : org.apache.pdfbox.pdfviewer.PageDrawer
{
/* all kinds of cool C# code
...
*/
}
}
{code}
If PDFBox 2.0 PageDrawer remains final, I will need to choose between staying
on the 1.8.x branch and forking the code.
> Possibility to use our own and/or overwrite PageDrawer class
> ------------------------------------------------------------
>
> Key: PDFBOX-2692
> URL: https://issues.apache.org/jira/browse/PDFBOX-2692
> Project: PDFBox
> Issue Type: Wish
> Components: Rendering
> Affects Versions: 2.0.0
> Environment: JDK 1.8, Windows 7, PDF-Box - current trunk
> Reporter: Manfred Pock
> Labels: features
>
> We use PDFBox to render PDF's. Additionally, we have the posibility to add
> different kinds of annotation (stamp, marks, free text, notes..) like in a
> wysiwyg-editor. To do this, it is necessary that we paint these annotations
> on our own.
> Another reason is not to paint all parts: for example we have a pdf with an
> embedded picture. Behind the picture we have the OCR-text to this picture.
> This text is only needed for searching und should not be painted.
> Thus it would be useful to use our own derived PageDrawer. As I see there are
> some things to change.
> a.) remove the final from PagerDrawer-class.
> b.) make some global-variables (graphics, xform, pageSize...) protected,
> c.) also some methods like setRenderingHints should be protected
> d.) maybe the possibility to say to the PDFRender which PageDrawer should be
> used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]