You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "BREMAUD, CYRIL" <cy...@atos.net> on 2016/04/11 13:17:34 UTC

Fill an existing visible signature field with visual signature

Hello,
I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
I also want to define the size of the visible signature generate with PDFBox.
Thank you.
Cyril Bremaud.


RE: Fill an existing visible signature field with visual signature

Posted by "BREMAUD, CYRIL" <cy...@atos.net>.
I actually make it happen with 1.8.x. It was a bit dirty because I had to write my own addSignature() function.

But now with 2.0.0 some setter disappear and the function addSignature() have radically changed.

At this point, I succeed to move and resize the PDRectangle of the visual signature but when I want to set the correct PDSignatureField an exception occurs.



Exception in thread "main" java.lang.UnsupportedOperationException: not implemented

       at org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField.constructAppearances(PDSignatureField.java:237)

       at org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:221)

       at org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField.setValue(PDSignatureField.java:121)

       at org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDVisibleSigBuilder.createSignature(PDVisibleSigBuilder.java:108)



Cyril.



-----Original Message-----

From: Evan Williams [mailto:evan.williams@zapprx.com]

Sent: Tuesday, April 12, 2016 3:17 PM

To: users@pdfbox.apache.org

Subject: Re: Fill an existing visible signature field with visual signature



For what it is worth, I tried and tried. I worked diligently to make this happen for a long time, and then when 1.8 transitioned to 2.0 I tried again. It never worked. It failed to work in a variety of different ways but I never got it to work.



For my own purposes I did not actually need a valid digital signature. I only needed the visual signature. The digital signature was not required it was just a nice to have. So I just use PDF drawing commands to draw the signature on the right place on the page using the location of the signature field rectangle as a guide.



That probably fixes no one's problem but my own, but if it does then I am glad to help.



But I can tell you that I put way more hours than I should into making this work and it never did.



On Tue, Apr 12, 2016 at 7:17 AM, BREMAUD, CYRIL <cy...@atos.net>

wrote:



> @Tilman

> You may think about that discussion :

> http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesig

> properties-to-write-the-signature-on-the-3-page-into-t/

>

> Please find attach a sample PDF document with empty visible signatures

> fields.

>

> @Maruan

> I succeed to set a new PDRectangle for my visible signature by writing

> a function based on PDFTemplateCreator.buildPDF(). But I'm still

> working on filling an empty already existing visible signature field.

>

> Thank you.

>

> Cyril.

>

> -----Original Message-----

> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]

> Sent: Monday, April 11, 2016 7:12 PM

> To: users@pdfbox.apache.org

> Subject: Re: Fill an existing visible signature field with visual

> signature

>

> Hi,

>

> > Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:

> >

> > Hi,

> >

> >> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:

> >>

> >> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:

> >>> Hello,

> >>> I am trying to sign a PDF document with an existing visible

> >>> signature

> field. I wonder if this is possible to achieve that with PDFBox 2.0.0.

> >>> I also want to define the size of the visible signature generate

> >>> with

> PDFBox.

>

> the size of the signature can be set using the fields rectangle. As

> written before you would be on your own to generate a matching

> appearance stream.

>

> BR

> Maruan

>

> >>> Thank you.

> >>> Cyril Bremaud.

> >>>

> >>>

> >>

> >> I suspect it isn't possible. I remember that this was discussed in

> stackoverflow, but I can't find the link. Can you share a file?

> >

> > correct - there is currently no regeneration of the appearance

> > stream

> based on the updated information.

> >

> > Maruan

> >

> >>

> >> Tilman

> >>

> >> -------------------------------------------------------------------

> >> -- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org

> >> For additional commands, e-mail: users-help@pdfbox.apache.org

> >>

> >

> >

> > --------------------------------------------------------------------

> > - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org

> > For additional commands, e-mail: users-help@pdfbox.apache.org

> >

>

>

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org

> For additional commands, e-mail: users-help@pdfbox.apache.org

>

>

>

>

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org

> For additional commands, e-mail: users-help@pdfbox.apache.org

>







--

*Evan Williams*

Sr. Software Engineer

evan.williams@zapprx.com



*www.ZappRx.com <http://www.zapprx.com/>*

Re: Fill an existing visible signature field with visual signature

Posted by Evan Williams <ev...@zapprx.com>.
For what it is worth, I tried and tried. I worked diligently to make this
happen for a long time, and then when 1.8 transitioned to 2.0 I tried
again. It never worked. It failed to work in a variety of different ways
but I never got it to work.

For my own purposes I did not actually need a valid digital signature. I
only needed the visual signature. The digital signature was not required it
was just a nice to have. So I just use PDF drawing commands to draw the
signature on the right place on the page using the location of the
signature field rectangle as a guide.

That probably fixes no one's problem but my own, but if it does then I am
glad to help.

But I can tell you that I put way more hours than I should into making this
work and it never did.

On Tue, Apr 12, 2016 at 7:17 AM, BREMAUD, CYRIL <cy...@atos.net>
wrote:

> @Tilman
> You may think about that discussion :
> http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesigproperties-to-write-the-signature-on-the-3-page-into-t/
>
> Please find attach a sample PDF document with empty visible signatures
> fields.
>
> @Maruan
> I succeed to set a new PDRectangle for my visible signature by writing a
> function based on PDFTemplateCreator.buildPDF(). But I'm still working on
> filling an empty already existing visible signature field.
>
> Thank you.
>
> Cyril.
>
> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> Sent: Monday, April 11, 2016 7:12 PM
> To: users@pdfbox.apache.org
> Subject: Re: Fill an existing visible signature field with visual signature
>
> Hi,
>
> > Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
> >
> > Hi,
> >
> >> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:
> >>
> >> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
> >>> Hello,
> >>> I am trying to sign a PDF document with an existing visible signature
> field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
> >>> I also want to define the size of the visible signature generate with
> PDFBox.
>
> the size of the signature can be set using the fields rectangle. As
> written before you would be on your own to generate a matching appearance
> stream.
>
> BR
> Maruan
>
> >>> Thank you.
> >>> Cyril Bremaud.
> >>>
> >>>
> >>
> >> I suspect it isn't possible. I remember that this was discussed in
> stackoverflow, but I can't find the link. Can you share a file?
> >
> > correct - there is currently no regeneration of the appearance stream
> based on the updated information.
> >
> > Maruan
> >
> >>
> >> Tilman
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> >> For additional commands, e-mail: users-help@pdfbox.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> > For additional commands, e-mail: users-help@pdfbox.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>



-- 
*Evan Williams*
Sr. Software Engineer
evan.williams@zapprx.com

*www.ZappRx.com <http://www.zapprx.com/>*

Re: Fill an existing visible signature field with visual signature

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

> Am 13.04.2016 um 16:26 schrieb BREMAUD, CYRIL <cy...@atos.net>:
> 
> Hi,
> 
> 
> 
> Yeah it working like a charm ! I just add those lines just before calling doc.addSignature(signature, this, options);
> 
> 
> 
> for(PDField pdField : doc.getDocumentCatalog().getAcroForm().getFields()) {
>   if (pdField instanceof PDSignatureField) {
>        if (pdField.getPartialName().equals("Zone de Signature 3")) {
>            pdField.getWidgets().get(0).setHidden(true);
>            ( (PDSignatureField)pdField ).setValue(signature);
>            pdField.getWidgets().get(0).setHidden(false);
>            break;
>        }
>    }
> }
> 
> doc.addSignature(signature, this, options);
> 
> I used setHidden() in order to fool the PDSignatureField.constructAppearances() function and avoid the NotImplementedException. I think it's working because the appearances is already build so there is no needs to build it again.
> 
> If you want to try this, just put those lines in the CreateVisibleSignature.java example class.
> I also wrote my own buildSignature() function in order to put the visible signature field where and with the size I need.

congratulations - great to hear that you found a solution.

BR
Maruan

> 
> 
> Cyril.
> 
> 
> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> Sent: Wednesday, April 13, 2016 3:23 PM
> To: users@pdfbox.apache.org
> Subject: Re: Fill an existing visible signature field with visual signature
> 
> 
> 
> Hi,
> 
> 
> 
>> Am 13.04.2016 um 14:45 schrieb BREMAUD, CYRIL <cy...@atos.net>>:
> 
>> 
> 
>>> These don't go through, you have to upload them somewhere.
> 
>> 
> 
>> Ok, I remember this PDF file was already upload on a different issue :
> 
>> https://issues.apache.org/jira/secure/attachment/12663611/documentSign
> 
>> able.pdf_signaturePAdESVisualSignatureDemo.pdf
> 
>> 
> 
>>> Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.
> 
>> 
> 
>> I succeed to fill an existing signature field with PDFBox 1.8.x so there should be a way with 2.0.0. I'm still working on it.
> 
> 
> 
> if you are looking for specific setters/getters/methods please let me know. I might be able to point you to the 2.0 alternative.
> 
> 
> 
> BR
> 
> Maruan
> 
> 
> 
>> 
> 
>> Cyril.
> 
>> 
> 
>> -----Original Message-----
> 
>> From: Tilman Hausherr [mailto:THausherr@t-online.de]
> 
>> Sent: Tuesday, April 12, 2016 6:44 PM
> 
>> To: users@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>> Subject: Re: Fill an existing visible signature field with visual
> 
>> signature
> 
>> 
> 
>> Am 12.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
> 
>>> @Tilman
> 
>>> You may think about that discussion :
> 
>>> http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesi
> 
>>> g properties-to-write-the-signature-on-the-3-page-into-t/
> 
>> 
> 
>> Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.
> 
>> 
> 
>>> 
> 
>>> Please find attach a sample PDF document with empty visible signatures fields.
> 
>> 
> 
>> These don't go through, you have to upload them somewhere.
> 
>> 
> 
>> Tilman
> 
>> 
> 
>> 
> 
>>> @Maruan
> 
>>> I succeed to set a new PDRectangle for my visible signature by writing a function based on PDFTemplateCreator.buildPDF(). But I'm still working on filling an empty already existing visible signature field.
> 
>>> 
> 
>>> Thank you.
> 
>>> 
> 
>>> Cyril.
> 
>>> 
> 
>>> -----Original Message-----
> 
>>> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> 
>>> Sent: Monday, April 11, 2016 7:12 PM
> 
>>> To: users@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>> Subject: Re: Fill an existing visible signature field with visual
> 
>>> signature
> 
>>> 
> 
>>> Hi,
> 
>>> 
> 
>>>> Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>>:
> 
>>>> 
> 
>>>> Hi,
> 
>>>> 
> 
>>>>> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>>:
> 
>>>>> 
> 
>>>>> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
> 
>>>>>> Hello,
> 
>>>>>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
> 
>>>>>> I also want to define the size of the visible signature generate with PDFBox.
> 
>>> the size of the signature can be set using the fields rectangle. As written before you would be on your own to generate a matching appearance stream.
> 
>>> 
> 
>>> BR
> 
>>> Maruan
> 
>>> 
> 
>>>>>> Thank you.
> 
>>>>>> Cyril Bremaud.
> 
>>>>>> 
> 
>>>>>> 
> 
>>>>> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?
> 
>>>> correct - there is currently no regeneration of the appearance stream based on the updated information.
> 
>>>> 
> 
>>>> Maruan
> 
>>>> 
> 
>>>>> Tilman
> 
>>>>> 
> 
>>>>> -------------------------------------------------------------------
> 
>>>>> -
> 
>>>>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>>>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>>>> 
> 
>>>> 
> 
>>>> --------------------------------------------------------------------
> 
>>>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>>> 
> 
>>> 
> 
>>> ---------------------------------------------------------------------
> 
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>> 
> 
>>> 
> 
>>> 
> 
>>> 
> 
>>> ---------------------------------------------------------------------
> 
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>> 
> 
>> 
> 
>> ---------------------------------------------------------------------
> 
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
>> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


RE: Fill an existing visible signature field with visual signature

Posted by "BREMAUD, CYRIL" <cy...@atos.net>.
Hi,



Yeah it working like a charm ! I just add those lines just before calling doc.addSignature(signature, this, options);



for(PDField pdField : doc.getDocumentCatalog().getAcroForm().getFields()) {
   if (pdField instanceof PDSignatureField) {
        if (pdField.getPartialName().equals("Zone de Signature 3")) {
            pdField.getWidgets().get(0).setHidden(true);
            ( (PDSignatureField)pdField ).setValue(signature);
            pdField.getWidgets().get(0).setHidden(false);
            break;
        }
    }
}

doc.addSignature(signature, this, options);

I used setHidden() in order to fool the PDSignatureField.constructAppearances() function and avoid the NotImplementedException. I think it's working because the appearances is already build so there is no needs to build it again.

If you want to try this, just put those lines in the CreateVisibleSignature.java example class.
I also wrote my own buildSignature() function in order to put the visible signature field where and with the size I need.


Cyril.


-----Original Message-----
From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
Sent: Wednesday, April 13, 2016 3:23 PM
To: users@pdfbox.apache.org
Subject: Re: Fill an existing visible signature field with visual signature



Hi,



> Am 13.04.2016 um 14:45 schrieb BREMAUD, CYRIL <cy...@atos.net>>:

>

>> These don't go through, you have to upload them somewhere.

>

> Ok, I remember this PDF file was already upload on a different issue :

> https://issues.apache.org/jira/secure/attachment/12663611/documentSign

> able.pdf_signaturePAdESVisualSignatureDemo.pdf

>

>> Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.

>

> I succeed to fill an existing signature field with PDFBox 1.8.x so there should be a way with 2.0.0. I'm still working on it.



if you are looking for specific setters/getters/methods please let me know. I might be able to point you to the 2.0 alternative.



BR

Maruan



>

> Cyril.

>

> -----Original Message-----

> From: Tilman Hausherr [mailto:THausherr@t-online.de]

> Sent: Tuesday, April 12, 2016 6:44 PM

> To: users@pdfbox.apache.org<ma...@pdfbox.apache.org>

> Subject: Re: Fill an existing visible signature field with visual

> signature

>

> Am 12.04.2016 um 13:17 schrieb BREMAUD, CYRIL:

>> @Tilman

>> You may think about that discussion :

>> http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesi

>> g properties-to-write-the-signature-on-the-3-page-into-t/

>

> Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.

>

>>

>> Please find attach a sample PDF document with empty visible signatures fields.

>

> These don't go through, you have to upload them somewhere.

>

> Tilman

>

>

>> @Maruan

>> I succeed to set a new PDRectangle for my visible signature by writing a function based on PDFTemplateCreator.buildPDF(). But I'm still working on filling an empty already existing visible signature field.

>>

>> Thank you.

>>

>> Cyril.

>>

>> -----Original Message-----

>> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]

>> Sent: Monday, April 11, 2016 7:12 PM

>> To: users@pdfbox.apache.org<ma...@pdfbox.apache.org>

>> Subject: Re: Fill an existing visible signature field with visual

>> signature

>>

>> Hi,

>>

>>> Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>>:

>>>

>>> Hi,

>>>

>>>> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>>:

>>>>

>>>> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:

>>>>> Hello,

>>>>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.

>>>>> I also want to define the size of the visible signature generate with PDFBox.

>> the size of the signature can be set using the fields rectangle. As written before you would be on your own to generate a matching appearance stream.

>>

>> BR

>> Maruan

>>

>>>>> Thank you.

>>>>> Cyril Bremaud.

>>>>>

>>>>>

>>>> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?

>>> correct - there is currently no regeneration of the appearance stream based on the updated information.

>>>

>>> Maruan

>>>

>>>> Tilman

>>>>

>>>> -------------------------------------------------------------------

>>>> -

>>>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>

>>>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>

>>>>

>>>

>>> --------------------------------------------------------------------

>>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>

>>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>

>>>

>>

>> ---------------------------------------------------------------------

>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>

>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>

>>

>>

>>

>>

>> ---------------------------------------------------------------------

>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>

>> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>

>

>

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>

> For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>

>





---------------------------------------------------------------------

To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<ma...@pdfbox.apache.org>

For additional commands, e-mail: users-help@pdfbox.apache.org<ma...@pdfbox.apache.org>



Re: Fill an existing visible signature field with visual signature

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

> Am 13.04.2016 um 14:45 schrieb BREMAUD, CYRIL <cy...@atos.net>:
> 
>> These don't go through, you have to upload them somewhere.
> 
> Ok, I remember this PDF file was already upload on a different issue : https://issues.apache.org/jira/secure/attachment/12663611/documentSignable.pdf_signaturePAdESVisualSignatureDemo.pdf
> 
>> Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.
> 
> I succeed to fill an existing signature field with PDFBox 1.8.x so there should be a way with 2.0.0. I'm still working on it.

if you are looking for specific setters/getters/methods please let me know. I might be able to point you to the 2.0 alternative.

BR
Maruan 

> 
> Cyril.
> 
> -----Original Message-----
> From: Tilman Hausherr [mailto:THausherr@t-online.de] 
> Sent: Tuesday, April 12, 2016 6:44 PM
> To: users@pdfbox.apache.org
> Subject: Re: Fill an existing visible signature field with visual signature
> 
> Am 12.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
>> @Tilman
>> You may think about that discussion : 
>> http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesig
>> properties-to-write-the-signature-on-the-3-page-into-t/
> 
> Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.
> 
>> 
>> Please find attach a sample PDF document with empty visible signatures fields.
> 
> These don't go through, you have to upload them somewhere.
> 
> Tilman
> 
> 
>> @Maruan
>> I succeed to set a new PDRectangle for my visible signature by writing a function based on PDFTemplateCreator.buildPDF(). But I'm still working on filling an empty already existing visible signature field.
>> 
>> Thank you.
>> 
>> Cyril.
>> 
>> -----Original Message-----
>> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
>> Sent: Monday, April 11, 2016 7:12 PM
>> To: users@pdfbox.apache.org
>> Subject: Re: Fill an existing visible signature field with visual 
>> signature
>> 
>> Hi,
>> 
>>> Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
>>> 
>>> Hi,
>>> 
>>>> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:
>>>> 
>>>> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
>>>>> Hello,
>>>>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
>>>>> I also want to define the size of the visible signature generate with PDFBox.
>> the size of the signature can be set using the fields rectangle. As written before you would be on your own to generate a matching appearance stream.
>> 
>> BR
>> Maruan
>> 
>>>>> Thank you.
>>>>> Cyril Bremaud.
>>>>> 
>>>>> 
>>>> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?
>>> correct - there is currently no regeneration of the appearance stream based on the updated information.
>>> 
>>> Maruan
>>> 
>>>> Tilman
>>>> 
>>>> --------------------------------------------------------------------
>>>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


RE: Fill an existing visible signature field with visual signature

Posted by "BREMAUD, CYRIL" <cy...@atos.net>.
> These don't go through, you have to upload them somewhere.

Ok, I remember this PDF file was already upload on a different issue : https://issues.apache.org/jira/secure/attachment/12663611/documentSignable.pdf_signaturePAdESVisualSignatureDemo.pdf

> Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.

I succeed to fill an existing signature field with PDFBox 1.8.x so there should be a way with 2.0.0. I'm still working on it.

Cyril.

-----Original Message-----
From: Tilman Hausherr [mailto:THausherr@t-online.de] 
Sent: Tuesday, April 12, 2016 6:44 PM
To: users@pdfbox.apache.org
Subject: Re: Fill an existing visible signature field with visual signature

Am 12.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
> @Tilman
> You may think about that discussion : 
> http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesig
> properties-to-write-the-signature-on-the-3-page-into-t/

Yes indeed. But I read the comments again, these are quite depressing. I doubt that this will be fixed soon.

>
> Please find attach a sample PDF document with empty visible signatures fields.

These don't go through, you have to upload them somewhere.

Tilman


> @Maruan
> I succeed to set a new PDRectangle for my visible signature by writing a function based on PDFTemplateCreator.buildPDF(). But I'm still working on filling an empty already existing visible signature field.
>
> Thank you.
>
> Cyril.
>
> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> Sent: Monday, April 11, 2016 7:12 PM
> To: users@pdfbox.apache.org
> Subject: Re: Fill an existing visible signature field with visual 
> signature
>
> Hi,
>
>> Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
>>
>> Hi,
>>
>>> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:
>>>
>>> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
>>>> Hello,
>>>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
>>>> I also want to define the size of the visible signature generate with PDFBox.
> the size of the signature can be set using the fields rectangle. As written before you would be on your own to generate a matching appearance stream.
>
> BR
> Maruan
>
>>>> Thank you.
>>>> Cyril Bremaud.
>>>>
>>>>
>>> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?
>> correct - there is currently no regeneration of the appearance stream based on the updated information.
>>
>> Maruan
>>
>>> Tilman
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Fill an existing visible signature field with visual signature

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 12.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
> @Tilman
> You may think about that discussion : http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesigproperties-to-write-the-signature-on-the-3-page-into-t/

Yes indeed. But I read the comments again, these are quite depressing. I 
doubt that this will be fixed soon.

>
> Please find attach a sample PDF document with empty visible signatures fields.

These don't go through, you have to upload them somewhere.

Tilman


> @Maruan
> I succeed to set a new PDRectangle for my visible signature by writing a function based on PDFTemplateCreator.buildPDF(). But I'm still working on filling an empty already existing visible signature field.
>
> Thank you.
>
> Cyril.
>
> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]
> Sent: Monday, April 11, 2016 7:12 PM
> To: users@pdfbox.apache.org
> Subject: Re: Fill an existing visible signature field with visual signature
>
> Hi,
>
>> Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
>>
>> Hi,
>>
>>> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:
>>>
>>> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
>>>> Hello,
>>>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
>>>> I also want to define the size of the visible signature generate with PDFBox.
> the size of the signature can be set using the fields rectangle. As written before you would be on your own to generate a matching appearance stream.
>
> BR
> Maruan
>
>>>> Thank you.
>>>> Cyril Bremaud.
>>>>
>>>>
>>> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?
>> correct - there is currently no regeneration of the appearance stream based on the updated information.
>>
>> Maruan
>>
>>> Tilman
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org


RE: Fill an existing visible signature field with visual signature

Posted by "BREMAUD, CYRIL" <cy...@atos.net>.
@Tilman
You may think about that discussion : http://stackoverflow.com/questions/31571055/how-can-i-get-pdvisiblesigproperties-to-write-the-signature-on-the-3-page-into-t/

Please find attach a sample PDF document with empty visible signatures fields.

@Maruan
I succeed to set a new PDRectangle for my visible signature by writing a function based on PDFTemplateCreator.buildPDF(). But I'm still working on filling an empty already existing visible signature field.

Thank you.

Cyril.

-----Original Message-----
From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de] 
Sent: Monday, April 11, 2016 7:12 PM
To: users@pdfbox.apache.org
Subject: Re: Fill an existing visible signature field with visual signature

Hi,

> Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
> 
> Hi,
> 
>> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:
>> 
>> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
>>> Hello,
>>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
>>> I also want to define the size of the visible signature generate with PDFBox.

the size of the signature can be set using the fields rectangle. As written before you would be on your own to generate a matching appearance stream.

BR
Maruan

>>> Thank you.
>>> Cyril Bremaud.
>>> 
>>> 
>> 
>> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?
> 
> correct - there is currently no regeneration of the appearance stream based on the updated information.
> 
> Maruan
> 
>> 
>> Tilman
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org



Re: Fill an existing visible signature field with visual signature

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

> Am 11.04.2016 um 19:05 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
> 
> Hi,
> 
>> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:
>> 
>> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
>>> Hello,
>>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
>>> I also want to define the size of the visible signature generate with PDFBox.

the size of the signature can be set using the fields rectangle. As written before you would be on your own to generate a matching appearance stream.

BR
Maruan

>>> Thank you.
>>> Cyril Bremaud.
>>> 
>>> 
>> 
>> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?
> 
> correct - there is currently no regeneration of the appearance stream based on the updated information.
> 
> Maruan
> 
>> 
>> Tilman
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Fill an existing visible signature field with visual signature

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

> Am 11.04.2016 um 18:58 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
>> Hello,
>> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
>> I also want to define the size of the visible signature generate with PDFBox.
>> Thank you.
>> Cyril Bremaud.
>> 
>> 
> 
> I suspect it isn't possible. I remember that this was discussed in stackoverflow, but I can't find the link. Can you share a file?

correct - there is currently no regeneration of the appearance stream based on the updated information.

Maruan

> 
> Tilman
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Fill an existing visible signature field with visual signature

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 11.04.2016 um 13:17 schrieb BREMAUD, CYRIL:
> Hello,
> I am trying to sign a PDF document with an existing visible signature field. I wonder if this is possible to achieve that with PDFBox 2.0.0.
> I also want to define the size of the visible signature generate with PDFBox.
> Thank you.
> Cyril Bremaud.
>
>

I suspect it isn't possible. I remember that this was discussed in 
stackoverflow, but I can't find the link. Can you share a file?

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org