RE: Support for Jakarta Servlet 6.0

2023-11-28 Thread Gary Potagal
Thank you!  Confirming this worked for us

From: Simon Steiner 
Sent: Tuesday, November 28, 2023 4:41 AM
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Support for Jakarta Servlet 6.0

You don't often get email from 
simonsteiner1...@gmail.com. Learn why this 
is important
CAUTION: External Sender

Hi,

I was able to generate a pdf using fop war using tomcat 10.1, by adding 

For mvn build I needed to add:
https://github.com/apache/xmlgraphics-fop/commit/1cc4244b69d8de060e8fb00e86d4f2a9871e503d

Thanks

From: Gary Potagal mailto:gary.pota...@wellsky.com>>
Sent: 27 November 2023 17:27
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Support for Jakarta Servlet 6.0

This doesn't work if the library that I'm dependent on is dependent on javax:

https://stackoverflow.com/questions/72302174/tomcat-10-upgrade-cant-find-javax-servlet-jsp-reference

From: Simon Steiner 
mailto:simonsteiner1...@gmail.com>>
Sent: Thursday, November 23, 2023 3:21 AM
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Support for Jakarta Servlet 6.0

You don't often get email from 
simonsteiner1...@gmail.com. Learn why this 
is important
CAUTION: External Sender

Hi,

tomcat 10 has a option to rewrite javax namespace to jarkarta at runtime

adding the single line "  " after the  in the main
conf/context.xml file

Thanks

From: Gary Potagal mailto:gary.pota...@wellsky.com>>
Sent: 22 November 2023 16:48
To: fop-dev@xmlgraphics.apache.org
Subject: Support for Jakarta Servlet 6.0

Hello,

Please consider providing support for Jakarta Servlet 6.0

- SpringBoot 2.7 is end of life on 18 Nov 2023
- SpringBoot 3.x requires JDK17 and Tomcat 10.1 - pls see discussion on:

https://stackoverflow.com/questions/75087509/spring-boot-3-and-spring-6-with-tomcat-9
- Tomcat 10.1 supports the Jakarta Servlet 6.0 only

In practice, it means going from javax.servlet to jakarta.servlet support.

Is there a way to open a JIRA ticket for this?


Thank you in advance for your support!


[jira] [Comment Edited] (FOP-3135) SVG content is displayed on a single line without spaces

2023-11-28 Thread Julien Lacour (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17790522#comment-17790522
 ] 

Julien Lacour edited comment on FOP-3135 at 11/28/23 11:59 AM:
---

We have found in {{PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, GeneralPath)}} 
that we can process each value of 'x' or 'y' separately. Maybe there's 
something to do on this class too to obtain a correct rendering.


was (Author: JIRAUSER300900):
We have found in {{PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, GeneralPath)}} 
that we can process each value of 'x' or 'y' separately.
Maybe there's something to do on this class too to obtain a correct rendering.

> SVG  content is displayed on a single line without spaces
> 
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Priority: Minor
> Attachments: MI-out-patch.pdf, MI-out.pdf, MI-test.fo, MI-tspan.svg, 
> MI.patch, WIP-out.pdf, WIP.patch, tspan.svg
>
>
> We have found an issue in FOP when transforming PDFs with SVGs containing 
>  with multiple @x and/or @y attributes values.
> The problem is located in 
> org.apache.fop.svg.PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, 
> GeneralPath), the positions given by x and y are never used when set.
> A possible fix for this issue is the following:
> {code:java}
> for (int i = 0, n = gv.getNumGlyphs(); i < n; i++) {
> int gc  = gv.getGlyphCode(i);
> int[]   pa  = ((i > dp.length) || (dp[i] == null)) ? 
> paZero : dp[i];
> if (gv.getGlyphPosition(i) != null) {
> Point2D gp  = gv.getGlyphPosition(i);
> double x= gp.getX() - initialPos.getX();
> double y= -(gp.getY() - initialPos.getY());
> double xd   = x - xoLast;
> double yd   = y - yoLast;
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc = x + pa[2];
> yc = y + pa[3];
> xoLast = x;
> yoLast = y;
> } else {
> double  xo  = xc + pa[0];
> double  yo  = yc + pa[1];
> double  xa  = f.getWidth(gc);
> double  ya  = 0;
> double  xd  = (xo - xoLast) / 1000f;
> double  yd  = (yo - yoLast) / 1000f;
>
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc += xa + pa[2];
> yc += ya + pa[3];
> xoLast = xo;
> yoLast = yo;
> }
> }
> {code}
> I also attached an example for testing, it can be opened in Batik for 
> comparison.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (FOP-3135) SVG content is displayed on a single line without spaces

2023-11-28 Thread Julien Lacour (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17790522#comment-17790522
 ] 

Julien Lacour edited comment on FOP-3135 at 11/28/23 11:59 AM:
---

We have found in {{PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, GeneralPath)}} 
that we can process each value of 'x' or 'y' separately.
Maybe there's something to do on this class too to obtain a correct rendering.


was (Author: JIRAUSER300900):
We have found in {{PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, GeneralPath)}} 
that we can process each value of 'x' separately.
Maybe there's something to do on this class too to obtain a correct rendering.

> SVG  content is displayed on a single line without spaces
> 
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Priority: Minor
> Attachments: MI-out-patch.pdf, MI-out.pdf, MI-test.fo, MI-tspan.svg, 
> MI.patch, WIP-out.pdf, WIP.patch, tspan.svg
>
>
> We have found an issue in FOP when transforming PDFs with SVGs containing 
>  with multiple @x and/or @y attributes values.
> The problem is located in 
> org.apache.fop.svg.PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, 
> GeneralPath), the positions given by x and y are never used when set.
> A possible fix for this issue is the following:
> {code:java}
> for (int i = 0, n = gv.getNumGlyphs(); i < n; i++) {
> int gc  = gv.getGlyphCode(i);
> int[]   pa  = ((i > dp.length) || (dp[i] == null)) ? 
> paZero : dp[i];
> if (gv.getGlyphPosition(i) != null) {
> Point2D gp  = gv.getGlyphPosition(i);
> double x= gp.getX() - initialPos.getX();
> double y= -(gp.getY() - initialPos.getY());
> double xd   = x - xoLast;
> double yd   = y - yoLast;
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc = x + pa[2];
> yc = y + pa[3];
> xoLast = x;
> yoLast = y;
> } else {
> double  xo  = xc + pa[0];
> double  yo  = yc + pa[1];
> double  xa  = f.getWidth(gc);
> double  ya  = 0;
> double  xd  = (xo - xoLast) / 1000f;
> double  yd  = (yo - yoLast) / 1000f;
>
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc += xa + pa[2];
> yc += ya + pa[3];
> xoLast = xo;
> yoLast = yo;
> }
> }
> {code}
> I also attached an example for testing, it can be opened in Batik for 
> comparison.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FOP-3135) SVG content is displayed on a single line without spaces

2023-11-28 Thread Julien Lacour (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17790522#comment-17790522
 ] 

Julien Lacour commented on FOP-3135:


We have found in {{PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, GeneralPath)}} 
that we can process each value of 'x' separately.
Maybe there's something to do on this class too to obtain a correct rendering.

> SVG  content is displayed on a single line without spaces
> 
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Priority: Minor
> Attachments: MI-out-patch.pdf, MI-out.pdf, MI-test.fo, MI-tspan.svg, 
> MI.patch, WIP-out.pdf, WIP.patch, tspan.svg
>
>
> We have found an issue in FOP when transforming PDFs with SVGs containing 
>  with multiple @x and/or @y attributes values.
> The problem is located in 
> org.apache.fop.svg.PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, 
> GeneralPath), the positions given by x and y are never used when set.
> A possible fix for this issue is the following:
> {code:java}
> for (int i = 0, n = gv.getNumGlyphs(); i < n; i++) {
> int gc  = gv.getGlyphCode(i);
> int[]   pa  = ((i > dp.length) || (dp[i] == null)) ? 
> paZero : dp[i];
> if (gv.getGlyphPosition(i) != null) {
> Point2D gp  = gv.getGlyphPosition(i);
> double x= gp.getX() - initialPos.getX();
> double y= -(gp.getY() - initialPos.getY());
> double xd   = x - xoLast;
> double yd   = y - yoLast;
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc = x + pa[2];
> yc = y + pa[3];
> xoLast = x;
> yoLast = y;
> } else {
> double  xo  = xc + pa[0];
> double  yo  = yc + pa[1];
> double  xa  = f.getWidth(gc);
> double  ya  = 0;
> double  xd  = (xo - xoLast) / 1000f;
> double  yd  = (yo - yoLast) / 1000f;
>
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc += xa + pa[2];
> yc += ya + pa[3];
> xoLast = xo;
> yoLast = yo;
> }
> }
> {code}
> I also attached an example for testing, it can be opened in Batik for 
> comparison.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (FOP-3135) SVG content is displayed on a single line without spaces

2023-11-28 Thread Julien Lacour (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17790519#comment-17790519
 ] 

Julien Lacour commented on FOP-3135:


Hi [~daveroxburgh], 

I tested to apply both patches on my side, the MI-tspan.svg file is correctly 
rendered but if I set another font the display isn't correct
I tried with the following content in my SVG:
{code:xml}
ADATA
ADATA
{code}


> SVG  content is displayed on a single line without spaces
> 
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Priority: Minor
> Attachments: MI-out-patch.pdf, MI-out.pdf, MI-test.fo, MI-tspan.svg, 
> MI.patch, WIP-out.pdf, WIP.patch, tspan.svg
>
>
> We have found an issue in FOP when transforming PDFs with SVGs containing 
>  with multiple @x and/or @y attributes values.
> The problem is located in 
> org.apache.fop.svg.PDFTextPainter.writeGlyphs(FOPGVTGlyphVector, 
> GeneralPath), the positions given by x and y are never used when set.
> A possible fix for this issue is the following:
> {code:java}
> for (int i = 0, n = gv.getNumGlyphs(); i < n; i++) {
> int gc  = gv.getGlyphCode(i);
> int[]   pa  = ((i > dp.length) || (dp[i] == null)) ? 
> paZero : dp[i];
> if (gv.getGlyphPosition(i) != null) {
> Point2D gp  = gv.getGlyphPosition(i);
> double x= gp.getX() - initialPos.getX();
> double y= -(gp.getY() - initialPos.getY());
> double xd   = x - xoLast;
> double yd   = y - yoLast;
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc = x + pa[2];
> yc = y + pa[3];
> xoLast = x;
> yoLast = y;
> } else {
> double  xo  = xc + pa[0];
> double  yo  = yc + pa[1];
> double  xa  = f.getWidth(gc);
> double  ya  = 0;
> double  xd  = (xo - xoLast) / 1000f;
> double  yd  = (yo - yoLast) / 1000f;
>
> textUtil.writeTd(xd, yd);
> textUtil.writeTj((char) gc, true, false);
> xc += xa + pa[2];
> yc += ya + pa[3];
> xoLast = xo;
> yoLast = yo;
> }
> }
> {code}
> I also attached an example for testing, it can be opened in Batik for 
> comparison.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


RE: Support for Jakarta Servlet 6.0

2023-11-28 Thread Simon Steiner
Hi,

 

I was able to generate a pdf using fop war using tomcat 10.1, by adding


 

For mvn build I needed to add:

https://github.com/apache/xmlgraphics-fop/commit/1cc4244b69d8de060e8fb00e86d
4f2a9871e503d

 

Thanks

 

From: Gary Potagal  
Sent: 27 November 2023 17:27
To: fop-dev@xmlgraphics.apache.org
Subject: RE: Support for Jakarta Servlet 6.0

 

This doesn't work if the library that I'm dependent on is dependent on
javax:

 

https://stackoverflow.com/questions/72302174/tomcat-10-upgrade-cant-find-jav
ax-servlet-jsp-reference

 

From: Simon Steiner mailto:simonsteiner1...@gmail.com> > 
Sent: Thursday, November 23, 2023 3:21 AM
To: fop-dev@xmlgraphics.apache.org  
Subject: RE: Support for Jakarta Servlet 6.0

 


You don't often get email from simonsteiner1...@gmail.com
 . Learn why this is important
 



CAUTION: External Sender 

 

Hi,

 

tomcat 10 has a option to rewrite javax namespace to jarkarta at runtime

 

adding the single line "  " after the  in the main

conf/context.xml file

 

Thanks

 

From: Gary Potagal mailto:gary.pota...@wellsky.com> > 
Sent: 22 November 2023 16:48
To: fop-dev@xmlgraphics.apache.org  
Subject: Support for Jakarta Servlet 6.0

 

Hello,

 

Please consider providing support for Jakarta Servlet 6.0

 

- SpringBoot 2.7 is end of life on 18 Nov 2023

- SpringBoot 3.x requires JDK17 and Tomcat 10.1 - pls see discussion on:

 
https://stackoverflow.com/questions/75087509/spring-boot-3-and-spring-6-with
-tomcat-9 

- Tomcat 10.1 supports the Jakarta Servlet 6.0 only

 

In practice, it means going from javax.servlet to jakarta.servlet support.  

 

Is there a way to open a JIRA ticket for this?

 

 

Thank you in advance for your support!



[jira] [Resolved] (FOP-3162) Missing jars in servlet

2023-11-28 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3162.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/1cc4244b69d8de060e8fb00e86d4f2a9871e503d

> Missing jars in servlet
> ---
>
> Key: FOP-3162
> URL: https://issues.apache.org/jira/browse/FOP-3162
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
>
> Add fop-servlet.war to tomcat, no classpath error should occur



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (FOP-3162) Missing jars in servlet

2023-11-28 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3162:
---
Description: Add fop-servlet.war to tomcat, no classpath error should occur

> Missing jars in servlet
> ---
>
> Key: FOP-3162
> URL: https://issues.apache.org/jira/browse/FOP-3162
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
>
> Add fop-servlet.war to tomcat, no classpath error should occur



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (FOP-3162) Missing jars in servlet

2023-11-28 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3162:
--

 Summary: Missing jars in servlet
 Key: FOP-3162
 URL: https://issues.apache.org/jira/browse/FOP-3162
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner






--
This message was sent by Atlassian Jira
(v8.20.10#820010)