[jira] [Comment Edited] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Hossam Hazem (JIRA)

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

Hossam Hazem edited comment on PDFBOX-3971 at 10/28/17 6:01 PM:


yes, you are right. removed removeByteArrayFromCOSArray, and replaced it and 
the for loop in removeKeyUsage with array.remove
and I need to add a check for null on the input before doing _new 
COSString(keyUsageExtension)_
---
added the patch.
for the null check, according to PDSignature
{code:java}
void setContents(byte[] bytes)
{code}

 it doesn't check it, it is logical to throw NPE and not to suppress it so left 
it unchecked.


was (Author: hossam-hazem):
yes, you are right. removed removeByteArrayFromCOSArray, and replaced it and 
the for loop in removeKeyUsage with array.remove
and I need to add a check for null on the input before doing _new 
COSString(keyUsageExtension)_
added the patch.
for the null check, according to PDSignature
{code:java}
void setContents(byte[] bytes)
{code}

 it doesn't check it, it is logical to throw NPE and not to suppress it so left 
it unchecked.

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java, PDSeedValueCertificate.patch
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Comment Edited] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Hossam Hazem (JIRA)

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

Hossam Hazem edited comment on PDFBOX-3971 at 10/28/17 6:00 PM:


yes, you are right. removed removeByteArrayFromCOSArray, and replaced it and 
the for loop in removeKeyUsage with array.remove
and I need to add a check for null on the input before doing _new 
COSString(keyUsageExtension)_
added the patch.
for the null check, according to PDSignature
{code:java}
void setContents(byte[] bytes)
{code}

 it doesn't check it, it is logical to throw NPE and not to suppress it so left 
it unchecked.


was (Author: hossam-hazem):
yes, you are right. removed removeByteArrayFromCOSArray, and replaced it and 
the for loop in removeKeyUsage with array.remove
and I need to add a check for null on the input before doing _new 
COSString(keyUsageExtension)_
will send a patch now after a general revise on the class.

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java, PDSeedValueCertificate.patch
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Updated] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Hossam Hazem (JIRA)

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

Hossam Hazem updated PDFBOX-3971:
-
Attachment: PDSeedValueCertificate.patch

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java, PDSeedValueCertificate.patch
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Hossam Hazem (JIRA)

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

Hossam Hazem commented on PDFBOX-3971:
--

yes, you are right. removed removeByteArrayFromCOSArray, and replaced it and 
the for loop in removeKeyUsage with array.remove
and I need to add a check for null on the input before doing _new 
COSString(keyUsageExtension)_
will send a patch now after a general revise on the class.

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-3971:
-

{code}
public void removeKeyUsage(String keyUsageExtension)
{code}
the parameter is unused, I assume something was lost in refactoring... how 
about just doing this:
{code}
array.remove(new COSString(keyUsageExtension));
{code}
removeByteArrayFromCOSArray and maybe others may be changed similarly.

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Hossam Hazem (JIRA)

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

Hossam Hazem commented on PDFBOX-3971:
--

Ok, thank you.
For the naming, my reasoning is the certificate is part of SeedValue class so 
SeedValue has the precedence in naming like PDSeedValueMDP and 
PDSeedValueTimeStamp; your call.

I will be available for testing if you need anything.



> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Comment Edited] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-3971 at 10/28/17 3:58 PM:
---

I've committed it to the trunk only for now, will do 2.0 near the end of the 
weekend in case there are changes. And just after committing, I realize that in 
the PDF specification, it is named "certificate seed value dictionary" and here 
it is named "PDSeedValueCertificate". Shouldn't we name it 
"PDCertificateSeedValue" to be synchronous to the PDF specification?

I also did some minor changes
- reformat
- made a field final
- have oid variables start with lowercase character (convention)



was (Author: tilman):
I've committed it to the trunk only for now, will do 2.0 near the end of the 
weekend in case there are changes. And just after committing, I realize that in 
the PDF specification, it is named "certificate seed value dictionary" and here 
it is named "PDSeedValueCertificate". Shouldn't we name it 
"PDCertificateSeedValue" to be synchronous to the PDF specification?

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Updated] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-3971:

Fix Version/s: 3.0.0
   2.0.8

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Comment Edited] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-3971 at 10/28/17 3:53 PM:
---

I've committed it to the trunk only for now, will do 2.0 near the end of the 
weekend in case there are changes. And just after committing, I realize that in 
the PDF specification, it is named "certificate seed value dictionary" and here 
it is named "PDSeedValueCertificate". Shouldn't we name it 
"PDCertificateSeedValue" to be synchronous to the PDF specification?


was (Author: tilman):
I've committed it to the trunc only for now, will do 2.0 near the end of the 
weekend in case there are changes. And just after committing, I realize that in 
the PDF specification, it is named "certificate seed value dictionary" and here 
it is named "PDSeedValueCertificate". Shouldn't we name it 
"PDCertificateSeedValue" to be synchronous to the PDF specification?

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-3971:
-

I've committed it to the trunc only for now, will do 2.0 near the end of the 
weekend in case there are changes. And just after committing, I realize that in 
the PDF specification, it is named "certificate seed value dictionary" and here 
it is named "PDSeedValueCertificate". Shouldn't we name it 
"PDCertificateSeedValue" to be synchronous to the PDF specification?

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Fix For: 2.0.8, 3.0.0
>
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3971:
-

Commit 1813641 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1813641 ]

PDFBOX-3971: add class and methods for certificate seed value dictionary, by 
Hossam Hazem

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Assigned] (PDFBOX-3971) Add Certificate Dictionary to seed value in signature field

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr reassigned PDFBOX-3971:
---

Assignee: Tilman Hausherr

> Add Certificate Dictionary to seed value in signature field
> ---
>
> Key: PDFBOX-3971
> URL: https://issues.apache.org/jira/browse/PDFBOX-3971
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Reporter: Hossam Hazem
>Assignee: Tilman Hausherr
>  Labels: documentation, features, newbie, patch, test
> Attachments: COSName.patch, PDSeedValue.patch, 
> PDSeedValueCertificate.java
>
>
> This dictionary is important as it gives the ability to put certificate 
> constraints on a signature field, like if you want signatures that are signed 
> by a specific issuer or authority to only be used in a field.
> currently tested Issuer constraint and it worked, acrobat reader ignores 
> other certificates and only allow the issuer given to sign the field. 
> documentation is not complete waiting for the initial acceptance to complete.
> new class PDSeedValueCertificate is added which refers to this certificate.
> PDSeedValue is modified to add the new dictionary.
> COSName is modified to add the new pdf names that are included in the 
> dictionary.
> reference for this dictionary can be found in PDF reference 1.7 section 
> 12.7.4.5 table 235 page 457 in here 
> http://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf
>  or chapter 8 table 8.84 page 700 in here 
> http://archimedespalimpsest.net/Documents/External/pdf_reference_1-7.pdf
> and in here
> https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf
> this is my first contribution, hope everything goes well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-3950:
-

I just did a test with the 48 files that had the missing resource exception to 
check whether a further but new exception would occur. The only exception that 
occured is the missing descendent font array that is caught.

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



Re: 2.0.8?

2017-10-28 Thread Tilman Hausherr

Am 27.10.2017 um 15:46 schrieb Allison, Timothy B.:

Results:

http://162.242.228.174/reports/pdfbox_2_0_7_Vs_2_0_8_take5.tar.gz


Haven't had a chance to review, nor have I had a chance to add the extra 
columns I promised. ☹


Thanks Tim!

I spent some time going through it and I'm satisfied. The new exceptions 
that are left are all with files that don't display in Adobe Reader. 
Same for the files with much less text, they are either "likely broken" 
or don't display in Adobe Reader. Re "new exceptions", 48 of them should 
be gone now with today's changes at the end of PDFBOX-3950.


Tilman






-Original Message-
From: Tilman Hausherr [mailto:thaush...@t-online.de]
Sent: Thursday, October 26, 2017 1:26 PM
To: dev@pdfbox.apache.org
Subject: Re: 2.0.8?

Am 26.10.2017 um 19:12 schrieb Andreas Lehmkuehler:

Thanks Tim, looked promising.

I'm planing to cut my second attempt next monday, if no one objects.

+1

Tilman


@Tim I don't expect any new regressions, but if you have some cycles,
you might kick of another run.

Andreas

Am 23.10.2017 um 20:11 schrieb Allison, Timothy B.:

Reports here:
http://162.242.228.174/reports/pdfbox_2_0_7_Vs_2_0_8_take4.tar.gz

I haven't looked yet.

-Original Message-
From: Andreas Lehmkuehler [mailto:andr...@lehmi.de]
Sent: Sunday, October 22, 2017 4:15 PM
To: dev@pdfbox.apache.org
Subject: Re: 2.0.8?

@Tim I've fixed the last open regression in 2.0.8, Tilmans test run
hasn't
showed any regression. Please re-run your tests again to see if we
can proceed
with 2.0.8, I'd really like to push it out.

TIA again,
Andreas


Am 08.10.2017 um 16:11 schrieb Andreas Lehmkuehler:

Am 03.10.2017 um 15:38 schrieb Allison, Timothy B.:

And yes, we need another regressions run if possible

Sounds good.  Will do once I hear that we're good to go. Thank you!

We are good now.

@Tim: Could you please re-run your test to see how good we are?

TIA,
Andreas


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



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



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



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



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



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


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




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



[jira] [Closed] (PDFBOX-3966) Operator not found in resources

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr closed PDFBOX-3966.
---
Resolution: Duplicate

Fixed in PDFBOX-3950 after finding that sometimes we get meaningful content 
(see the second attachment there).

> Operator not found in resources
> ---
>
> Key: PDFBOX-3966
> URL: https://issues.apache.org/jira/browse/PDFBOX-3966
> Project: PDFBox
>  Issue Type: Bug
>  Components: Text extraction
>Affects Versions: 2.0.7
>Reporter: Jorge Spinsanti
>
> I got an exception to extract HTML from PDF. Source PDF is not available.
> {code}
> Main cause:
>   org.apache.tika.exception.TikaException: Unable to extract PDF content
>   at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:139)
>   at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:167)
>   at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
>   at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
>   at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
>   
> Caused by: java.io.IOException: name for 'gs' operator not found in 
> resources: /R8
>   at 
> org.apache.pdfbox.contentstream.operator.state.SetGraphicsStateParameters.process(SetGraphicsStateParameters.java:54)
>   at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:838)
>   at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:495)
>   at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
>   at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
>   at 
> org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:139)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:391)
>   at org.apache.tika.parser.pdf.PDF2XHTML.processPage(PDF2XHTML.java:147)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)
>   at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:117)
>   ... 27 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3950:
-

Commit 1813606 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1813606 ]

PDFBOX-3950: adjust test for new exception

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3950:
-

Commit 1813607 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1813607 ]

PDFBOX-3950: adjust test for new exception

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3950:
-

Commit 1813605 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1813605 ]

PDFBOX-3950: avoid NPE or CCE

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3950:
-

Commit 1813604 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1813604 ]

PDFBOX-3950: avoid NPE or CCE

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3950:
-

Commit 1813602 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1813602 ]

PDFBOX-3950: be lenient if resource is missing

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3950:
-

Commit 1813601 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1813601 ]

PDFBOX-3950: be lenient if resource is missing

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Updated] (PDFBOX-3950) NPE in PageIterator.enqueueKids

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-3950:

Attachment: 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf

I'm being lenient on the missing /gs name too because it gives us an advantage 
in text extraction, see page 4 of attached file 
6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf. I'll have to adjust the test too and fix 
an NPE in font processing that happens with the original file (where my fix 
won't improve anything).

> NPE in PageIterator.enqueueKids
> ---
>
> Key: PDFBOX-3950
> URL: https://issues.apache.org/jira/browse/PDFBOX-3950
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.8
>Reporter: Tilman Hausherr
>Assignee: Andreas Lehmkühler
>  Labels: regression
> Fix For: 2.0.8, 3.0.0
>
> Attachments: 23EGDHXSBBYQLKYOKGZUOVYVNE675PRD.pdf, 
> 6MNJMPJVZMZRSTE5A4ENHP3F5SIOG27T.pdf
>
>
> {code}
> Exception in thread "main" java.lang.NullPointerException
>   at java.util.ArrayDeque.addLast(ArrayDeque.java:244)
>   at java.util.ArrayDeque.add(ArrayDeque.java:418)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:178)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.enqueueKids(PDPageTree.java:173)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:159)
>   at 
> org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.(PDPageTree.java:153)
>   at org.apache.pdfbox.pdmodel.PDPageTree.iterator(PDPageTree.java:123)
>   at 
> org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:282)
> {code}
> This worked in 2.0.7. There are about 200 occurences of this exception in the 
> tests by Tim.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3330) Enhance and update PDFBox website & documentation

2017-10-28 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3330:
-

Commit 804dc39015dc17e134cd449bc23ad8b21e75b8b3 in pdfbox-docs's branch 
refs/heads/master from [~msahyoun]
[ https://git-wip-us.apache.org/repos/asf?p=pdfbox-docs.git;h=804dc39 ]

PDFBOX-3330: add Sebastian Holder, Carolin Köhler and Matthäus Mayer to project 
team members


> Enhance and update PDFBox website & documentation
> -
>
> Key: PDFBOX-3330
> URL: https://issues.apache.org/jira/browse/PDFBOX-3330
> Project: PDFBox
>  Issue Type: Task
>  Components: Documentation
>Reporter: Maruan Sahyoun
> Attachments: pdfbox-topbar.pdf, toolbox.svg, topbar.png
>
>
> General purpose ticket to track enhancements to the website and documentation



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3017) Improve document signing

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-3017:
-

Commits missing in JIRA:

Commit 1813569 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1813569 ]
PDFBOX-3017: add ETSI.CAdES.detached

Commit 1813568 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1813568 ]
PDFBOX-3017: add ETSI.CAdES.detached


> Improve document signing
> 
>
> Key: PDFBOX-3017
> URL: https://issues.apache.org/jira/browse/PDFBOX-3017
> Project: PDFBox
>  Issue Type: Improvement
>  Components: AcroForm, Signing
>Affects Versions: 2.0.0, 3.0.0
>Reporter: Tilman Hausherr
> Fix For: 3.0.0
>
> Attachments: PDFBOX-3017_certificate_chain.diff, 
> PDFBOX-3017_certificate_chain_Screenshot.png, pdfa_signed_insivible.pdf
>
>
> Improve signing code:
> - incremental save only works for signatures and doesn't respect certificates 
> such as Adobe Extended Usage Rights
> - -{{prepareNonVisualSignature}} clears the AcroForm DR 
> {{acroForm.setDefaultResources(null)}} which is not good if there are other 
> form fields-
> - visual/nonVisualSignature should move into the {{interactive.forms}} 
> package and be handled within the signature field
> - -verify signature (to have tests that go full circle)- done June 2016
> - document or refactor / rewrite visible labyrinthine signature code
> - why is it not possible to pass only the signatureField to addSignature, 
> instead having to create a COSDocument with a page and annotations that has 
> the signature field, and that must be searched for in 
> {{prepareVisibleSignature()}}?
> - support rotated pages (see 
> https://stackoverflow.com/questions/34012293/pdfbox-sign-landscape-file-error/34359956#34359956
>  )
> - -make sure that signed PDF/A files are still PDF/A (see 
> http://www.pdfa.org/wp-content/uploads/2011/08/tn0006_digital_signatures_in_pdfa-1_2008-03-14.pdf
>  ); /ID possibly not OK; /Annots is possibly required ([~tilman] removed this 
> for invisible signatures); test signed files with PDF-Tools and with 
> preflight- tested, they are OK with PDF-Tools and preflight
> - test whether "bad" signatures are detected by preflight (search in old 
> issues)
> - -PDFBOX-3363 - why is the stream cached in a file? Should it be done in 
> memory?- done on July 15, 2016
> - remove {{setVisualSignature(PDVisibleSigProperties 
> visSignatureProperties)}} from SignatureOptions.java, all it does is to call 
> {{visSignatureProperties.getVisibleSignature()}} which returns an 
> {{InputStream}}, and this is already available
> - {{checkSignatureField}} violates the "do one thing" rule
> - decide whether the whole certificate chain should be passed in the sample 
> code, instead of only the first one
> - check certificate chain, revocation lists, etc, only if needed by users, 
> code 
> [here|https://svn.apache.org/repos/asf/cxf/tags/cxf-2.4.1/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/]
> - deprecate / remove all PDVisibleSignDesigner constructors except those with 
> a PDDocument object, to avoid a file being opened twice
> - ... your ideas...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-1848) Time Stamp Document Level Sigature

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-1848:
-

Commits missing in JIRA:

Commit 1813562 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1813562 ]
PDFBOX-1848: remove MDP permissions, not allowed

Commit 1813564 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1813564 ]
PDFBOX-1848: ignore null values

Commit 1813565 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1813565 ]
PDFBOX-1848: ignore null values


> Time Stamp Document Level Sigature
> --
>
> Key: PDFBOX-1848
> URL: https://issues.apache.org/jira/browse/PDFBOX-1848
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Affects Versions: 2.0.0
>Reporter: vakhtang koroghlishvili
>Assignee: Tilman Hausherr
> Fix For: 3.0.0, 2.0.9
>
> Attachments: CreateSignedTimestamp.java.patch, 
> CreateTSASignature.java.patch, TSA-SIG-LOOKS-LIKE-THIS.png, file.pdf, 
> file_signed.pdf, file_signed_timestamped.pdf, file_timestamped.pdf
>
>
> We need TSA Document Level signature modulo too!
> At the moment we sign document with our certificate. But... sometimes we need 
> to sign document with TSA too. This is important part of signing. Sometimes 
> this is very very very important- for instance when we will implement PAdES 4 
> profile this module will be essential. without that Document Secure Store 
> will not work :)
> I'm working on this improvement. I'will finish this soon. It's almost done. I 
> only must add some java docs, and might be I change architect design and etc..
> So, please assign this it to me :) I will upload patch as soon as possible :)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Updated] (PDFBOX-1848) Time Stamp Document Level Sigature

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-1848:

Fix Version/s: (was: 2.0.8)
   2.0.9

> Time Stamp Document Level Sigature
> --
>
> Key: PDFBOX-1848
> URL: https://issues.apache.org/jira/browse/PDFBOX-1848
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Affects Versions: 2.0.0
>Reporter: vakhtang koroghlishvili
>Assignee: Tilman Hausherr
> Fix For: 3.0.0, 2.0.9
>
> Attachments: CreateSignedTimestamp.java.patch, 
> CreateTSASignature.java.patch, TSA-SIG-LOOKS-LIKE-THIS.png, file.pdf, 
> file_signed.pdf, file_signed_timestamped.pdf, file_timestamped.pdf
>
>
> We need TSA Document Level signature modulo too!
> At the moment we sign document with our certificate. But... sometimes we need 
> to sign document with TSA too. This is important part of signing. Sometimes 
> this is very very very important- for instance when we will implement PAdES 4 
> profile this module will be essential. without that Document Secure Store 
> will not work :)
> I'm working on this improvement. I'will finish this soon. It's almost done. I 
> only must add some java docs, and might be I change architect design and etc..
> So, please assign this it to me :) I will upload patch as soon as possible :)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Closed] (PDFBOX-3981) It won't catch the exception when read the CMYK image in PDF for DCTFilter.class

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr closed PDFBOX-3981.
---
Resolution: Incomplete

Ok, I'm closing this for now. You can still comment. You can also try that 
special CMYK setting mentioned on 
https://pdfbox.apache.org/2.0/getting-started.html .

> It won't catch the exception when read the CMYK image in PDF for 
> DCTFilter.class
> 
>
> Key: PDFBOX-3981
> URL: https://issues.apache.org/jira/browse/PDFBOX-3981
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.7
> Environment: Windows/Liunx
>Reporter: austinchen
>  Labels: cmyk
>
> In below code of DCTFilter.class, can't catch the IIOException because the 
> right Exception is IOException. 
> And when I change the code, in my testing, when I convert the PDF to image, I 
> found the CMYK image will be lost in converted image, it's very strange when 
> I set "String numChannels = '2'", I got positive result. 
> {code}
> if ("3".equals(numChannels) || numChannels.isEmpty())
> {
> try
> {
> // I'd like to use ImageReader#readRaster but it is buggy 
> and can't read RGB correctly
> BufferedImage image = reader.read(0);
> raster = image.getRaster();
> }
> catch (IIOException e)
> {
> // JAI can't read CMYK JPEGs using ImageReader#read or 
> ImageIO.read but
> // fortunately ImageReader#readRaster isn't buggy when 
> reading 4-channel files
> raster = reader.readRaster(0, null);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Updated] (PDFBOX-3981) It won't catch the exception when read the CMYK image in PDF for DCTFilter.class

2017-10-28 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-3981:

Fix Version/s: (was: 2.0.7)

> It won't catch the exception when read the CMYK image in PDF for 
> DCTFilter.class
> 
>
> Key: PDFBOX-3981
> URL: https://issues.apache.org/jira/browse/PDFBOX-3981
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.7
> Environment: Windows/Liunx
>Reporter: austinchen
>  Labels: cmyk
>
> In below code of DCTFilter.class, can't catch the IIOException because the 
> right Exception is IOException. 
> And when I change the code, in my testing, when I convert the PDF to image, I 
> found the CMYK image will be lost in converted image, it's very strange when 
> I set "String numChannels = '2'", I got positive result. 
> {code}
> if ("3".equals(numChannels) || numChannels.isEmpty())
> {
> try
> {
> // I'd like to use ImageReader#readRaster but it is buggy 
> and can't read RGB correctly
> BufferedImage image = reader.read(0);
> raster = image.getRaster();
> }
> catch (IIOException e)
> {
> // JAI can't read CMYK JPEGs using ImageReader#read or 
> ImageIO.read but
> // fortunately ImageReader#readRaster isn't buggy when 
> reading 4-channel files
> raster = reader.readRaster(0, null);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (PDFBOX-3981) It won't catch the exception when read the CMYK image in PDF for DCTFilter.class

2017-10-28 Thread austinchen (JIRA)

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

austinchen commented on PDFBOX-3981:


[~tilman] Sorry, can't provide the PDF because the security policy in my side, 
I will try to fix it by your suggestion, if it works I will let you know.

> It won't catch the exception when read the CMYK image in PDF for 
> DCTFilter.class
> 
>
> Key: PDFBOX-3981
> URL: https://issues.apache.org/jira/browse/PDFBOX-3981
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.7
> Environment: Windows/Liunx
>Reporter: austinchen
>  Labels: cmyk
> Fix For: 2.0.7
>
>
> In below code of DCTFilter.class, can't catch the IIOException because the 
> right Exception is IOException. 
> And when I change the code, in my testing, when I convert the PDF to image, I 
> found the CMYK image will be lost in converted image, it's very strange when 
> I set "String numChannels = '2'", I got positive result. 
> {code}
> if ("3".equals(numChannels) || numChannels.isEmpty())
> {
> try
> {
> // I'd like to use ImageReader#readRaster but it is buggy 
> and can't read RGB correctly
> BufferedImage image = reader.read(0);
> raster = image.getRaster();
> }
> catch (IIOException e)
> {
> // JAI can't read CMYK JPEGs using ImageReader#read or 
> ImageIO.read but
> // fortunately ImageReader#readRaster isn't buggy when 
> reading 4-channel files
> raster = reader.readRaster(0, null);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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