[jira] [Updated] (FOP-2819) Fop is not rendering last page if width of page is not the same as previous page

2018-10-04 Thread Oleg Sydorenko (JIRA)


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

Oleg Sydorenko updated FOP-2819:

Description: 
During rendering pdf with content that fits entirely to body region page 
breaking algorithm incorrectly defines necessity of rendering of last page. If 
region-after does not fit to layout entirely after body region that last page 
is not rendered if width of last page simple page master differs from width of 
only page simple page master.

As I understood, in versions 2.0-2.2 it tries to define the last page presence 
but because of content of body region was at one page it just renders only page 
layout with hiding all element from body that after static region overflows.

In version 2.3 it was fixed by change commited for FOP-2713 bug by simon steiner

However it not handles situation for pages with different width. We are 
generate pdf with different width for some of our functionality but we couldn't 
manage to render it correctly for case when body region is slightly bigger to 
be fitted to one page layout(only) but smaller to be rendered for two pages 
layouts. As a workaround we now use the max of the size for both pages. 

It would be great if you fix this behavior in next releases. 

As I understood the problem is in PageBreaker#redoLayout  method. On line 
number 470

 we are getting 

boolean ipdChange = algRestart.getIPDdifference() != 0;

this variable is true for situation when pages have different width and it 
defines later on on line 478 do we adding last page or not. If width of last 
page simple page master is different than other simple page masters width than 
last page is not rendered because of it. 

I haven't figured out the all dependencies but I think that algorithm that 
breaks pages is not expecting anything about possibility of existence of pages 
with different width.

I haven't managed to render two page pdf using binary fop. Maybe it because of 
fonts missing or hyphenation files missing settings. I hope that you will 
succeed with it.

  was:
During rendering pdf with content that fits entirely to body region page 
breaking algorithm incorrectly defines necessity of rendering of last page. If 
region-after does not fit to layout entirely after body region that last page 
is not rendered if width of last page simple page master differs from width of 
only page simple page master.

As I understood, in versions 2.0-2.2 it tries to define the last page presence 
but because of content of body region was at one page it just renders only page 
layout with hiding all element from body that after static region overflows.

In version 2.3 it was fixed by change commited for FOP-2713 bug by simon steiner

However it not handles situation for pages with different width. We are 
generate pdf with different width for some of our functionality but we couldn't 
manage to render it correctly for case when body region is slightly bigger to 
be fitted to one page layout(only) but smaller to be rendered for two pages 
layouts. As a workaround we now use the max of the size for both pages. 

It would be great if you fix this behavior in next releases. 

As I understood the problem is in PageBreaker#redoLayout  method. On line 
number 470

 we are getting 

boolean ipdChange = algRestart.getIPDdifference() != 0;

this variable is true for situation when pages have different width and it 
defines later on on line 478 do we adding last page or not. If width of last 
page simple page master is different than other simple page masters width than 
last page is not rendered because of it. 

I haven't figured out the all dependencies but I think that algorithm that 
breaks pages is not expecting about possibility of existence of pages with 
different width.

I haven't managed to render two page pdf using binary fop. Maybe it because of 
fonts missing or hyphenation files missing settings. I hope that you will 
succeed with it.


> Fop is not rendering last page if width of page is not the same as previous 
> page
> 
>
> Key: FOP-2819
> URL: https://issues.apache.org/jira/browse/FOP-2819
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.3
> Environment: java 8. Embedded Fop from java application. Windows 10. 
> FOP 2.3
>Reporter: Oleg Sydorenko
>Priority: Major
>  Labels: features
> Attachments: actual.pdf, expected.pdf, incorrect two page.fo, 
> workaround.fo
>
>
> During rendering pdf with content that fits entirely to body region page 
> breaking algorithm incorrectly defines necessity of rendering of last page. 
> If region-after does not fit to layout entirely after body region that last 
> page is not rendered if width of last page simple page master differs from 
> wi

[jira] [Created] (FOP-2819) Fop is not rendering last page if width of page is not the same as previous page

2018-10-04 Thread Oleg Sydorenko (JIRA)
Oleg Sydorenko created FOP-2819:
---

 Summary: Fop is not rendering last page if width of page is not 
the same as previous page
 Key: FOP-2819
 URL: https://issues.apache.org/jira/browse/FOP-2819
 Project: FOP
  Issue Type: Bug
  Components: fo/page
Affects Versions: 2.3
 Environment: java 8. Embedded Fop from java application. Windows 10. 
FOP 2.3
Reporter: Oleg Sydorenko
 Attachments: actual.pdf, expected.pdf, incorrect two page.fo, 
workaround.fo

During rendering pdf with content that fits entirely to body region page 
breaking algorithm incorrectly defines necessity of rendering of last page. If 
region-after does not fit to layout entirely after body region that last page 
is not rendered if width of last page simple page master differs from width of 
only page simple page master.

As I understood, in versions 2.0-2.2 it tries to define the last page presence 
but because of content of body region was at one page it just renders only page 
layout with hiding all element from body that after static region overflows.

In version 2.3 it was fixed by change commited for FOP-2713 bug by simon steiner

However it not handles situation for pages with different width. We are 
generate pdf with different width for some of our functionality but we couldn't 
manage to render it correctly for case when body region is slightly bigger to 
be fitted to one page layout(only) but smaller to be rendered for two pages 
layouts. As a workaround we now use the max of the size for both pages. 

It would be great if you fix this behavior in next releases. 

As I understood the problem is in PageBreaker#redoLayout  method. On line 
number 470

 we are getting 

boolean ipdChange = algRestart.getIPDdifference() != 0;

this variable is true for situation when pages have different width and it 
defines later on on line 478 do we adding last page or not. If width of last 
page simple page master is different than other simple page masters width than 
last page is not rendered because of it. 

I haven't figured out the all dependencies but I think that algorithm that 
breaks pages is not expecting about possibility of existence of pages with 
different width.

I haven't managed to render two page pdf using binary fop. Maybe it because of 
fonts missing or hyphenation files missing settings. I hope that you will 
succeed with it.



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


[jira] [Updated] (FOP-2818) PDF color spaces are lost when embedding PDF image

2018-10-04 Thread Matthias Reischenbacher (JIRA)


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

Matthias Reischenbacher updated FOP-2818:
-
Attachment: output_fixed.pdf

> PDF color spaces are lost when embedding PDF image
> --
>
> Key: FOP-2818
> URL: https://issues.apache.org/jira/browse/FOP-2818
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/pdf
>Reporter: Matthias Reischenbacher
>Assignee: Matthias Reischenbacher
>Priority: Critical
> Attachments: image.pdf, output_broken.pdf, output_fixed.pdf, 
> test_case.xml
>
>
> When embedding a PDF image (via the fop pdf image plugin) into a page, that 
> also contains a color definition with a custom color space (e.g. a Pantone 
> full tone color), the color space definition is lost and the PDF can't be 
> displayed correctly.
> After analyzing the generated PDF file I detected, that the "ColorSpace" 
> entry for the Pantone color space was missing in the "Resources" dictionary. 
> This bug was caused by FOP-2337, that introduced a "parent" resource 
> directory. I adapted the populateDictionary method of the PDFResources class, 
> so that the color space entries of the "parent" dictionary are not lost. 
> @ssteiner: please check, if this is correct.



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


Build failed in Jenkins: xmlgraphics-fop #213

2018-10-04 Thread Apache Jenkins Server
See 


Changes:

[matthias] FOP-2818: fix color spaces of parent pdf resources member getting 
lost

--
[...truncated 112.68 KB...]
Downloading: 
https://repository.apache.org/content/repositories/snapshots/org/apache/xmlgraphics/batik-ttf2svg/1.11.0-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata 
org.apache.xmlgraphics:batik-ttf2svg:1.11.0-SNAPSHOT/maven-metadata.xml from/to 
apache.snapshots.https 
(https://repository.apache.org/content/repositories/snapshots): Not authorized, 
ReasonPhrase:Unauthorized.
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ fop-servlet ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ 
fop-servlet ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ fop-servlet ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ 
fop-servlet ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
fop-servlet ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ fop-servlet ---
[INFO] No tests to run.
[JENKINS] Recording test results
[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ fop-servlet ---
[INFO] Packaging webapp
[INFO] Assembling webapp [fop-servlet] in 
[
[INFO] Processing war project
[INFO] Copying webapp resources 
[
[INFO] Webapp assembled in [121 msecs]
[INFO] Building war: 

[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ fop-servlet 
---
[INFO] Installing 

 to 
/home/jenkins/jenkins-slave/maven-repositories/0/org/apache/xmlgraphics/fop-servlet/2.4.0-SNAPSHOT/fop-servlet-2.4.0-SNAPSHOT.war
[INFO] Installing 
 to 
/home/jenkins/jenkins-slave/maven-repositories/0/org/apache/xmlgraphics/fop-servlet/2.4.0-SNAPSHOT/fop-servlet-2.4.0-SNAPSHOT.pom
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.14:checkstyle (default-cli) @ fop-servlet 
---
[CHECKSTYLE] No report found for mojo checkstyle
[INFO] 
[INFO] --- findbugs-maven-plugin:3.0.5:findbugs (default-cli) @ fop-servlet ---
[FINDBUGS] No report found for mojo findbugs
[INFO] 
[INFO] 
[INFO] Building Apache FOP Transcoder 2.4.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ fop-transcoder ---
[INFO] Deleting 

[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ 
fop-transcoder ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ fop-transcoder 
---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ 
fop-transcoder ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 

[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
fop-transcoder ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ fop-transcoder ---
[INFO] No tests to run.
[JENKINS] Recording test results
[INFO] 
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ fop-transcoder ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: 


[jira] [Created] (FOP-2818) PDF color spaces are lost when embedding PDF image

2018-10-04 Thread Matthias Reischenbacher (JIRA)
Matthias Reischenbacher created FOP-2818:


 Summary: PDF color spaces are lost when embedding PDF image
 Key: FOP-2818
 URL: https://issues.apache.org/jira/browse/FOP-2818
 Project: FOP
  Issue Type: Bug
  Components: renderer/pdf
Reporter: Matthias Reischenbacher
Assignee: Matthias Reischenbacher


When embedding a PDF image (via the fop pdf image plugin) into a page, that 
also contains a color definition with a custom color space (e.g. a Pantone full 
tone color), the color space definition is lost and the PDF can't be displayed 
correctly.

After analyzing the generated PDF file I detected, that the "ColorSpace" entry 
for the Pantone color space was missing in the "Resources" dictionary. This bug 
was caused by FOP-2337, that introduced a "parent" resource directory. I 
adapted the populateDictionary method of the PDFResources class, so that the 
color space entries of the "parent" dictionary are not lost. @ssteiner: please 
check, if this is correct.



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


[jira] [Resolved] (FOP-2818) PDF color spaces are lost when embedding PDF image

2018-10-04 Thread Matthias Reischenbacher (JIRA)


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

Matthias Reischenbacher resolved FOP-2818.
--
Resolution: Fixed
  Assignee: simon steiner  (was: Matthias Reischenbacher)

Fixed as part of http://svn.apache.org/viewvc?view=revision&revision=1842844

> PDF color spaces are lost when embedding PDF image
> --
>
> Key: FOP-2818
> URL: https://issues.apache.org/jira/browse/FOP-2818
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/pdf
>Reporter: Matthias Reischenbacher
>Assignee: simon steiner
>Priority: Critical
> Attachments: image.pdf, output_broken.pdf, output_fixed.pdf, 
> test_case.xml
>
>
> When embedding a PDF image (via the fop pdf image plugin) into a page, that 
> also contains a color definition with a custom color space (e.g. a Pantone 
> full tone color), the color space definition is lost and the PDF can't be 
> displayed correctly.
> After analyzing the generated PDF file I detected, that the "ColorSpace" 
> entry for the Pantone color space was missing in the "Resources" dictionary. 
> This bug was caused by FOP-2337, that introduced a "parent" resource 
> directory. I adapted the populateDictionary method of the PDFResources class, 
> so that the color space entries of the "parent" dictionary are not lost. 
> @ssteiner: please check, if this is correct.



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


[jira] [Updated] (FOP-2818) PDF color spaces are lost when embedding PDF image

2018-10-04 Thread Matthias Reischenbacher (JIRA)


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

Matthias Reischenbacher updated FOP-2818:
-
Attachment: output_broken.pdf
image.pdf
test_case.xml

> PDF color spaces are lost when embedding PDF image
> --
>
> Key: FOP-2818
> URL: https://issues.apache.org/jira/browse/FOP-2818
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/pdf
>Reporter: Matthias Reischenbacher
>Assignee: Matthias Reischenbacher
>Priority: Critical
> Attachments: image.pdf, output_broken.pdf, test_case.xml
>
>
> When embedding a PDF image (via the fop pdf image plugin) into a page, that 
> also contains a color definition with a custom color space (e.g. a Pantone 
> full tone color), the color space definition is lost and the PDF can't be 
> displayed correctly.
> After analyzing the generated PDF file I detected, that the "ColorSpace" 
> entry for the Pantone color space was missing in the "Resources" dictionary. 
> This bug was caused by FOP-2337, that introduced a "parent" resource 
> directory. I adapted the populateDictionary method of the PDFResources class, 
> so that the color space entries of the "parent" dictionary are not lost. 
> @ssteiner: please check, if this is correct.



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