You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Bruno Svorinic <BR...@MIT-Software.hr> on 2014/06/26 12:27:07 UTC
PDF signing and sign image
Hi everyone,
this is my first writing to (Apache) mailing list, forgive me if I'm doing something wrong...
I am evaluating pdfbox to see if I can use it for signing PDF documents. I'm using CreateVisibleSignature.java from Examples. I can sign the document and get signed PDF out but I can't get the image to be displayed correctly. The image (as far as I can tell) is there but it's not displayed correctly. Any hint in what I'm doing wrong? I'm attaching original PDF, sign image and result PDF...
Thanks in advance,
Bruno
Re: PDF signing and sign image
Posted by Bruno Svorinic <BR...@MIT-Software.hr>.
Hi Maruan,
I just ran another test:
- bmp and png both return blank image
- jpg works correctly (I'm not sure how I missed it the first time
arround :-()
- gif gives me:
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
<init>
INFO: PDF Strucure has been Created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDFTemplateCreator
buildPDF
INFO: pdf building has been started
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createProcSetArray
INFO: ProcSet array has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createPage
INFO: PDF page has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createAcroForm
INFO: Acro form page has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createSignatureField
INFO: Signature field has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createSignature
INFO: PDSignatur has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createAcroFormDictionary
INFO: AcroForm dictionary has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createAffineTransform
INFO: Matrix has been added
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createSignatureRectangle
INFO: rectangle of signature has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder
createFormaterRectangle
INFO: Formater rectangle has been created
srp 04, 2014 5:42:30 PM
org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage getColorSpace
INFO: About to return NULL from unhandled branch. filter =
COSName{DCTDecode}
Exception in thread "main" java.lang.IllegalStateException:
at
org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg.setPropertiesFromAWT(PDJpeg.java:132)
at
org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg.<init>(PDJpeg.java:113)
at
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder.createSignatureImage(PDVisibleSigBuilder.java:163)
at
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDFTemplateCreator.buildPDF(PDFTemplateCreator.java:112)
at
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigProperties.buildSignature(PDVisibleSigProperties.java:49)
at
org.apache.pdfbox.examples.signature.CreateVisibleSignature.main(CreateVisibleSignature.java:250)
Once again, thank you very much for your time. I think I can live with
using just jpg, but maybe this is something the team can check when
there's time...
Best regards,
Bruno
>>> Maruan Sahyoun <sa...@fileaffairs.de> 4.7.2014 17:25 >>>
Hi Bruno,
could you try with a different image format such as jpg?
BR
Maruan
Am 26.06.2014 um 13:03 schrieb Bruno Svorinic <BR...@MIT-Software.hr>:
> Hi Maruan,
>
> thanks for the prompt reply. I've uploaded files to DropBox:
>
> https://dl.dropboxusercontent.com/u/29952195/test.pdf
> https://dl.dropboxusercontent.com/u/29952195/test_signed.pdf
> https://dl.dropboxusercontent.com/u/29952195/testpotpis.bmp
>
> I hope they're accessible now...
>
> Best regards,
> Bruno
>
> >>> Maruan Sahyoun <sa...@fileaffairs.de> 26.6.2014 12:29 >>>
> Hi Bruno,
>
> the attachments didn’t make it through due to limitations of the
mailing list. Could you upload them to a public location?
>
> BR
> Maruan Sahyoun
>
> Am 26.06.2014 um 12:27 schrieb Bruno Svorinic
<BR...@MIT-Software.hr>:
>
> > Hi everyone,
> >
> > this is my first writing to (Apache) mailing list, forgive me if
I'm doing something wrong...
> >
> > I am evaluating pdfbox to see if I can use it for signing PDF
documents. I'm using CreateVisibleSignature.java from Examples. I can
sign the document and get signed PDF out but I can't get the image to be
displayed correctly. The image (as far as I can tell) is there but it's
not displayed correctly. Any hint in what I'm doing wrong? I'm attaching
original PDF, sign image and result PDF...
> >
> > Thanks in advance,
> > Bruno
> > <testpotpis.bmp>
>
Re: PDF signing and sign image
Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi Bruno,
could you try with a different image format such as jpg?
BR
Maruan
Am 26.06.2014 um 13:03 schrieb Bruno Svorinic <BR...@MIT-Software.hr>:
> Hi Maruan,
>
> thanks for the prompt reply. I've uploaded files to DropBox:
>
> https://dl.dropboxusercontent.com/u/29952195/test.pdf
> https://dl.dropboxusercontent.com/u/29952195/test_signed.pdf
> https://dl.dropboxusercontent.com/u/29952195/testpotpis.bmp
>
> I hope they're accessible now...
>
> Best regards,
> Bruno
>
> >>> Maruan Sahyoun <sa...@fileaffairs.de> 26.6.2014 12:29 >>>
> Hi Bruno,
>
> the attachments didn’t make it through due to limitations of the mailing list. Could you upload them to a public location?
>
> BR
> Maruan Sahyoun
>
> Am 26.06.2014 um 12:27 schrieb Bruno Svorinic <BR...@MIT-Software.hr>:
>
> > Hi everyone,
> >
> > this is my first writing to (Apache) mailing list, forgive me if I'm doing something wrong...
> >
> > I am evaluating pdfbox to see if I can use it for signing PDF documents. I'm using CreateVisibleSignature.java from Examples. I can sign the document and get signed PDF out but I can't get the image to be displayed correctly. The image (as far as I can tell) is there but it's not displayed correctly. Any hint in what I'm doing wrong? I'm attaching original PDF, sign image and result PDF...
> >
> > Thanks in advance,
> > Bruno
> > <testpotpis.bmp>
>
Re: PDF signing and sign image
Posted by Bruno Svorinic <BR...@MIT-Software.hr>.
Hi Maruan,
thanks for the prompt reply. I've uploaded files to DropBox:
https://dl.dropboxusercontent.com/u/29952195/test.pdf
https://dl.dropboxusercontent.com/u/29952195/test_signed.pdf
https://dl.dropboxusercontent.com/u/29952195/testpotpis.bmp
I hope they're accessible now...
Best regards,
Bruno
>>> Maruan Sahyoun <sa...@fileaffairs.de> 26.6.2014 12:29 >>>
Hi Bruno,
the attachments didn’t make it through due to limitations of the
mailing list. Could you upload them to a public location?
BR
Maruan Sahyoun
Am 26.06.2014 um 12:27 schrieb Bruno Svorinic <BR...@MIT-Software.hr>:
> Hi everyone,
>
> this is my first writing to (Apache) mailing list, forgive me if I'm
doing something wrong...
>
> I am evaluating pdfbox to see if I can use it for signing PDF
documents. I'm using CreateVisibleSignature.java from Examples. I can
sign the document and get signed PDF out but I can't get the image to be
displayed correctly. The image (as far as I can tell) is there but it's
not displayed correctly. Any hint in what I'm doing wrong? I'm attaching
original PDF, sign image and result PDF...
>
> Thanks in advance,
> Bruno
> <testpotpis.bmp>
Re: PDF signing and sign image
Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi Bruno,
the attachments didn’t make it through due to limitations of the mailing list. Could you upload them to a public location?
BR
Maruan Sahyoun
Am 26.06.2014 um 12:27 schrieb Bruno Svorinic <BR...@MIT-Software.hr>:
> Hi everyone,
>
> this is my first writing to (Apache) mailing list, forgive me if I'm doing something wrong...
>
> I am evaluating pdfbox to see if I can use it for signing PDF documents. I'm using CreateVisibleSignature.java from Examples. I can sign the document and get signed PDF out but I can't get the image to be displayed correctly. The image (as far as I can tell) is there but it's not displayed correctly. Any hint in what I'm doing wrong? I'm attaching original PDF, sign image and result PDF...
>
> Thanks in advance,
> Bruno
> <testpotpis.bmp>