[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-21 Thread bal (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16912318#comment-16912318
 ] 

bal commented on PDFBOX-4609:
-

i tried with the below code but getting the message digest attribute mismatch 
value error at the if 
(signerInformation.verify(signerCertificate.getPublicKey(), "BC")) line .Let me 
know where i am doing wrong.

string pdf = signedpdfpath

 PDDocument document = PDDocument.load(pdf);
 Provider provider = new BouncyCastleProvider();
 Security.addProvider(provider);
 List arrList = new java.util.ArrayList();
 arrList.addAll(document.getSignatureDictionaries());


 for (int i = 0; i <= arrList.size(); i++)
 {
 org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature 
signatureDictionary = 
(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature)arrList.get(i);

 byte[] signatureContent = signatureDictionary.getContents(new 
FileInputStream(pdf));
 byte[] signedContent = signatureDictionary.getSignedContent(new 
FileInputStream(pdf));

 CMSProcessable cmsProcessableInputStream = new 
CMSProcessableByteArray(signedContent);
 CMSSignedData cmsSignedData = new CMSSignedData(cmsProcessableInputStream, 
signatureContent);
 SignerInformationStore signerInformationStore = cmsSignedData.getSignerInfos();
 Collection signers = signerInformationStore.getSigners();
 CertStore certs = cmsSignedData.getCertificatesAndCRLs("Collection", 
(string)null);
 Iterator signersIterator = signers.iterator();
 while (signersIterator.hasNext())
 {
 SignerInformation signerInformation = 
(SignerInformation)signersIterator.next();
 Collection certificates = certs.getCertificates(signerInformation.getSID());
 Iterator certIt = certificates.iterator();
 java.security.cert.X509Certificate signerCertificate = 
(java.security.cert.X509Certificate)certIt.next();

 if (signerInformation.verify(signerCertificate.getPublicKey(), "BC"))

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-21 Thread bal (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16911993#comment-16911993
 ] 

bal commented on PDFBOX-4609:
-

i had implemented the signatureinterface that why signature is attached in pdf. 
i tried to implement the sign() method in the signatureinterface derived class 
but couldn't create the keystore as in java which contains the alias and the 
pin .  The bouncy castle example shows  it is used to create the pkcs 
signature,  i already have signature in pkcs format. It is not usable for me 
for the valid signature. Is another options to pass the correct input to sign 
method for valid signature? 

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-20 Thread bal (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16911130#comment-16911130
 ] 

bal commented on PDFBOX-4609:
-

signer class is not present in the pdfbox 1.8 version . How can i  implement it 
in addsignature () method.

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-20 Thread bal (Jira)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16911076#comment-16911076
 ] 

bal commented on PDFBOX-4609:
-

 I found the sign method implementation using bouncy castle,  it is used to 
create the Pkcs  signature as mentioned in the examples. Tried but unable to 
implement the sign method in the SignatureInterface-derived class. thanks.

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-12 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16905139#comment-16905139
 ] 

bal commented on PDFBOX-4609:
-

yes you are right when i call the saveIncremental() the sign method gets 
automatically called.

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Comment Edited] (PDFBOX-4609) At least one signature is invalid

2019-08-12 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16905111#comment-16905111
 ] 

bal edited comment on PDFBOX-4609 at 8/12/19 11:53 AM:
---

hi,

i found the sign() method implementation in the doWriteSignature () method of 
the coswriter class, but this method is not called from saveIncremental, 
instead it calls the write() method of the coswriter class. how  can i call the 
sign() from the coswriter class? please help.


was (Author: bal@123):
hi,

i found the sign() method implementation in the doWriteSignature () method of 
the coswriter class, but this method is not called from saveIncremental, 
instead it calls the write() method of the coswriter class. how  can i call the 
sign() form the coswriter? please help.

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-12 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16905111#comment-16905111
 ] 

bal commented on PDFBOX-4609:
-

hi,

i found the sign() method implementation in the doWriteSignature () method of 
the coswriter class, but this method is not called from saveIncremental, 
instead it calls the write() method of the coswriter class. how  can i call the 
sign() form the coswriter? please help.

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-12 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16905108#comment-16905108
 ] 

bal commented on PDFBOX-4609:
-

hi, i have tried with the coswriter but doesn't find implementation of the sign 
method.  can you guide me for this implemenation.?

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-12 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16904897#comment-16904897
 ] 

bal commented on PDFBOX-4609:
-

hi, as you suggested  converted the inputstream  to sign method to byte array 
but getting array of 0 bytes . converted the stream of inputpdf to bytearray 
got byte array of size 3208(refer attached debug.txt).

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4609) At least one signature is invalid

2019-08-12 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4609:

Attachment: Debug.txt

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: Debug.txt, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-09 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16903844#comment-16903844
 ] 

bal commented on PDFBOX-4609:
-

hi,

I am passing the fis and fos to saveincremental and internally sign method is 
called . i am just returning the byte array of size 3210 of the pkcs 7 
signature from the sign method. i have tried to find out the range  or sequence 
but not successed.   Thanks in advance.

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-06 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900853#comment-16900853
 ] 

bal commented on PDFBOX-4609:
-

I have converted the  file  which is to be signed to byte array using the 
ioutils.toByteArray()  method,  written this byte array to outputstream of the 
new file. How could I know what should be exact range?  My byte range is 0 3383 
22329 48166.

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-06 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900692#comment-16900692
 ] 

bal commented on PDFBOX-4609:
-

The document is not modified from my end. Where the document is getting 
modified? Is there any changes pdfbox does unintentionally? I am just returning 
the bytes array of pkcs7 signature from sign method after calling 
saveincremental method. 

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4609) At least one signature is invalid

2019-08-06 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4609:

Attachment: (was: as_Signed.pdf)

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-08-05 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900074#comment-16900074
 ] 

bal commented on PDFBOX-4609:
-

Hi i have attached the signed pdf please check and let me know the reason of 
the invalid signature.

 

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: as_Signed.pdf, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4609) At least one signature is invalid

2019-08-05 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4609:

Attachment: as_Signed.pdf

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: as_Signed.pdf, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4609) At least one signature is invalid

2019-08-05 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4609:

Attachment: (was: as_Signed.pdf)

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4609) At least one signature is invalid

2019-08-05 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4609:

Attachment: as_Signed.pdf

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Attachments: as_Signed.pdf, keystore.p12
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-07-30 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16896719#comment-16896719
 ] 

bal commented on PDFBOX-4609:
-

The signed pdf contain the certificate so that I can't share it. Can u please 
tell me the possibilities for invalidation of the signature by acrobat so that 
I can try at my end. Can we generate the valid signature with invisible 
signature field in the form?  Besides cryptostuff is Bouncastle used to 
generate the valid signature?  I am signing the pdf with the pkcs 7 signature. 
Please help. 

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4609) At least one signature is invalid

2019-07-26 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4609:

Component/s: (was: Utilities)

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) At least one signature is invalid

2019-07-26 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893965#comment-16893965
 ] 

bal commented on PDFBOX-4609:
-

I can't attach pdf due to security concerns. I couldn't find out why my 
signature is getting invalid. Why the document has been altered or modified 
since signature is applied is is seen at the signature panel of pdf. Tried but 
not succeed  to find out why acrobat invalidates the pdf.?  Please help. 

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET, Utilities
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4609) At least one signature is invalid

2019-07-26 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4609:

Summary: At least  one signature is invalid  (was: How valid pdf generated 
after signature insertion? )

> At least  one signature is invalid
> --
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET, Utilities
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4609) How valid pdf generated after signature insertion?

2019-07-25 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16892449#comment-16892449
 ] 

bal commented on PDFBOX-4609:
-

I removed unwanted  trailer entry generated new pdf with signature but it 
results in invalid signature. i have doubt is cross reference mismatch in the 
original and signed pdf results in invalid signature? i checked the pdfs with 
editor there is change in the xref entries in both pdf. Thanks.

> How valid pdf generated after signature insertion? 
> ---
>
> Key: PDFBOX-4609
> URL: https://issues.apache.org/jira/browse/PDFBOX-4609
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET, Utilities
>Affects Versions: 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.15
>
>
> I am getting signature is  invalid  error in the signature panel of pdf after 
> pkcs 7 signature insertion. I can see the name of the signer with the signed 
> by in signature panel. I am not able to find out disallowed changes pdfbox 
> does resulting into invalid pdf by acrobat reader.   Is it possible to 
> validate the pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Created] (PDFBOX-4609) How valid pdf generated after signature insertion?

2019-07-25 Thread bal (JIRA)
bal created PDFBOX-4609:
---

 Summary: How valid pdf generated after signature insertion? 
 Key: PDFBOX-4609
 URL: https://issues.apache.org/jira/browse/PDFBOX-4609
 Project: PDFBox
  Issue Type: Wish
  Components: .NET, Utilities
Affects Versions: 1.8.15
Reporter: bal
 Fix For: 1.8.15


I am getting signature is  invalid  error in the signature panel of pdf after 
pkcs 7 signature insertion. I can see the name of the signer with the signed by 
in signature panel. I am not able to find out disallowed changes pdfbox does 
resulting into invalid pdf by acrobat reader.   Is it possible to validate the 
pdf with pdfbox? Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Created] (PDFBOX-4606) How the valid pdf with s generated

2019-07-24 Thread bal (JIRA)
bal created PDFBOX-4606:
---

 Summary: How the valid pdf with s generated 
 Key: PDFBOX-4606
 URL: https://issues.apache.org/jira/browse/PDFBOX-4606
 Project: PDFBox
  Issue Type: Wish
Reporter: bal






--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Comment Edited] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-23 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16891560#comment-16891560
 ] 

bal edited comment on PDFBOX-4556 at 7/24/19 3:35 AM:
--

Hi, 

Can u please tell me what may be the possibilities to get invalid signature 
after signature insertion resulting into invalid pdf.?What may be the changes 
pdfbox do that are disallowed by acrobat due to which it results in invalid 
pdf. If pdf with invisible signature is signed can it generate valid pdf with 
signature?  Is there any role of Bouncycastle to produce valid pdf?  I tried to 
remove unwanted trailer entry but didn't work. Thanks in advance. 


was (Author: bal@123):
Hi, 

Can u please tell me what may be the possibility to get invalid signature. 

> 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
>  Labels: how-to
> Attachments: pdfImage-modified-by-tilman.pdf, pdfImage1.pdf, 
> pdfImage1_modified_by_Tilman2.pdf, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Reopened] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal reopened PDFBOX-4556:
-

Hi, 

Can u please tell me what may be the possibility to get invalid signature. 

> 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
>  Labels: how-to
> Attachments: pdfImage-modified-by-tilman.pdf, pdfImage1.pdf, 
> pdfImage1_modified_by_Tilman2.pdf, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-04 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: as_TobeSigned.pdf)

> 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, pdfImage1.pdf, 
> pdfImage1_modified_by_Tilman2.pdf, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-04 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16878611#comment-16878611
 ] 

bal commented on PDFBOX-4556:
-

hi, i have tried with the different color combination but i am not able to see 
any appearances for the contents(i.e signed by , name ) but i am able to see 
the image . These values are present when i open PDF it with the editor.  i am 
getting the invalid pdf when i am attaching the pkcs 7 signature. i have  
returned the signature bytes of the pkcs7 signature  from the sign method.  
Getting the errors ' signature is invalid ' and second error is 'document has 
been altered or corrupted since it was signed.'  i can't upload the pdf ... 
please help... thanks in advance.

> 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: as_TobeSigned.pdf, pdfImage-modified-by-tilman.pdf, 
> pdfImage1.pdf, pdfImage1_modified_by_Tilman2.pdf, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-02 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: as_TobeSigned.pdf

> 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: as_TobeSigned.pdf, pdfImage-modified-by-tilman.pdf, 
> pdfImage1.pdf, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-02 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876917#comment-16876917
 ] 

bal commented on PDFBOX-4556:
-

Thanks in advance.

> 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, pdfImage1.pdf, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-02 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: pdfImage1.pdf

> 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, pdfImage1.pdf, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-02 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876916#comment-16876916
 ] 

bal commented on PDFBOX-4556:
-

hi , can you help me to create the appearance using  the a instead of the 
pagecontentstream?  The image is shown but the contents(signed 
by,name,locatioppearance streamn) are not shown even after changing the 0 0 0 
rg values to other values when i save the template .when i return the template 
as the inputstream and setting it to 
signatureoptions.setVisualSignature(templatestream) it doesn't show any 
appearance, it show image and the contents when open  the pdf with  the editor. 
i have implemented the previous code shared by you. I have attached pdf for 
your reference.

 

> 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, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-07-02 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: pdfImage.pdf)

> 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, png.png
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-28 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16874711#comment-16874711
 ] 

bal commented on PDFBOX-4556:
-

hi, thanks for your help. its working find with the png image so should i use 
the png instead of the jpeg image type.JPEG image working fine when not called 
the buildsignature()  and not  setting the signatureproperties to 
signatureoptions . Is it necessary to call buildsignature?  i have changed the 
contents color of the appearence stram to 1 1  1 rg but still its not visible? 
its present  in editor.

> 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: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-27 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16873880#comment-16873880
 ] 

bal commented on PDFBOX-4556:
-

hi , i agree but when i pass the image of jpeg type it throws the llegalstate 
exception at the buildsignature and  at the pdjpeg constructor  as i previously 
mentioned. I also agree that i have to write in the appearence stream instead 
of pagecontentstream but how could i add image to pdf without calling the 
pagecontentstream.drawImage() method? i have tried but image not added without 
this method. i have also tried to set  bounding box as below

BoundingBox box = new BoundingBox(0, 0, sigWidth, sigheight);
 PDRectangle pdRectangle = new PDRectangle(box);

form.setBBox(pdRectangle);

but my image and the signaturefield are on the different locations. I have one 
doubt, can we add the image and the contents in the appearencestream  using the 
xobjects  in the resources instead of calling drawImage method of the 
pagecontentstream? I have just want to show the image and some contents in the 
signaturefield or the inserted blankbox the same way you did by editing the 
given pdf.

> 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
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-27 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: as_TobeSigned.pdf)

> 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
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-26 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16873165#comment-16873165
 ] 

bal commented on PDFBOX-4556:
-

hi , please find the attached pdfs one showing the image and another not 
showing when i  return the template as inputstream and setting it to 
signatureOptions.setVisualSignature(inputstream of pdf template). i want to 
show the image and the static appearence of the contents on the inserted pdfbox 
in the pdf.But current scenario  my image and the inserted pdfbox are on 
different locations. please find the below code i am using. how to draw an 
image without the use of the pagecontentstream ? is it possible?

code .

PDDocument doc = new PDDocument();
 PDPage page = new 
PDPage(((PDPage)(signedDocument.getDocumentCatalog().getAllPages().get(0))).findMediaBox());
 //PDPage page = new PDPage();
 doc.addPage(page);

float x = (float)xCo_ordinates;
 float y = (float)yCo_ordinates;
 float sigWidth = (float)signatureWidth;
 float sigheight = (float)signatureHeight;

ByteArrayOutputStream baos = new ByteArrayOutputStream();

PDAcroForm acroForm = new PDAcroForm(doc);
 doc.getDocumentCatalog().setAcroForm(acroForm);
 doc.getDocumentCatalog().getCOSObject().setNeedToBeUpdate(true);

PDSignatureField signatureField = new PDSignatureField(acroForm);
 acroForm.getFields().add(signatureField);
 List acroFormFields = acroForm.getFields();
 acroForm.setFields(acroFormFields);
 acroForm.getCOSObject().setDirect(true);
 acroForm.getCOSObject().setNeedToBeUpdate(true);

PDAnnotationWidget widget = signatureField.getWidget();
 widget.getCOSObject().setNeedToBeUpdate(true);
 widget.setRectangle(pdRectangle);
 widget.setPage(page);

PDStream pdfstream = new PDStream(doc);
 pdfstream.getCOSObject().setNeedToBeUpdate(true);
 PDXObjectForm form = new PDXObjectForm(pdfstream);
 form.getCOSObject().setNeedToBeUpdate(true);

PDFont font = PDType1Font.HELVETICA;
 PDResources resources = new PDResources();
 resources.addFont(font);
 Map pageFonts = resources.getFonts();
 resources.setFonts(pageFonts);
 resources.getCOSObject().setNeedToBeUpdate(true);
 form.setResources(resources);
 form.setFormType(1);
 // PDRectangle bbox = new PDRectangle(pdRectangle.getWidth(), 
pdRectangle.getHeight());
 //float height = bbox.getHeight();
 form.setBBox(pdRectangle);

PDAppearanceDictionary appearanceDictionary = new PDAppearanceDictionary();
 appearanceDictionary.getCOSObject().setDirect(true);
 appearanceDictionary.getCOSObject().setNeedToBeUpdate(true);
 PDAppearanceStream appearanceStream = new 
PDAppearanceStream(form.getCOSStream());
 appearanceStream.getCOSObject().setNeedToBeUpdate(true);
 appearanceDictionary.setNormalAppearance(appearanceStream);
 
 PDXObjectImage imgxobj = null;
 imagefile = new java.io.File(tickImagePath);
 BufferedImage bufferedImage = null;
 bufferedImage = ImageIO.read(imagefile);
 imgxobj = new PDPixelMap(doc, bufferedImage);
 int imgHeight = imgxobj.getHeight();
 int imgWidth = imgxobj.getWidth();

resources.addFont(font, "F0"); // exact key
 PDXObject xobj = imgxobj;
 OutputStream os = form.getCOSStream().createFilteredStream();
 os.write(Encoding.UTF8.GetBytes("0 0 0 rg\n" +
 "150 150 150 150 re\n" +
 "f\n" +
 "q\n" + "" + imgHeight + " 0 0 " + imgWidth + " 0 0 cm\n" +
 " /Im0 Do\n" +
 "Q\n" +
 "q\n" +
 "Q\n" +
 "/F0 10 Tf\n" +
 "BT\n" +
 " (signed By:) Tj\n" +
 " (Name:name) Tj\n" +
 " (Location:location) Tj\n" +
 " (Reason:reason) Tj\n" +
 "ET"));
 os.close();

//resources.addXObject(xobj, "Im"); // just prefix
 resources.addXObject(new PDJpeg(doc, new FileInputStream(tickImagePath)), 
"Im");
 widget.setAppearance(appearanceDictionary);
 try
 {
if (false)
 {
 PDPageContentStream pagecontentStream = new PDPageContentStream(doc, page, 
true, false);
 pagecontentStream.setNonStrokingColor(java.awt.Color.pink);
 pagecontentStream.addRect(x, y, sigWidth, sigheight);
 int windingRule = PathIterator.WIND_NON_ZERO;

 pagecontentStream.drawImage(imgxobj, 150, 150);
 pagecontentStream.saveGraphicsState();
 pagecontentStream.restoreGraphicsState();
 float fontSize = 8;
 float leading = fontSize * 1.0f;
 pagecontentStream.setFont(font, leading);
 pagecontentStream.beginText();
 pagecontentStream.moveTextPositionByAmount(155, 590);

 {
 pagecontentStream.drawString("Digitally signed By:");
 pagecontentStream.drawString("Nname:");
 }

 {
 pagecontentStream.drawString("Lnocation:");
 }

 {
 pagecontentStream.drawString("Rneason:");
 }
 pagecontentStream.endText();
 pagecontentStream.close();
 }
 }
 catch (System.Exception ex)
 {
 ex.StackTrace.ToString();
 }

 List annotations = new ArrayList();
 annotations.add(widget);
 page.setAnnotations(annotations);

 doc.save(baos);
 doc.close(); 
 return new ByteArrayInputStream(baos.toByteArray());

 

 

 

> how the visual representation of the signature is achieved  
> 
>
> Key: 

[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-26 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: as_TobeSigned.pdf

> 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: as_TobeSigned.pdf, pdfImage-modified-by-tilman.pdf, 
> pdfImage.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-26 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: pdfImage.pdf

> 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: as_TobeSigned.pdf, pdfImage-modified-by-tilman.pdf, 
> pdfImage.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-26 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: pdfImage.pdf)

> 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
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-26 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: npe at adappearence dictionary.txt)

> 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
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-26 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: image  error stacktrace.txt)

> 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: npe at adappearence dictionary.txt, 
> pdfImage-modified-by-tilman.pdf, pdfImage.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-25 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16872311#comment-16872311
 ] 

bal commented on PDFBOX-4556:
-

hi,

I am able to show the image in the template when i am saving it, but when 
return the template as inputstream and  assign it with 
{{signatureOptions.setVisualSignature(inputStream)}}  it does not show the 
image and  the hard coded appearence i.e signed by etc . i am not able to set 
bounding box also. Thanks in advance.

> 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: image  error stacktrace.txt, npe at adappearence 
> dictionary.txt, pdfImage-modified-by-tilman.pdf, pdfImage.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: pdfAnnotation.pdf)

> 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: image  error stacktrace.txt, npe at adappearence 
> dictionary.txt, pdfImage-modified-by-tilman.pdf, pdfImage.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: (was: visibleSignature.pdf)

> 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: image  error stacktrace.txt, npe at adappearence 
> dictionary.txt, pdfAnnotation.pdf, pdfImage-modified-by-tilman.pdf, 
> pdfImage.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-20 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: pdfImage.pdf

> 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: image  error stacktrace.txt, npe at adappearence 
> dictionary.txt, pdfAnnotation.pdf, pdfImage.pdf, visibleSignature.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-20 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16868492#comment-16868492
 ] 

bal commented on PDFBOX-4556:
-

hi ,its working now able to add the jpeg  image in PDF. I want to show some  
text or image on the inserted blankbox in pdf ? How  it will work to generate 
valid signed pdf using pkcs7 signature?currently my text and image are outside  
of  the blankbox ?  Is it possible to hard code these values  on the blank box 
?  can you please explain the appearance stream must be written the hard way i 
can not see any visual representation for this . please find the attached  
generated PDF  for this.

> 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: image  error stacktrace.txt, npe at adappearence 
> dictionary.txt, pdfAnnotation.pdf, visibleSignature.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-19 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16867656#comment-16867656
 ] 

bal commented on PDFBOX-4556:
-

hi, thanks for your support. I have tried with your code, using  jpeg image it 
throws the  exception. i have tried with below code. I have also wrote the 
appearance stream hard way as you mentioned but not got any visual 
representation for that. opening pdf with the editor able to see the same.  

PDXObjectImage imgxobj = null;

imagefile = new java.io.File(tickImage);
 BufferedImage bufferedImage = null;
 bufferedImage = ImageIO.read(imagefile);
 if (bufferedImage.getColorModel().getNumComponents() == 3)
 {
 PDDeviceRGB rgb = PDDeviceRGB.INSTANCE;
 imgxobj.setColorSpace(rgb);
 }
 if (bufferedImage.getColorModel().getNumComponents() == 1)
 {
 PDDeviceGray gray = new PDDeviceGray();
 imgxobj.setColorSpace(gray);
 }

float compression = 0.75f;
 imgxobj = new PDJpeg(doc, bufferedImage, compression);

 

below is the stacktrace for the exception at above line

at org.apache.pdfbox.util.JPEGUtil.updateMetadata(IIOMetadata , Int32 )
 at org.apache.pdfbox.util.ImageIOUtil.writeImage(BufferedImage image, String 
formatName, OutputStream output, Int32 dpi, Single quality)
 at 
org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg.createImageStream(PDDocument 
, BufferedImage , Single )
 at org.apache.pdfbox.pdmodel.graphics.xobject.PDJpeg..ctor(PDDocument doc, 
BufferedImage bi, Single compressionQuality)

 

> 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: image  error stacktrace.txt, npe at adappearence 
> dictionary.txt, pdfAnnotation.pdf, visibleSignature.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-18 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: npe at adappearence dictionary.txt
image  error stacktrace.txt

> 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: image  error stacktrace.txt, npe at adappearence 
> dictionary.txt, pdfAnnotation.pdf, visibleSignature.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-18 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866387#comment-16866387
 ] 

bal commented on PDFBOX-4556:
-

hi, when i am passing jpeg image  i am getting the illegal state exception at 
the PDVisibleSigProperties.buildsignature() method . please refer attached 
image  error stacktrace.txt file for stacktrace. Also getting the NPE at the 
pdappearencedictionary , i  checked with the pdfxobjectform but its not null . 
refer the attached npe at adappearence dictionary.txt file for stacktrace.

 

> 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: pdfAnnotation.pdf, visibleSignature.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-17 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: pdfAnnotation.pdf

> 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: pdfAnnotation.pdf, visibleSignature.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-17 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4556:

Attachment: visibleSignature.pdf

> 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: pdfAnnotation.pdf, visibleSignature.pdf
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Comment Edited] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-17 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16865554#comment-16865554
 ] 

bal edited comment on PDFBOX-4556 at 6/17/19 12:28 PM:
---

hi, as you said i have tried with the 5 line code as you suggested and 
visibleSignature.pdf is generated, i am attaching the PDF for you reference. 
only blank box with no  visual representation of the signature is shown in pdf 
but when i open that pdf with notepad++ i have seen the image then why it is 
not showing visually? i  tried  to create  the template PDF as in 
createvisualsignature2 example but getting null pointer exception at the the 
PDAppearanceDictionary see below code

PDAppearanceDictionary appearance = new PDAppearanceDictionary();
 appearance.getCOSObject().setDirect(true);
 PDAppearanceStream appearanceStream = new PDAppearanceStream 
(form.getCOSStream());
 appearance.setNormalAppearance(appearanceStream);
 widget.setAppearance(appearance); 

Also getting the same error "Could not read all needed objects from template" 
at the addsignature when i return the template as inputstream. I have checked  
with the debugging that annotation and signaturefield is set with the acroform 
but i am not sure it is set or not. I have attached the pdf with name 
"pdfAnnotation.pdf" for this. please check and let me know if annotation and 
signaturefield is set or not with the acroform. can i go with the 
implementation of the PDFTemplateBuilder, PDVisibleSigBuilder for the visual 
representation of the signature will it work?

 

 


was (Author: bal@123):
hi, as you said i have tried with the 5 line code as you suggested and 
visibleSignature.pdf is generated, i am attaching the PDF for you reference. 
only blank box with no  visual representation of the signature is shown in pdf 
but when i open that pdf with notepad++ i have seen the image then why it is 
not showing visually? i  tried  to create  the template PDF as in 
createvisualsignature2 example but getting null pointer exception at the the 
PDAppearanceDictionary see below code

PDAppearanceDictionary appearance = new PDAppearanceDictionary();
appearance.getCOSObject().setDirect(true);
PDAppearanceStream appearanceStream = new 
PDAppearanceStream(form.getCOSStream());
appearance.setNormalAppearance(appearanceStream);
widget.setAppearance(appearance); 

Also getting the same error "Could not read all needed objects from template" 
at the addsignature when i return the template as inputstream. I have checked  
with the debugging that annotation and signaturefield is set with the acroform 
but i am not sure it is set or not. I have attached the pdf with name 
"pdfAnnotation.pdf" for this. please check and let me know if annotation and 
signaturefield is set or not with the acroform. 

 

 

> 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
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-17 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16865554#comment-16865554
 ] 

bal commented on PDFBOX-4556:
-

hi, as you said i have tried with the 5 line code as you suggested and 
visibleSignature.pdf is generated, i am attaching the PDF for you reference. 
only blank box with no  visual representation of the signature is shown in pdf 
but when i open that pdf with notepad++ i have seen the image then why it is 
not showing visually? i  tried  to create  the template PDF as in 
createvisualsignature2 example but getting null pointer exception at the the 
PDAppearanceDictionary see below code

PDAppearanceDictionary appearance = new PDAppearanceDictionary();
appearance.getCOSObject().setDirect(true);
PDAppearanceStream appearanceStream = new 
PDAppearanceStream(form.getCOSStream());
appearance.setNormalAppearance(appearanceStream);
widget.setAppearance(appearance); 

Also getting the same error "Could not read all needed objects from template" 
at the addsignature when i return the template as inputstream. I have checked  
with the debugging that annotation and signaturefield is set with the acroform 
but i am not sure it is set or not. I have attached the pdf with name 
"pdfAnnotation.pdf" for this. please check and let me know if annotation and 
signaturefield is set or not with the acroform. 

 

 

> 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
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-14 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16863998#comment-16863998
 ] 

bal commented on PDFBOX-4556:
-

hi , i have tried  with the createvisiblesignature and createvisiblesignature2 
examples but its now working with the pdfbox 1.8. Getting the  error " all 
needed objects can not read from the template " at the addsignature method  as 
mentioned in the above code. Is visual signature representation is possible 
with the PdvisiblesigBuilder implementation?  please guide, you can  refer 
below stacktrace if needed.

at org.apache.pdfbox.pdmodel.PDDocument.addSignature(PDSignature sigObject, 
SignatureInterface signatureInterface, SignatureOptions options)

> 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
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-11 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16860965#comment-16860965
 ] 

bal commented on PDFBOX-4556:
-

I am using pdfbox version 1.8.

> 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
>Reporter: bal
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-06-11 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16860769#comment-16860769
 ] 

bal commented on PDFBOX-4556:
-

is BouncyCastleProvider is used for visual representation  of the signature? 
how it works for the c# ? the create visible signature example uses this for 
visual representation of the signature? please guide for the visual 
representation of the signature.

 

> 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
>Reporter: bal
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-05-29 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16851533#comment-16851533
 ] 

bal commented on PDFBOX-4556:
-

Hi tilman,

can you please guide how the stamping on PDF is achieved using the pdfbox? i 
want to show some image or text on the PDF when it is signed. i am using below 
code to show the visual representation of the signature.i am reading the  the 
inputstream returned from the method and set it to 
signatureoptions.setVisualSignature to read it. Also  attaching the stacktrace  
please let me know where i am doing wrong?

getting null pointer exception 

stacktrace :

at org.apache.pdfbox.pdfwriter.COSWriter.visitFromStream(COSStream obj)
 at org.apache.pdfbox.cos.COSStream.accept(ICOSVisitor visitor)
 at org.apache.pdfbox.pdfwriter.COSWriter.doWriteObject(COSBase obj)
 at org.apache.pdfbox.pdfwriter.COSWriter.doWriteBody(COSDocument doc)
 at org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSDocument doc)
 at org.apache.pdfbox.cos.COSDocument.accept(ICOSVisitor visitor)
 at org.apache.pdfbox.pdfwriter.COSWriter.write(PDDocument doc)
 at org.apache.pdfbox.pdmodel.PDDocument.save(OutputStream output)
 at PdfBox.ResponseDigest.createVisualSignatureTemplate(PDDocument signedDoc, 
Int32 stampingPage, String tickImagePath, String name, String location, String 
reason, Int32 xCo_ordinates, Int32 yCo_ordinates, Int32 signatureHeight, Int32 
signatureWidth) in D:\balasaheb\Esign 
2.1Try\PdfBoxTest\PdfBox\PdfBox\ResponseDigest.aspx.cs:line 466

---

SignatureOptions signatureoptions = new SignatureOptions();

signatureoptions.setVisualSignature(createVisualSignatureTemplate(signedDocument,
 pageNo, tickImagePath, name, location, reason, xCo_ordinates, yCo_ordinates, 
signatureHeight, signatureWidth));

please find the method 

private InputStream createVisualSignatureTemplate(PDDocument signedDoc, int 
stampingPage, string tickImagePath, string name, string location, string 
reason, int xCo_ordinates, int yCo_ordinates, int signatureHeight, int 
signatureWidth)
 {
 java.io.File imageFile = new java.io.File(tickImagePath);
 PDPage page = 
(PDPage)signedDoc.getDocumentCatalog().getAllPages().get(stampingPage - 1);
 float x = (float)xCo_ordinates;
 float y = (float)yCo_ordinates;
 float sigWidth = (float)signatureWidth;
 float sigheight = (float)signatureHeight;


 ByteArrayOutputStream baos = new ByteArrayOutputStream();

try
 {

 Rectangle2D humanRectangle = new Rectangle2D.Float(xCo_ordinates, 
yCo_ordinates, signatureWidth, signatureHeight);
 // create signature rectangle
 PDRectangle pdRectangle = null;
 if (pdRectangle == null)
 {
 pdRectangle = createSignatureRectangle(signedDoc, humanRectangle, 
stampingPage);
 }

 PDAcroForm acroForm = new PDAcroForm(signedDoc);
 signedDoc.getDocumentCatalog().setAcroForm(acroForm);
 signedDoc.getDocumentCatalog().getCOSObject().setNeedToBeUpdate(true);

 PDSignatureField signatureField = new PDSignatureField(acroForm);
 List acroFormFields = new List();
 acroForm.getCOSObject().setDirect(true);
 acroForm.getCOSObject().setNeedToBeUpdate(true);
 acroFormFields.Add(signatureField);
 signatureField.getCOSObject().setNeedToBeUpdate(true);

 PDAnnotationWidget Widget = new PDAnnotationWidget();
 //PDAnnotation Widget = 
PDAnnotation.createAnnotation(signedDoc.getDocumentCatalog().getCOSObject());
 Widget.getCOSObject().setNeedToBeUpdate(true);
 Widget.setRectangle(pdRectangle);
 Widget.setPage(page);

 PDStream pdfstream = new PDStream(signedDoc);
 pdfstream.getCOSObject().setNeedToBeUpdate(true);
 PDXObjectForm form = new PDXObjectForm(pdfstream);
 form.getCOSObject().setNeedToBeUpdate(true);
 // set resources to xobj
 PDResources resources = new PDResources();
 resources.getCOSObject().setNeedToBeUpdate(true);
 PDFont font = PDType1Font.HELVETICA;

 form.setResources(resources);
 form.setFormType(1);
 PDRectangle bbox = new PDRectangle(pdRectangle.getWidth(), 
pdRectangle.getHeight());
 float height = bbox.getHeight();
 form.setBBox(pdRectangle);
PDAppearanceDictionary appearanceDictionary = new 
PDAppearanceDictionary(signedDoc.getDocumentCatalog().getCOSDictionary());
 appearanceDictionary.getCOSObject().setDirect(true);
 appearanceDictionary.getCOSObject().setNeedToBeUpdate(true);
 PDAppearanceStream appearanceStream = new 
PDAppearanceStream(form.getCOSStream());
 appearanceStream.getCOSObject().setNeedToBeUpdate(true);
appearanceDictionary.setNormalAppearance(appearanceStream);
 Widget.setAppearance(appearanceDictionary);
 try
 {
 PDPageContentStream pagecontentStream = new PDPageContentStream(signedDoc, 
page, true, false);
 pagecontentStream.setNonStrokingColor(java.awt.Color.black);
 pagecontentStream.addRect(x, y, sigWidth, sigheight);
 int windingRule = PathIterator.WIND_NON_ZERO;
 pagecontentStream.fill(windingRule);
PDXObjectImage imgobj 

[jira] [Created] (PDFBOX-4556) how the visual representation of the signature is achieved

2019-05-29 Thread bal (JIRA)
bal created PDFBOX-4556:
---

 Summary: 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
Reporter: bal






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2019-05-29 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16850887#comment-16850887
 ] 

bal commented on PDFBOX-4312:
-

i want visual representation of the signature. i want to show the the signature 
properties values i.e signer name,reason  in the blankbox. i have tried with 
below code but getting null pointer exception . please let me know where i am 
wrong

 

PDAcroForm acroForm = new PDAcroForm(signedDoc);
 signedDoc.getDocumentCatalog().setAcroForm(acroForm);
 signedDoc.getDocumentCatalog().getCOSObject().setNeedToBeUpdate(true);

 PDSignatureField signatureField = new PDSignatureField(acroForm);
 List acroFormFields = new List();
 acroForm.getCOSObject().setDirect(true);
 acroForm.getCOSObject().setNeedToBeUpdate(true);
 acroFormFields.Add(signatureField);
 signatureField.getCOSObject().setNeedToBeUpdate(true);

PDAnnotationWidget Widget = new PDAnnotationWidget();


 Widget.getCOSObject().setNeedToBeUpdate(true);
 Widget.setRectangle(pdRectangle);
 Widget.setPage(page);

 PDStream pdfstream = new PDStream(signedDoc);
 pdfstream.getCOSObject().setNeedToBeUpdate(true);
 PDXObjectForm form = new PDXObjectForm(pdfstream);
 form.getCOSObject().setNeedToBeUpdate(true);

 PDResources resources = new PDResources();
 resources.getCOSObject().setNeedToBeUpdate(true);
 PDFont font = PDType1Font.HELVETICA;
resources.addFont(font);
 form.setResources(resources);
 form.setFormType(1);
 PDRectangle bbox = new PDRectangle(pdRectangle.getWidth(), 
pdRectangle.getHeight());
 float height = bbox.getHeight();
 form.setBBox(pdRectangle);

 PDAppearanceDictionary appearanceDictionary = new 
PDAppearanceDictionary(signedDoc.getDocumentCatalog().getCOSDictionary());
 appearanceDictionary.getCOSObject().setDirect(true);
 appearanceDictionary.getCOSObject().setNeedToBeUpdate(true);
 PDAppearanceStream appearanceStream = new 
PDAppearanceStream(form.getCOSStream());
 appearanceStream.getCOSObject().setNeedToBeUpdate(true);

 appearanceDictionary.setNormalAppearance(appearanceStream);
 Widget.setAppearance(appearanceDictionary);
 try
 {
 PDPageContentStream pagecontentStream = new PDPageContentStream(signedDoc, 
page, true, false);
 pagecontentStream.setNonStrokingColor(java.awt.Color.black);
 pagecontentStream.addRect(x, y, sigWidth, sigheight);
 int windingRule = PathIterator.WIND_NON_ZERO;
 pagecontentStream.fill(windingRule);
 PDXObjectImage imgobj = null;
 imgobj = new PDJpeg(signedDoc, new FileInputStream(tickImagePath));

pagecontentStream.drawImage(imgobj, x, y);
 pagecontentStream.saveGraphicsState();

 pagecontentStream.restoreGraphicsState();

float fontSize = 8;
 float leading = fontSize * 1.0f;
 pagecontentStream.beginText();

if (!string.IsNullOrEmpty(name))
 {
 pagecontentStream.drawString("signed By:");
 pagecontentStream.drawString("Name:" + name);
 }
 if (!string.IsNullOrEmpty(location))
 pagecontentStream.drawString("Location:" + location);
 if (!string.IsNullOrEmpty(reason))
 pagecontentStream.drawString("Reason:" + reason);
 pagecontentStream.endText();
 pagecontentStream.close();

 ByteArrayOutputStream baos = new ByteArrayOutputStream();

signedDoc.save(baos);

 return new ByteArrayInputStream(baos.toByteArray());

}

 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Assignee: Tilman Hausherr
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: image-2019-05-14-16-27-40-794.png
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2019-05-14 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16839317#comment-16839317
 ] 

bal commented on PDFBOX-4312:
-

Hi Tilman,

Thanks a lot for your valuable feedbacks. Now i am able to sign the pdf with 
pkcs 7 signature using the pdfbox 1.8.9 dll with ikvm in .net. but when i open 
the pdf using adobe it is showing 

 signature is invalid. It shows error Document has been altered or corrupted 
since it was signed. please find attached screenshot for reference.

!image-2019-05-14-16-27-40-794.png!

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Assignee: Tilman Hausherr
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: image-2019-05-14-16-27-40-794.png
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2019-05-14 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16839318#comment-16839318
 ] 

bal commented on PDFBOX-4312:
-

please let me know where i am doing wrong.

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Assignee: Tilman Hausherr
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: image-2019-05-14-16-27-40-794.png
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2019-05-14 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: image-2019-05-14-16-27-40-794.png

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Assignee: Tilman Hausherr
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: image-2019-05-14-16-27-40-794.png
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-11-02 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16672888#comment-16672888
 ] 

bal commented on PDFBOX-4312:
-

hi tilman,

 Is there any bug related to addsignature() method in pdfbox 1.8 dll in my case 
it is inserting the signature with byte range offsets at the end of the pdf. It 
only inserting the trailing 0's in contents with the byte range reserved space 
i tried to insert with the byte range calculation but won't work. thanks.

 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Assignee: Tilman Hausherr
>Priority: Major
> Fix For: 1.8.17
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-11-01 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16671229#comment-16671229
 ] 

bal commented on PDFBOX-4312:
-

signing will only work if you calculate the signature from the input stream at 
the time sign() is called. can u please explain i am not getting it .???

actually when i used the pdsignature.setcontents(signaturebytes)  it is 
inserting the signature at proper byte range i.e within the contents in hex 
form without trailing 0's but when used addsignature method it only add 
trailing 0's and signature is getting inserted at end of the pdf. thanks.

 

  

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: The same error i am seeing after the improved code . signed by unknown 
please see the attached file.

 

 

 

 )

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: My signature  is getting inserted at the end of the pdf . so i think my 
signature is getting invalid. any way to control the insertion of the signature 
at the proper offset  of the byte range array.

 )

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: [^testingSigned_Final.pdf])

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: Signature is getting inserted when i returned it from sign method. But 
still there is signed by unknown instead of name of the person signing the 
document.  any update code is posted upward.

thanks in advance

 

 )

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: I tried it manually but it does not work with notepad++. You said to use 
pdfbox 2.0.12 but the dll is not available  for pdfbox 2.0.12 then how it will 
work in. Net any other way. Thanks. )

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: the pdf is same as above attached.)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: please find attached PDF  for reference. instead of signed by unknown i 
want to show signed by name of the person signing that document.  !Screenshot 
(30).png!)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: On Tue 23 Oct, 2018, 12:45 AM Tilman Hausherr (JIRA), 

)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: can u suggest how to write the tool in .net c++ because i am not familiar 
with the c++. is there any other  way ? dll for pdfbox 2.0.12 id not available 
then how can i use pdfbox 2.0.12 that work properly for incremental updates. 
thanks in advance.)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: I have tried it but its not working the output is pos = 0 any other way 
to insert the signature at proper offset of the byte range array.)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: please see the attached signed pdf i want to show only one name please 
suggest some solution on priority

 

!Screenshot (31).png!)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16662087#comment-16662087
 ] 

bal commented on PDFBOX-4312:
-

please delete the upper two uploaded pdf file . i am not able to do it. 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-24 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16661963#comment-16661963
 ] 

bal commented on PDFBOX-4312:
-

public byte[] sign(InputStream @is)
 {
    InputStream ipstream = @is;

     byte[] pdf = null;

 

     pdf = docSigDict["doc"];

    return pdf;
 }

whats looks wrong in sign method i am just calculating signature bytes from 
response and returning it from sign method. Is there any way to insert the 
signature at proper byte range offset so that my signature gets valid. thanks.

 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: Actually i am getting response from uidai which contains user 
information.This response is in xml format. please see attached xml for ref. I 
am fetching docsignature containing user data from aadhar.This is base 64 
encoded data i am converting this data to byte array .As you mentioned i am 
returning this byte array from sign method. But my signature is not inserting 
in blank signature field. what may be the reasons for this ? whats wrong i am 
doing please reply.

 

[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: I am signing pdf using external *pkcs 7*  signature with pdfbox 1.8.9 in 
.net. I have set all signatureproperties.I have *converted the base64 encoded 
signature in pkcs7 format to byte array by casting the responsexml to object. 
The byte array size is 2911 and i am passing this byte array to sign method 
which is called through saveincremental method*.but when i open pdf it shows me 
signed by unknown . when i expand this it show me there are *errors in the 
formatting or information contained in the signature.* please find below my 
code what is wrong in code ?? thanks in advance.
{code:java}
protected void Page_Load(object sender, EventArgs e)
{

string elemString = "";
string pdfPath = @"D:\balasaheb\esign_file_demo\testing.pdf";
float xCo_ordinates = 150;
float yCo_ordinates = 400;
float signatureWidth = 250;
float signatureHeight = 100;
string nameToShowOnSignatureStamp = "Sushrut Sathe";
string locationToShowOnSignatureStamp = "Latur";
string reasonForSign = "Testing";
string pdfPassword = "";
string txn = "";
int log_err = 1;
int stampingPage = 1;

string pdfname = System.IO.Path.GetFileName(pdfPath);

string pdfDirectory = System.IO.Path.GetDirectoryName(pdfPath);
string pdf = System.IO.Path.GetFileNameWithoutExtension(pdfPath);

string outputFinalPdfDir = pdfDirectory;
//string responseXml = 
System.IO.File.ReadAllText(@"D:\balasaheb\esign_file_demo\testing_responseXML.txt");
string responseXml = 
System.IO.File.ReadAllText(@"D:\balasaheb\esign_file_demo\responsexml.txt");
// Response XML Digest 
//
// string responseXml = Request["msg"].ToString();

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(responseXml);

XmlNodeList elemList = xmlDoc.GetElementsByTagName("DocSignature");
XmlNodeList esignResp = xmlDoc.GetElementsByTagName("EsignResp");

//string responseDocText = "Responsexml.txt";

foreach (XmlElement elem in esignResp) // elemList)
{
// elemString = elem.InnerText;
string respStr = elem.OuterXml;
// using (StreamWriter sw = new StreamWriter(pdfDirectory + "\\" + 
responseDocText))
// {
// sw.Write(responseXml);
// sw.Close();
// }
//}

// signature to byte array conversion
byte[] signatureByte = Convert.FromBase64String(elemString);

//byte sigarr = Convert.ToByte(elemString);

// byte[] bytes = Encoding.UTF8.GetBytes(elemString);
// byte[] sigarr = integersToBytes(signatureByte);

byte[] sigbyts = System.Text.Encoding.UTF8.GetBytes(elemString);

//using java conversion method

byte[] bytes = Base64.encode(elemString.getBytes());

byte[] name = Base64.encode(elemString.getBytes());

byte[] decodedString = elemString.getBytes("UTF-8");

string docStr = Convert.ToBase64String(signatureByte);
// conversion ascii
byte[] asciiBytes = Encoding.ASCII.GetBytes(docStr);

//decode and convert to byte array
byte[] docBytes = Convert.FromBase64String(elemString);

//string DocStr = Encoding.UTF8.GetString(docBytes);

//byte[] docbytes = Encoding.UTF8.GetBytes(DocStr);

// string docSig = Convert.ToBase64String(docBytes);

EsignResponse resp = new EsignResponse();
// resp.getClass();

XmlObjectConverter xmlobj = new XmlObjectConverter();
EsignResponse fg = (EsignResponse)xmlobj.XmlToObject(resp, responseXml);

byte[] docsig = fg.Signatures.DocSignature.docBytes;

// string str = System.Text.ASCIIEncoding.ASCII.GetString(docsig);
//store sigbytes to dictionary
docSigDict.Add("doc", docsig);

java.io.File inPutPdf = new java.io.File(pdfPath);

string inPutPdfName = inPutPdf.getName();

FileInputStream fis = new FileInputStream(inPutPdf);
// byte[] byteArray = null;

InputStream inputStream = new FileInputStream(inPutPdf);

System.String inputStreamToString = inputStream.toString();

inputStream.close();

//java.io.File outPutPdf = new java.io.File(pdfDirectory + "\\" + pdf + 
"Signed_Final.pdf");
//FileOutputStream fos = new FileOutputStream(outPutPdf);

//org.apache.pdfbox.io.IOUtils.copy(fis, fos);
//fis.close();


PDDocument signedDoc = PDDocument.load(pdfDirectory + "\\" + "testing.pdf");
signedDoc.getDocument().getTrailer().removeItem(COSName.TYPE);

int pages = signedDoc.getNumberOfPages();

string tickImagePath = @"D:\balasaheb\tick.jpg";

FileInputStream tickImageStream = new FileInputStream(tickImagePath);


List documentIds = new List();

List calTimeStamp = new List();

BoundingBox box = new BoundingBox();

PDRectangle Rect = new PDRectangle(box);

java.util.Calendar cal = java.util.GregorianCalendar.getInstance();
SimpleDateFormat sd = new SimpleDateFormat("MMdd_HHmmss");
string timeStamp = new 
SimpleDateFormat("MMdd_HHmmss").format(java.util.Calendar.getInstance().getTime());
cal.setTime(sd.parse(timeStamp));
cal.add(java.util.Calendar.MINUTE, 15);

System.Random 

[jira] [Issue Comment Deleted] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Comment: was deleted

(was: I have generated byte  array by deserializing the xml to object. The size 
of byte array for docsignature element i am getting is 2911 belowis the code 
for that.I am storing this byte array to docSigDict dictionary and retriving 
this value to assign to byte array in sign method. yet my signature in not 
inserting in the blankbox please guide me it's very important to me to solve 
this issue .

 

public class XmlObjectConverter
 {
 //fields
 private XmlSerializer Serializer;
 private XmlSerializer Deserializer;
 string XmlString = "";


 //methods
 public XmlSerializer getSerializer()
 {
 return Serializer;
 }

public void setSerializer(XmlSerializer serializer)
 {
 this.Serializer = serializer;
 }

public XmlSerializer getDeserializer()
 {

return Deserializer;

}

public void setDeserializer(XmlSerializer deserializer)
 {
 this.Deserializer = deserializer;
 }

public String ObjectToXml(EsignResponse obj)
 {
 XmlSerializer serializer = new XmlSerializer(typeof(EsignResponse));

using (System.IO.StringWriter textWriter = new System.IO.StringWriter())
 {
 serializer.Serialize(textWriter, obj);
 return XmlString.ToString();
 }

}

public object XmlToObject(object obj, string XmlString)
 {
 XmlDocument xDoc = new XmlDocument();

xDoc.LoadXml(XmlString);

XmlSerializer serializer = new XmlSerializer(typeof(EsignResponse), new 
XmlRootAttribute("EsignResp"));
 MemoryStream stream = new MemoryStream();
 System.IO.StringWriter sw = new System.IO.StringWriter();
 sw.Write(XmlString);
 byte[] bytes = Encoding.UTF8.GetBytes(XmlString);
 //MemoryStream xmlStream = new MemoryStream(bytes);
 MemoryStream output = new MemoryStream(bytes);
 obj = serializer.Deserialize(output);

return obj;
 }

 

 )

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: (was: testingSignature.pdf)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: (was: testingSignature.pdf)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: (was: Screenshot (31).png)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: (was: Screenshot (31).png)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: (was: Screenshot (30).png)

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (31).png, Screenshot (31).png, 
> testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16660191#comment-16660191
 ] 

bal commented on PDFBOX-4312:
-

can u suggest how to write the tool in .net c++ because i am not familiar with 
the c++. is there any other  way ? dll for pdfbox 2.0.12 id not available then 
how can i use pdfbox 2.0.12 that work properly for incremental updates. thanks 
in advance.

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-23 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16660187#comment-16660187
 ] 

bal commented on PDFBOX-4312:
-

I tried it manually but it does not work with notepad++. You said to use pdfbox 
2.0.12 but the dll is not available  for pdfbox 2.0.12 then how it will work 
in. Net any other way. Thanks. 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-22 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16660118#comment-16660118
 ] 

bal commented on PDFBOX-4312:
-

On Tue 23 Oct, 2018, 12:45 AM Tilman Hausherr (JIRA), 



> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-22 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16658923#comment-16658923
 ] 

bal commented on PDFBOX-4312:
-

I have tried it but its not working the output is pos = 0 any other way to 
insert the signature at proper offset of the byte range array.

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-19 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16656730#comment-16656730
 ] 

bal commented on PDFBOX-4312:
-

My signature  is getting inserted at the end of the pdf . so i think my 
signature is getting invalid. any way to control the insertion of the signature 
at the proper offset  of the byte range array.

 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-17 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653066#comment-16653066
 ] 

bal commented on PDFBOX-4312:
-

[^testingSigned_Final.pdf]

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-17 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653001#comment-16653001
 ] 

bal commented on PDFBOX-4312:
-

the pdf is same as above attached.

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Comment Edited] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-16 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16652921#comment-16652921
 ] 

bal edited comment on PDFBOX-4312 at 10/17/18 4:17 AM:
---

The same error i am seeing after the improved code . signed by unknown please 
see the attached file.

 

 

 

 


was (Author: bal@123):
The same error i am seeing after the improved code . signed by unknown please 
see the attached file.

 

 

 

 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-16 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16652921#comment-16652921
 ] 

bal commented on PDFBOX-4312:
-

The same error i am seeing after the improved code . signed by unknown please 
see the attached file.

 

 

 

 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) Signature is not getting inserted into 00000 area

2018-10-03 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16636531#comment-16636531
 ] 

bal commented on PDFBOX-4312:
-

Signature is getting inserted when i returned it from sign method. But still 
there is signed by unknown instead of name of the person signing the document.  
any update code is posted upward.

thanks in advance

 

 

> Signature is not getting inserted into 0 area
> -
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Bug
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9, 1.8.15
>Reporter: bal
>Priority: Major
> Fix For: 1.8.17
>
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature-signed-SaveIncremental-1param-bad-cutoff.pdf, 
> testingSignature-signed-SaveIncremental-2param-good.pdf, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4312) byte array format to pass to sign method

2018-09-19 Thread bal (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16620504#comment-16620504
 ] 

bal commented on PDFBOX-4312:
-

please see the attached signed pdf i want to show only one name please suggest 
some solution on priority

 

!Screenshot (31).png!

> byte array format to pass to sign method
> 
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9
>Reporter: bal
>Priority: Major
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) byte array format to pass to sign method

2018-09-19 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: Screenshot (31).png

> byte array format to pass to sign method
> 
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9
>Reporter: bal
>Priority: Major
> Attachments: Screenshot (30).png, Screenshot (31).png, Screenshot 
> (31).png, testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Updated] (PDFBOX-4312) byte array format to pass to sign method

2018-09-19 Thread bal (JIRA)


 [ 
https://issues.apache.org/jira/browse/PDFBOX-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

bal updated PDFBOX-4312:

Attachment: Screenshot (31).png

> byte array format to pass to sign method
> 
>
> Key: PDFBOX-4312
> URL: https://issues.apache.org/jira/browse/PDFBOX-4312
> Project: PDFBox
>  Issue Type: Wish
>  Components: .NET, PDModel, Signing
>Affects Versions: 1.8.9
>Reporter: bal
>Priority: Major
> Attachments: Screenshot (30).png, Screenshot (31).png, 
> testingSignature.pdf, testingSignature.pdf
>
>
> Hi ,
> I want to sign pdf using signature in pkcs 7 format . I am converting pkcs 7 
> signature to byte array using Convert.FromBase64String method in .net . I am 
> passing this byte array to sign method in signature interface which gets 
> called after calling saveincremental. My byte array is inserting proper but 
> the name of which signature is not shown when i open pdf. May be my byte 
> conversion may not proper or something else i am doing wrong. please let me 
> know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



  1   2   >