Build failed in Jenkins: PDFBox-sonar #335

2017-12-21 Thread Apache Jenkins Server
See 


Changes:

[tilman] PDFBOX-4044: sonar fix

--
[...truncated 42.69 KB...]
[INFO] JaCoCoSensor: JaCoCo report not found : 

[INFO] Sensor JaCoCoSensor (done) | time=0ms
[INFO] Sensor JaCoCoItSensor
[INFO] JaCoCoItSensor: JaCoCo IT report not found: 

[INFO] Sensor JaCoCoItSensor (done) | time=0ms
[INFO] Sensor JaCoCoOverallSensor
[INFO] Sensor JaCoCoOverallSensor (done) | time=0ms
[INFO] Sensor XmlFileSensor
[INFO] Sensor XmlFileSensor (done) | time=1ms
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=8ms
[INFO] Sensor Code Colorizer Sensor
[INFO] Sensor Code Colorizer Sensor (done) | time=1ms
[INFO] Sensor CPD Block Indexer
[INFO] JavaCpdBlockIndexer is used for java
[INFO] Sensor CPD Block Indexer (done) | time=76ms
[INFO] -  Scan Apache PDFBox tools
[INFO] Base dir: 
[INFO] Working dir: 

[INFO] Source paths: pom.xml, src/main/java
[INFO] Test paths: src/test/java
[INFO] Binary dirs: target/classes
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 27 files indexed
[INFO] Quality profile for java: Sonar way
[INFO] Sensor Lines Sensor
[INFO] Sensor Lines Sensor (done) | time=0ms
[INFO] Sensor JavaSquidSensor
[INFO] Configured Java source version (sonar.java.source): 7
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=1ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=0ms
[INFO] Java Main Files AST scan
[INFO] 23 source files to be analyzed
[INFO] Java Main Files AST scan (done) | time=4517ms
[INFO] Java Test Files AST scan
[INFO] 23/23 source files have been analyzed
[INFO] 4 source files to be analyzed
[INFO] Java Test Files AST scan (done) | time=145ms
[INFO] Sensor JavaSquidSensor (done) | time=4672ms
[INFO] Sensor SCM Sensor
[INFO] 4/4 source files have been analyzed
[INFO] Sensor SCM Sensor (done) | time=3ms
[INFO] Sensor Coverage Report Import
[INFO] Sensor Coverage Report Import (done) | time=0ms
[INFO] Sensor Coverage Report Import
[INFO] Sensor Coverage Report Import (done) | time=0ms
[INFO] Sensor Unit Test Results Import
[INFO] Sensor Unit Test Results Import (done) | time=0ms
[INFO] Sensor SurefireSensor
[INFO] parsing 

[INFO] Sensor SurefireSensor (done) | time=0ms
[INFO] Sensor JaCoCoSensor
[INFO] JaCoCoSensor: JaCoCo report not found : 

[INFO] Sensor JaCoCoSensor (done) | time=0ms
[INFO] Sensor JaCoCoItSensor
[INFO] JaCoCoItSensor: JaCoCo IT report not found: 

[INFO] Sensor JaCoCoItSensor (done) | time=0ms
[INFO] Sensor JaCoCoOverallSensor
[INFO] Sensor JaCoCoOverallSensor (done) | time=0ms
[INFO] Sensor XmlFileSensor
[INFO] Sensor XmlFileSensor (done) | time=0ms
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=4ms
[INFO] Sensor Code Colorizer Sensor
[INFO] Sensor Code Colorizer Sensor (done) | time=1ms
[INFO] Sensor CPD Block Indexer
[INFO] JavaCpdBlockIndexer is used for java
[INFO] Sensor CPD Block Indexer (done) | time=41ms
[INFO] -  Scan Apache PDFBox application
[INFO] Base dir: 
[INFO] Working dir: 

[INFO] Source paths: pom.xml
[INFO] Binary dirs: target/classes
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 0 files indexed
[INFO] Sensor Lines Sensor
[INFO] Sensor Lines Sensor (done) | time=0ms
[INFO] Sensor SCM Sensor
[INFO] Sensor SCM Sensor (done) | time=0ms
[INFO] Sensor Coverage Report Import
[INFO] Sensor Coverage Report Import (done) | time=0ms
[INFO] Sensor Coverage Report Import
[INFO] Sensor Coverage Report Import (done) | time=0ms
[INFO] Sensor Unit Test Results Import
[INFO] Sensor Unit Test Results Import (done) | time=0ms
[INFO] Sensor XmlFileSensor
[INFO] Sensor XmlFileSensor (done) | time=0ms
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=0ms
[INFO] Sensor Code Colorizer Sensor
[INFO] Sensor Code Colorizer Sensor (done) | time=0ms
[INFO] Sensor CPD Block Indexer
[INFO] Sensor CPD Block Indexer (done) | time=0ms
[INFO] -  Scan Apache PDFBox Debugger application
[INFO] Base dir: 

[INFO] Working dir: 

[jira] [Updated] (PDFBOX-3984) Add validation data of signer to document

2017-12-21 Thread Alexis Suter (JIRA)

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

Alexis Suter updated PDFBOX-3984:
-
Attachment: OcspHelper_VerifySignature.java.patch

Thank you very much for reviewing the code and accepting it to the project.
I made a small patch, that checks the Signature of the OCSP-Response.

> Add validation data of signer to document
> -
>
> Key: PDFBOX-3984
> URL: https://issues.apache.org/jira/browse/PDFBOX-3984
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Affects Versions: 2.0.7
>Reporter: Alexis Suter
> Attachments: 1_only_signed.pdf, 2_signed_and_embeddedTs.pdf, 
> 3_signed_external_timestamp.pdf, 4_resultof_signed_eTs_ocsp.pdf, 
> How_LTV_looks_in_adobe.PNG, OcspHelper_VerifySignature.java.patch, 
> SignatureValidation_v0.1.java.patch, SignatureValidation_v0.2.java.patch, 
> multi-Signature_AdobeValidation.pdf, multi-Signature_Base.pdf, 
> multi-Signature_pdfBox_validation.pdf, screenshot-1.png
>
>
> To support Long Term Validation of a signature, we need to add a 
> Valdiation-Dictionary to the document. Inside there is most importantly an 
> OCSP-Response of the signers. (can be multiple).
> As Defined in [PAdES 4|https://en.wikipedia.org/wiki/PAdES] the following 
> elements will be added to a document: A DSS (Document Security Store) linked 
> to the VRI(s) of the signature(s)
> At first I will provide an example.



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: sonar fix

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Documentation, PDModel, Utilities
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
>Assignee: Tilman Hausherr
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: sonar fix

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Documentation, PDModel, Utilities
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
>Assignee: Tilman Hausherr
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-3198) Visible Signature N2 layer

2017-12-21 Thread Michael Klink (JIRA)

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

Michael Klink commented on PDFBOX-3198:
---

{quote}so if I wanted, I could just fill my visual signature /AP with anything 
I want and on a single level, to make my life easy?{quote}

Exactly.

At least according to the specification.

If you want to support use cases like the one explained above, though, you'd 
need to follow Adobe's lead. But that would be support for a proprietary Adobe 
feature, not support for a PDF standard backed feature.

> Visible Signature N2 layer
> --
>
> Key: PDFBOX-3198
> URL: https://issues.apache.org/jira/browse/PDFBOX-3198
> Project: PDFBox
>  Issue Type: New Feature
>  Components: Signing
>Affects Versions: 1.8.11
>Reporter: Frank Cornelis
>Priority: Minor
> Attachments: PDFBOX-3198-visible-signature.zip, 
> PDFBOX-3198-work-5.5.2017.zip, helloworld_signed.pdf, pdfbox-n2-2.patch, 
> signed.pdf
>
>
> The patch adds N2 layer support to visible signatures.



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-4044:

Component/s: (was: Rendering)
 Utilities
 PDModel
 Documentation

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Documentation, PDModel, Utilities
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
>Assignee: Tilman Hausherr
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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] [Resolved] (PDFBOX-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr resolved PDFBOX-4044.
-
   Resolution: Fixed
 Assignee: Tilman Hausherr
Fix Version/s: 3.0.0 PDFBox
   2.0.9

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
>Assignee: Tilman Hausherr
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: add /Name entry if /OCProperties/D dictionary is created because 
it's needed at least for PDF/A-3

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: add /Name entry if /OCProperties/D dictionary is created because 
it's needed at least for PDF/A-3

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: warn if negative cropbox origin

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: warn if negative cropbox origin

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: improve javadoc

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-4044: improve javadoc

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-3984) Add validation data of signer to document

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-3984: correct html

> Add validation data of signer to document
> -
>
> Key: PDFBOX-3984
> URL: https://issues.apache.org/jira/browse/PDFBOX-3984
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Signing
>Affects Versions: 2.0.7
>Reporter: Alexis Suter
> Attachments: 1_only_signed.pdf, 2_signed_and_embeddedTs.pdf, 
> 3_signed_external_timestamp.pdf, 4_resultof_signed_eTs_ocsp.pdf, 
> How_LTV_looks_in_adobe.PNG, SignatureValidation_v0.1.java.patch, 
> SignatureValidation_v0.2.java.patch, multi-Signature_AdobeValidation.pdf, 
> multi-Signature_Base.pdf, multi-Signature_pdfBox_validation.pdf, 
> screenshot-1.png
>
>
> To support Long Term Validation of a signature, we need to add a 
> Valdiation-Dictionary to the document. Inside there is most importantly an 
> OCSP-Response of the signers. (can be multiple).
> As Defined in [PAdES 4|https://en.wikipedia.org/wiki/PAdES] the following 
> elements will be added to a document: A DSS (Document Security Store) linked 
> to the VRI(s) of the signature(s)
> At first I will provide an example.



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman commented on PDFBOX-4044:


That's perfect, thanks a lot for helping us out so quickly.
Feel free to close this issue, have a nice day.

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4044:
-

Ok, so obviously your customer escalation is now on the right track to be 
resolved... TODO for me:
- possibly improve javadoc about transform
- maybe give warning if cropbox x0 or y0 is negative and no transform is set
- decide whether to add dummy name in OCProperties

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-4044 at 12/21/17 2:08 PM:
---

So here's the code that works with the trunk (and likely with 2.0.8):
{code}
for (int i = 0; i < inDocument.getNumberOfPages(); i++)
{
layerUtility.wrapInSaveRestore(inDocument.getPage(i));
PDRectangle cropBox = inDocument.getPage(i).getCropBox();
AffineTransform transform = 
AffineTransform.getTranslateInstance(cropBox.getLowerLeftX(), 
cropBox.getLowerLeftY());

layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
{code}


was (Author: tilman):
So here's the code that works with the trunc (and likely with 2.0.8):
{code}
for (int i = 0; i < inDocument.getNumberOfPages(); i++)
{
layerUtility.wrapInSaveRestore(inDocument.getPage(i));
PDRectangle cropBox = inDocument.getPage(i).getCropBox();
AffineTransform transform = 
AffineTransform.getTranslateInstance(cropBox.getLowerLeftX(), 
cropBox.getLowerLeftY());

layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
{code}

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-4044 at 12/21/17 2:03 PM:
---

Here's how to make it PDF/A compliant, if this is important to you:
{code}
PDOptionalContentProperties ocProperties = 
layerUtility.getDocument().getDocumentCatalog().getOCProperties();
((COSDictionary) ((COSDictionary) 
ocProperties.getCOSObject()).getItem(COSName.D)).setString(COSName.NAME, "top");
{code}
(This is quick and dirty and will give NPE for most files except this one!)

The validators expect that {{Root/OCProperties/D}} have a name. According to 
the PDF specification, it is "A name for the configuration, suitable for 
presentation in a user interface" but the name is never displayed, so Adobe 
doesn't care much.


was (Author: tilman):
Here's how to make it PDF/A compliant, if this is important to you:
{code}
PDOptionalContentProperties ocProperties = 
layerUtility.getDocument().getDocumentCatalog().getOCProperties();
((COSDictionary) ((COSDictionary) 
ocProperties.getCOSObject()).getItem(COSName.D)).setString(COSName.NAME, "top");
{code}
(This is quick and dirty and will give NPE for most files except this one!)

The validators expect that {{Root/OCProperties/D}} have a name. According to 
the PDF specification, it is "A name for the configuration, suitable for 
presentation in a user interface" but the name is never displayed. 

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman commented on PDFBOX-4044:


Thanks again for your quick response !
The solution works fine on my system as well, and I have no problems with the 
resulting file.

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-4044 at 12/21/17 1:43 PM:
---

The new code works with that one as well. However, when working with a PDF/A 
file, you'll need to recheck whether the result is still PDF/A. Spoiler: it 
isn't :-(

{quote}
Each optional content configuration dictionary that forms the value of the D 
key, or that is an element in the array that forms the value of the Configs key 
in the OCProperties dictionary, shall contain the Name key.
{quote}


was (Author: tilman):
The new code works with that one as well. However, when working with a PDF/A 
file, you'll need to recheck whether the result is still PDF/A. Spoiler: it 
isn't :-(

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4044:
-

The new code works with that one as well. However, when working with a PDF/A 
file, you'll need to recheck whether the result is still PDF/A. Spoiler: it 
isn't :-(

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-4044:

Attachment: PDFBOX-4044-result-good.pdf

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman updated PDFBOX-4044:
---
Attachment: report_cognos_pdfa.pdf

Thanks so far for your help. In addition I added the original document that 
comes out of IBM Cognos.

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: PDFBOX-4044-result-good.pdf, confidential_overlay.pdf, 
> report_cognos_merged.pdf, report_cognos_overlayed.pdf, report_cognos_pdfa.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4044:
-

So here's the code that works with the trunc (and likely with 2.0.8):
{code}
for (int i = 0; i < inDocument.getNumberOfPages(); i++)
{
layerUtility.wrapInSaveRestore(inDocument.getPage(i));
PDRectangle cropBox = inDocument.getPage(i).getCropBox();
AffineTransform transform = 
AffineTransform.getTranslateInstance(cropBox.getLowerLeftX(), 
cropBox.getLowerLeftY());

layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
{code}

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4044:
-

Your file has a weird mediabox and cropbox: 0, -792, 612, 0.

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4044:
-

So I did... and added the {{wrapInSaveRestore()}} call, but it still doesn't 
work. The only difference is that the content stream contents now look like I 
expected.

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4044:
-

I'm gonna run your code and see what's going on... in the source code I see, 
the overlay comes AFTER the existing stream(s).

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-4044 at 12/21/17 1:00 PM:
---

>From looking at the result PDF with PDFDebugger, I can see that the 
>CONFIDENTIAL comes first in the content stream array, i.e. as a background. I 
>see some rectangle filled in the reports, maybe this overwrites the background.


was (Author: tilman):
>From looking at the result PDF, I can see that the CONFIDENTIAL comes first, 
>i.e. as a background. I see some rectangle filled in the reports, maybe this 
>overwrites the background.

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4044:
-

>From looking at the result PDF, I can see that the CONFIDENTIAL comes first, 
>i.e. as a background. I see some rectangle filled in the reports, maybe this 
>overwrites the background.

> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + i);
> }
> layerUtility.getDocument().save(outPdf);
> }
> {code}
> Since we at Infor do have a customer escallation on this particular issue, 
> any hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), 
> or any particularities about the base PDF that might be causing this to be 
> behaving differently would be helpful. 



--
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-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman updated PDFBOX-4044:
---
Description: 
Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.7.1.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
with the attached [^confidential_overlay.pdf]. The resulting attached file 
[^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
other two pages are not overlayed.

Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
every hint mentioned in that issue):

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}

Since we at Infor do have a customer escallation on this particular issue, any 
hints as to why this might not work in PDF2.0.8 (and only on PDF1.7.1), or any 
particularities about the base PDF that might be causing this to be behaving 
differently would be helpful. 


  was:
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
with the attached [^confidential_overlay.pdf]. The resulting attached file 
[^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
other two pages are not overlayed.

Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
every hint mentioned in that issue):

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}



> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.7.1 to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.7.1.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> 

[jira] [Updated] (PDFBOX-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman updated PDFBOX-4044:
---
Description: 
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
with the attached [^confidential_overlay.pdf]. The resulting attached file 
[^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
other two pages are not overlayed.

Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
every hint mentioned in that issue):

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}


  was:
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
with the attached [^confidential_overlay.pdf]. The resulting attached file 
[^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
other two pages are not overlayed.

Code snippet used to overlay, comming from PDFBOX-4002:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}



> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.x.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002 (I also tried each and 
> every hint mentioned in that issue):
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> 

[jira] [Updated] (PDFBOX-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman updated PDFBOX-4044:
---
Description: 
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
with the attached [^confidential_overlay.pdf]. The resulting attached file 
[^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
other two pages are not overlayed.

Code snippet used to overlay, comming from PDFBOX-4002:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}


  was:
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
with the attached [^confidential_overlay.pdf]. The resulting attached file 
[^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
other two pages are not overlayed.

Code snippet used to overlay:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}



> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.x.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay, comming from PDFBOX-4002:
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) 

[jira] [Updated] (PDFBOX-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman updated PDFBOX-4044:
---
Description: 
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
with the attached [^confidential_overlay.pdf]. The resulting attached file 
[^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
other two pages are not overlayed.

Code snippet used to overlay:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}


  was:
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached report_cognos_merged.pdf and overlay this with 
the attached confidential_overlay.pdf. The resulting attached file 
report_cognos_overlayed.pdf only shows an overlay on the first page. The other 
pages are not overlayed.

Code snippet used to overlay:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}



> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.x.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached [^report_cognos_merged.pdf] and overlay this 
> with the attached [^confidential_overlay.pdf]. The resulting attached file 
> [^report_cognos_overlayed.pdf] only shows an overlay on the first page. The 
> other two pages are not overlayed.
> Code snippet used to overlay:
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> 

[jira] [Updated] (PDFBOX-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)

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

Ad Kooiman updated PDFBOX-4044:
---
Description: 
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
*[^report_cognos_merged.pdf]* - a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
*[^confidential_overlay.pdf]* - an overlay pdf document
*[^report_cognos_overlayed.pdf]* - the resulting document after processing the 
overlay

To reproduce, use the attached report_cognos_merged.pdf and overlay this with 
the attached confidential_overlay.pdf. The resulting attached file 
report_cognos_overlayed.pdf only shows an overlay on the first page. The other 
pages are not overlayed.

Code snippet used to overlay:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}


  was:
Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
report_cognos_merged.pdf, a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
confidential_overlay.pdf, an overlay pdf document
report_cognos_merged.pdf, the resulting document after processing the overlay

To reproduce, use the attached report_cognos_merged.pdf and overlay this with 
the attached confidential_overlay.pdf. The resulting attached file 
report_cognos_overlayed.pdf only shows an overlay on the first page. The other 
pages are not overlayed.

Code snippet used to overlay:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{code}



> Unable to process overlay on Cognos PDF documents
> -
>
> Key: PDFBOX-4044
> URL: https://issues.apache.org/jira/browse/PDFBOX-4044
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Ad Kooiman
> Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
> report_cognos_overlayed.pdf
>
>
> Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
> documents anymore. These PDF documens are from Cognos Reporting and still 
> works fine with PDFBox 1.x.
> Attached files:
> *[^report_cognos_merged.pdf]* - a document that contains an intro page that 
> was succesfully merged into a cognos report. Page 2 and 3 are the original 
> cognos report pages.
> *[^confidential_overlay.pdf]* - an overlay pdf document
> *[^report_cognos_overlayed.pdf]* - the resulting document after processing 
> the overlay
> To reproduce, use the attached report_cognos_merged.pdf and overlay this with 
> the attached confidential_overlay.pdf. The resulting attached file 
> report_cognos_overlayed.pdf only shows an overlay on the first page. The 
> other pages are not overlayed.
> Code snippet used to overlay:
> {code}
>public void addLayer() throws Exception {
> PDDocument inDocument = PDDocument.load(basePdf);
> PDDocument layoutDocument = PDDocument.load(overlayLayout);
> LayerUtility layerUtility = new LayerUtility(inDocument);
> PDFormXObject layerObject = 
> layerUtility.importPageAsForm(layoutDocument, 0);
> AffineTransform transform = new AffineTransform();
> for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
> layerUtility.appendFormAsLayer(inDocument.getPage(i), 
> layerObject, transform, layer + "_" + 

[jira] [Created] (PDFBOX-4044) Unable to process overlay on Cognos PDF documents

2017-12-21 Thread Ad Kooiman (JIRA)
Ad Kooiman created PDFBOX-4044:
--

 Summary: Unable to process overlay on Cognos PDF documents
 Key: PDFBOX-4044
 URL: https://issues.apache.org/jira/browse/PDFBOX-4044
 Project: PDFBox
  Issue Type: Bug
  Components: Rendering
Affects Versions: 2.0.8
Reporter: Ad Kooiman
 Attachments: confidential_overlay.pdf, report_cognos_merged.pdf, 
report_cognos_overlayed.pdf

Since we upgrade from PDFBox 1.x to PDFBox 2.0.8, we cannot overlay PDF 
documents anymore. These PDF documens are from Cognos Reporting and still works 
fine with PDFBox 1.x.

Attached files:
report_cognos_merged.pdf, a document that contains an intro page that was 
succesfully merged into a cognos report. Page 2 and 3 are the original cognos 
report pages.
confidential_overlay.pdf, an overlay pdf document
report_cognos_merged.pdf, the resulting document after processing the overlay

To reproduce, use the attached report_cognos_merged.pdf and overlay this with 
the attached confidential_overlay.pdf. The resulting attached file 
report_cognos_overlayed.pdf only shows an overlay on the first page. The other 
pages are not overlayed.

Code snippet used to overlay:

{code}
   public void addLayer() throws Exception {
PDDocument inDocument = PDDocument.load(basePdf);
PDDocument layoutDocument = PDDocument.load(overlayLayout);
LayerUtility layerUtility = new LayerUtility(inDocument);
PDFormXObject layerObject = 
layerUtility.importPageAsForm(layoutDocument, 0);
AffineTransform transform = new AffineTransform();
for (int i = 0; i < inDocument.getNumberOfPages(); i++) {
layerUtility.appendFormAsLayer(inDocument.getPage(i), layerObject, 
transform, layer + "_" + i);
}
layerUtility.getDocument().save(outPdf);
}
{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-2852) Improve code quality (2)

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-2852: correct typo

> Improve code quality (2)
> 
>
> Key: PDFBOX-2852
> URL: https://issues.apache.org/jira/browse/PDFBOX-2852
> Project: PDFBox
>  Issue Type: Task
>Affects Versions: 2.0.0
>Reporter: Tilman Hausherr
> Attachments: PDNameTreeNode.java.patch, StringBuffer.patch, 
> XMPSchema.java.patch, explicit_array_creation.patch, fix_javadoc.patch, 
> foreach.patch, foreach2.patch, generic_type_arguments.patch, noarray.patch, 
> semicolon.patch, stringbuilder.patch, unnecessary_type_casting.patch, 
> unused_imports.patch, usestatic.patch, winansiencoding.patch, 
> winansiencoding2.patch
>
>
> This is a longterm issue for the task to improve code quality, by using the 
> [SonarQube 
> report|https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor],
>  hints in different IDEs, the FindBugs tool and other code quality tools.
> This is a follow-up of PDFBOX-2576, which was getting too long.



--
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-2852) Improve code quality (2)

2017-12-21 Thread ASF subversion and git services (JIRA)

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

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

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

PDFBOX-2852: correct typo

> Improve code quality (2)
> 
>
> Key: PDFBOX-2852
> URL: https://issues.apache.org/jira/browse/PDFBOX-2852
> Project: PDFBox
>  Issue Type: Task
>Affects Versions: 2.0.0
>Reporter: Tilman Hausherr
> Attachments: PDNameTreeNode.java.patch, StringBuffer.patch, 
> XMPSchema.java.patch, explicit_array_creation.patch, fix_javadoc.patch, 
> foreach.patch, foreach2.patch, generic_type_arguments.patch, noarray.patch, 
> semicolon.patch, stringbuilder.patch, unnecessary_type_casting.patch, 
> unused_imports.patch, usestatic.patch, winansiencoding.patch, 
> winansiencoding2.patch
>
>
> This is a longterm issue for the task to improve code quality, by using the 
> [SonarQube 
> report|https://analysis.apache.org/dashboard/index/org.apache.pdfbox:pdfbox-reactor],
>  hints in different IDEs, the FindBugs tool and other code quality tools.
> This is a follow-up of PDFBOX-2576, which was getting too long.



--
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-4043) ExtractImages doesn't extract images from PDPatterns

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4043:
-

No, because this is very specific to the process of extracting pattern images. 
PDFGraphicsStreamEngine is really just a minimal thing that must be subclassed 
by users, and then you'd have to look at PageDrawer.java and copy & paste what 
you like, or do your own.

What my change did was to have a look at the current colorspace when doing 
stroke / fill operations. Some people don't need that at all, e.g. people who 
just need the shapes of vector operations.

> ExtractImages doesn't extract images from PDPatterns
> 
>
> Key: PDFBOX-4043
> URL: https://issues.apache.org/jira/browse/PDFBOX-4043
> Project: PDFBox
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.0.8
>Reporter: Arjohn Kampman
>Assignee: Tilman Hausherr
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: Angular-win2pdf.pdf
>
>
> The ExtractImages tool (or the underlying PDFGraphicsStreamEngine) doesn't 
> extract images from PDPattern objects, even if they are shown on the page. 
> We've found that Win2PDF stores images in such patterns. I have attached a 
> sample file that this tool has generated from the Angular website. The sample 
> clearly shows many images, but ExtractImages  finds none of these.



--
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-4000) Wrong line break detection for the before ordinal indicator superscripts.

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-4000:

Attachment: PDFBOX-4000-reduced.pdf

> Wrong line break detection for the before ordinal indicator superscripts.
> -
>
> Key: PDFBOX-4000
> URL: https://issues.apache.org/jira/browse/PDFBOX-4000
> Project: PDFBox
>  Issue Type: Bug
>  Components: Text extraction
>Affects Versions: 2.0.6, 2.0.7, 2.0.8
> Environment: Windows 10 64-bit
>Reporter: Harun Reşit Zafer
> Attachments: PDFBOX-4000-reduced.pdf, 
> contract_00569_SEDAR-experimental.txt, contract_00569_SEDAR-marked-1.png, 
> contract_00569_SEDAR.pdf, contract_00882_SEDAR.pdf, contract_00968_SEDAR.pdf, 
> nk7-p19.pdf
>
>
> Attached 3 documents have lines similar to {{THIS AGREEMENT is made as of the 
> 5th day of February, 2016.}} PdfBox returns this line as 3 separate lines:
> {{THIS AGREEMENT is made as of the 5}}
> {{th}}
>  {{day of February, 2016.}}
> You can find each line close to the top of documents.



--
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-4000) Wrong line break detection for the before ordinal indicator superscripts.

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-4000:

Component/s: (was: Parsing)
 Text extraction

> Wrong line break detection for the before ordinal indicator superscripts.
> -
>
> Key: PDFBOX-4000
> URL: https://issues.apache.org/jira/browse/PDFBOX-4000
> Project: PDFBox
>  Issue Type: Bug
>  Components: Text extraction
>Affects Versions: 2.0.6, 2.0.7, 2.0.8
> Environment: Windows 10 64-bit
>Reporter: Harun Reşit Zafer
> Attachments: contract_00569_SEDAR-experimental.txt, 
> contract_00569_SEDAR-marked-1.png, contract_00569_SEDAR.pdf, 
> contract_00882_SEDAR.pdf, contract_00968_SEDAR.pdf, nk7-p19.pdf
>
>
> Attached 3 documents have lines similar to {{THIS AGREEMENT is made as of the 
> 5th day of February, 2016.}} PdfBox returns this line as 3 separate lines:
> {{THIS AGREEMENT is made as of the 5}}
> {{th}}
>  {{day of February, 2016.}}
> You can find each line close to the top of documents.



--
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-4000) Wrong line break detection for the before ordinal indicator superscripts.

2017-12-21 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr updated PDFBOX-4000:

Attachment: nk7-p19.pdf

File nk7-p19.pdf is from Dan Liu from the mailing list, full file at 
http://proj.gz-yibo.com:2880/nk7.pdf
{quote}
a text line in page 19:
7.放射性核素扫描应用133 氙或99m 锝-二乙三胺五乙酸(99mTc-DTPA)雾化吸人。99m 锝
becomes:
133 99m 99m 99m
7.放射性核素扫描应用 氙或 锝-二乙三胺五乙酸(Tc-DTPA)雾化吸人。 锝
{quote}

> Wrong line break detection for the before ordinal indicator superscripts.
> -
>
> Key: PDFBOX-4000
> URL: https://issues.apache.org/jira/browse/PDFBOX-4000
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.6, 2.0.7, 2.0.8
> Environment: Windows 10 64-bit
>Reporter: Harun Reşit Zafer
> Attachments: contract_00569_SEDAR-experimental.txt, 
> contract_00569_SEDAR-marked-1.png, contract_00569_SEDAR.pdf, 
> contract_00882_SEDAR.pdf, contract_00968_SEDAR.pdf, nk7-p19.pdf
>
>
> Attached 3 documents have lines similar to {{THIS AGREEMENT is made as of the 
> 5th day of February, 2016.}} PdfBox returns this line as 3 separate lines:
> {{THIS AGREEMENT is made as of the 5}}
> {{th}}
>  {{day of February, 2016.}}
> You can find each line close to the top of documents.



--
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-4043) ExtractImages doesn't extract images from PDPatterns

2017-12-21 Thread Arjohn Kampman (JIRA)

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

Arjohn Kampman commented on PDFBOX-4043:


Thanks for the quick fix! I can confirm that ExtractImages now extracts the 
images that were missing before. However, I had actually expected a fix in 
class PDFGraphicsStreamEngine, which is what we use to find and process images 
from PDF files. Would it be possible to move the changes to this class instead?

> ExtractImages doesn't extract images from PDPatterns
> 
>
> Key: PDFBOX-4043
> URL: https://issues.apache.org/jira/browse/PDFBOX-4043
> Project: PDFBox
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 2.0.8
>Reporter: Arjohn Kampman
>Assignee: Tilman Hausherr
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: Angular-win2pdf.pdf
>
>
> The ExtractImages tool (or the underlying PDFGraphicsStreamEngine) doesn't 
> extract images from PDPattern objects, even if they are shown on the page. 
> We've found that Win2PDF stores images in such patterns. I have attached a 
> sample file that this tool has generated from the Angular website. The sample 
> clearly shows many images, but ExtractImages  finds none of these.



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