[
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874401#comment-16874401
]
Tilman Hausherr commented on PDFBOX-4556:
-----------------------------------------
You did manage to add the image to the page content stream so it IS possible to
do the same with the appearance stream.
I extracted your PNG file from the image (attached) and then I did this:
{code}
PDDocument doc = new PDDocument();
BufferedImage bim = ImageIO.read(new File("png.png"));
System.out.println("image: " + bim);
PDXObjectImage img1 = new PDJpeg(doc, bim);
PDXObjectImage img2 = new PDPixelMap(doc, bim);
System.out.println("img1: " + img1);
System.out.println("img2: " + img2);
{code}
It worked fine and here's the output:
{noformat}
image: BufferedImage@46fbb2c1: type = 13 IndexColorModel: #pixelBits = 8
numComponents = 3 color space = java.awt.color.ICC_ColorSpace@1698c449
transparency = 1 transIndex = -1 has alpha = false isAlphaPre = false
ByteInterleavedRaster: width = 296 height = 171 #numDataElements 1 dataOff[0] = 0
img1: org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg@722c41f4
img2: org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap@5b80350b
{noformat}
Lets discuss the BBox AFTER you have managed to do the thing with the image.
> how the visual representation of the signature is achieved
> ------------------------------------------------------------
>
> Key: PDFBOX-4556
> URL: https://issues.apache.org/jira/browse/PDFBOX-4556
> Project: PDFBox
> Issue Type: Wish
> Components: .NET
> Affects Versions: 1.8.16
> Reporter: bal
> Priority: Major
> Attachments: pdfImage-modified-by-tilman.pdf, pdfImage.pdf, png.png
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]