[
https://issues.apache.org/jira/browse/PDFBOX-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15874857#comment-15874857
]
Tilman Hausherr commented on PDFBOX-3697:
-----------------------------------------
I like the idea (the solution mentioned in PDFBOX-102 creates images and not
vector graphics, I agree with you re quality of that). People sometimes ask
about this. (I don't remember where, probably on stackoverflow and/or on the
mailing list)
You write:
{code}
Note: At the moment PDFBox only writes 8 bit images. So even if you draw a 16
bit image it will be reduced to 8 bit.
{code}
Is there a need for this / can such images come up in ordinary coding? We
haven't been asked to provide this.
Creating such images is rather unusual:
https://stackoverflow.com/questions/20264768/how-to-set-rgb-pixel-in-a-bufferedimage-to-display-a-16-bit-depth-png
https://github.com/haraldk/TwelveMonkeys/issues/252
> RFC: Integration of Graphics2D->PDFBox bridge
> ---------------------------------------------
>
> Key: PDFBOX-3697
> URL: https://issues.apache.org/jira/browse/PDFBOX-3697
> Project: PDFBox
> Issue Type: Improvement
> Components: Writing
> Reporter: Emmeran Seehuber
> Priority: Minor
>
> I've build a Graphics2D -> PDFBox bridge. It allows you to draw using
> Graphics2D into a PDF. iText has such a feature for a long time now. In
> PDFBOX-102 it seems you don't want such a feature, or at least don't want to
> implement it. I hope I must not explain why drawing to an image and placing
> that image in the PDF is *not* the right solution. Depending on the output
> device this may result in horrible quality.
> As I want to migrate my usages of flying-saucer to openhtmltopdf
> (https://github.com/danfickle/openhtmltopdf) I need a way to embed report
> graphs in high quality into the PDF. Because of this I build this bridge:
> https://github.com/rototor/pdfbox-graphics2d
> The bridge is build from ground up by myself. I did not use any code of the
> iText-Graphics2D bridge.
> Currently it can render text only as vector shapes. But it supports different
> gradient paints and texture paints. openhtmltopdf uses it to draw inline SVGs.
> I would like to contribute this bridge to PDFBox, as I think this is a
> feature PDFBox currently lacks. But I am not sure if you want this at all.
> The bridge uses reflection to access e.g. the Batik gradient paints without
> referencing Batik. The paint mapping is something which can never be really
> finished, as they can be many paint implementations. Because of this the
> bridge allows to customize all different kind of mappings (color/paint/font).
> I don't know if it is better to keep this bridge separate or if it is better
> to integrate it into PDFBox. This is something I would like you to decide. If
> you would like it, I would prepare a patch.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]