[jira] [Updated] (FOP-3194) Add image mask option for AFP

2024-07-24 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3194:
---
Description: 
fop test.fo -afp out.afp -c fop.xconf

You should see background colour instead of white for part of the image

> Add image mask option for AFP
> -
>
> Key: FOP-3194
> URL: https://issues.apache.org/jira/browse/FOP-3194
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, test.fo, trans2.png
>
>
> fop test.fo -afp out.afp -c fop.xconf
> You should see background colour instead of white for part of the image



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


[jira] [Resolved] (FOP-3194) Add image mask option for AFP

2024-07-24 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3194.

Fix Version/s: main
   Resolution: Fixed

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

> Add image mask option for AFP
> -
>
> Key: FOP-3194
> URL: https://issues.apache.org/jira/browse/FOP-3194
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: fop.xconf, test.fo, trans2.png
>
>
> fop test.fo -afp out.afp -c fop.xconf
> You should see background colour instead of white for part of the image



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


[jira] [Updated] (FOP-3194) Add image mask option for AFP

2024-07-24 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3194:
---
Attachment: test.fo

> Add image mask option for AFP
> -
>
> Key: FOP-3194
> URL: https://issues.apache.org/jira/browse/FOP-3194
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, test.fo, trans2.png
>
>




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


[jira] [Updated] (FOP-3194) Add image mask option for AFP

2024-07-24 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3194:
---
Attachment: trans2.png

> Add image mask option for AFP
> -
>
> Key: FOP-3194
> URL: https://issues.apache.org/jira/browse/FOP-3194
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, test.fo, trans2.png
>
>




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


[jira] [Created] (FOP-3194) Add image mask option for AFP

2024-07-24 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3194:
--

 Summary: Add image mask option for AFP
 Key: FOP-3194
 URL: https://issues.apache.org/jira/browse/FOP-3194
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner
 Attachments: fop.xconf, test.fo, trans2.png





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


[jira] [Updated] (FOP-3194) Add image mask option for AFP

2024-07-24 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3194:
---
Attachment: fop.xconf

> Add image mask option for AFP
> -
>
> Key: FOP-3194
> URL: https://issues.apache.org/jira/browse/FOP-3194
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, test.fo, trans2.png
>
>




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


[jira] [Commented] (FOP-3137) PDF Images - external-document layout broken

2024-07-19 Thread Rafael Witak (Jira)


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

Rafael Witak commented on FOP-3137:
---

Argh, of course, that's right. Now this approach also produces the IOException. 

 

For completeness, here's my method:
{code:java}
// App.java

public static void main(String[] args) throws IOException, SAXException {
try {
// Setup directories and files

File baseDir = new File(".");
File outDir = new File(baseDir, "out");
outDir.mkdirs();

File xmlfile = new File(baseDir, "empty.xml"); // just contains 
File xsltfile = new File(baseDir, "fo.xsl");
File configfile = new File(baseDir, "fop.xconf");

final FopFactory fopFactory = FopFactory.newInstance(configfile);

FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

File pdffile = new File(outDir, "test.pdf");

try (OutputStream out = new 
BufferedOutputStream(Files.newOutputStream(pdffile.toPath( {
// Construct fop with desired output format
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, 
out);

// Setup XSLT
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new 
StreamSource(xsltfile));

// Setup input for XSLT transformation
Source src = new StreamSource(xmlfile);

// Resulting SAX events (the generated FO) must be piped through to 
FOP
Result res = new SAXResult(fop.getDefaultHandler());

// Start XSLT transformation and FOP processing
transformer.transform(src, res);
}
} catch (Exception e) {
e.printStackTrace(System.err);
System.exit(-1);
}
} {code}
And the fo.xsl:
{code:java}

http://www.w3.org/1999/XSL/Transform;
xmlns:fo="http://www.w3.org/1999/XSL/Format;
xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>











 {code}
The fop.xconf is just the standard one with the addition of 
{{true}} under {{}}

 

> PDF Images - external-document layout broken
> 
>
> Key: FOP-3137
> URL: https://issues.apache.org/jira/browse/FOP-3137
> Project: FOP
>  Issue Type: Bug
> Environment: Windows 10.0.19045 Build 19045
> Java 17
> FOP 2.8
> PDF Images 2.8
>Reporter: Rafael Witak
>Priority: Major
> Attachments: image-2023-07-13-16-46-26-626.png, 
> image-2023-07-13-16-47-09-093.png, older.pdf, original.pdf, output.pdf
>
>
> When including the PDFs of one of our customers, the layout gets messed up, 
> turning this: 
> !image-2023-07-13-16-47-09-093.png|width=349,height=265!
> into this:
> !image-2023-07-13-16-46-26-626.png|width=350,height=284!
>  
> The customer recently switched to PDF 1.7, all of their PDFs get messed up 
> ever since. 
> There are no FOP events in the log, checking the resulting PDF with _pdfcpu_ 
> validates perfectly, even with strict mode on. 
> Setting strict-validation in the renderer also doesn't produce any errors. 
> The problem happens regardless of the version of FOP and fop-pdf-images used. 
> The FO input for reproduction can be reduced to 
> {{http://www.w3.org/1999/XSL/Format"}}
> {{xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>}}
> {{  }}
> {{    }}
> {{      }}
> {{    }}
> {{  }}
> {{  }}
> {{{}{}}}{{{}{}}}
>  
> Various problems regarding layouts are mentioned in the "Known Issues". 
> There is also the general statement _"Apache FOP currently generates PDF 1.4. 
> If you include a PDF with a higher PDF version, the results may be 
> unpredictable."_ to be found (That said, setting different versions in the 
> renderer did not solve the problem).
> Please let me know, if this is out of scope for the project - and if it is, 
> please provide me with any workarounds you might know of!
>  
> (Included are one of the originals together with its output, as well as an 
> older PDF of the same customer which works as expected. )



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


[jira] [Commented] (FOP-3137) PDF Images - external-document layout broken

2024-07-19 Thread Simon Steiner (Jira)


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

Simon Steiner commented on FOP-3137:


You did which is wrong:
final FopFactory fopFactory = FopFactory.newInstance(configfile.toURI());
Can you do instead:
final FopFactory fopFactory = FopFactory.newInstance(configfile);

> PDF Images - external-document layout broken
> 
>
> Key: FOP-3137
> URL: https://issues.apache.org/jira/browse/FOP-3137
> Project: FOP
>  Issue Type: Bug
> Environment: Windows 10.0.19045 Build 19045
> Java 17
> FOP 2.8
> PDF Images 2.8
>Reporter: Rafael Witak
>Priority: Major
> Attachments: image-2023-07-13-16-46-26-626.png, 
> image-2023-07-13-16-47-09-093.png, older.pdf, original.pdf, output.pdf
>
>
> When including the PDFs of one of our customers, the layout gets messed up, 
> turning this: 
> !image-2023-07-13-16-47-09-093.png|width=349,height=265!
> into this:
> !image-2023-07-13-16-46-26-626.png|width=350,height=284!
>  
> The customer recently switched to PDF 1.7, all of their PDFs get messed up 
> ever since. 
> There are no FOP events in the log, checking the resulting PDF with _pdfcpu_ 
> validates perfectly, even with strict mode on. 
> Setting strict-validation in the renderer also doesn't produce any errors. 
> The problem happens regardless of the version of FOP and fop-pdf-images used. 
> The FO input for reproduction can be reduced to 
> {{http://www.w3.org/1999/XSL/Format"}}
> {{xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>}}
> {{  }}
> {{    }}
> {{      }}
> {{    }}
> {{  }}
> {{  }}
> {{{}{}}}{{{}{}}}
>  
> Various problems regarding layouts are mentioned in the "Known Issues". 
> There is also the general statement _"Apache FOP currently generates PDF 1.4. 
> If you include a PDF with a higher PDF version, the results may be 
> unpredictable."_ to be found (That said, setting different versions in the 
> renderer did not solve the problem).
> Please let me know, if this is out of scope for the project - and if it is, 
> please provide me with any workarounds you might know of!
>  
> (Included are one of the originals together with its output, as well as an 
> older PDF of the same customer which works as expected. )



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


[jira] [Commented] (FOP-3137) PDF Images - external-document layout broken

2024-07-19 Thread Rafael Witak (Jira)


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

Rafael Witak commented on FOP-3137:
---

I was including the config file in my test project with
{{File configfile = Path.of(baseDir.getAbsolutePath(), "fop.xconf").toFile();}}
{{final FopFactory fopFactory = FopFactory.newInstance(configfile.toURI());}}
similar to [https://xmlgraphics.apache.org/fop/2.9/embedding.html#basics]

This didn't work.

However doing this: 
{{File configfile = Path.of(baseDir.getAbsolutePath(), "fop.xconf").toFile();}}
{{Configuration cfg = new 
DefaultConfigurationBuilder().buildFromFile(configfile);}}
{{final FopFactory fopFactory = new FopFactoryBuilder(baseDir.toURI())}}
{{ .setConfiguration(cfg)}}
{{ .build();}}
did work. Kind of. It did get me to the point of getting the IOException 
[~daveroxburgh] described in his comment above. ({{{}external-document{}}}-ing 
a PNG instead of a PDF worked fine, though). 
 
 
Now to the strange part. I managed to set a config file in my company's project 
analogous to the way I just described. I configured the renderer like this:

{{}}
{{  PDF/A-2}}
{{  1.7}}
{{  true}}
{{  ...}}
and our layout problem seems to have gone away, everything looks nice now. No 
Errors. 
 
I don't quite know what to make of this. Your instict about the 
{{form-xobject}} has proven to be correct, but there are a few bugs or pitfalls 
along the way, and I still can't manage to get my test app working. (BTW, when 
also setting {{{}true{}}}, the included PDF is just 
a blank page, but I don't care about the fonts right now...)  

> PDF Images - external-document layout broken
> 
>
> Key: FOP-3137
> URL: https://issues.apache.org/jira/browse/FOP-3137
> Project: FOP
>  Issue Type: Bug
> Environment: Windows 10.0.19045 Build 19045
> Java 17
> FOP 2.8
> PDF Images 2.8
>Reporter: Rafael Witak
>Priority: Major
> Attachments: image-2023-07-13-16-46-26-626.png, 
> image-2023-07-13-16-47-09-093.png, older.pdf, original.pdf, output.pdf
>
>
> When including the PDFs of one of our customers, the layout gets messed up, 
> turning this: 
> !image-2023-07-13-16-47-09-093.png|width=349,height=265!
> into this:
> !image-2023-07-13-16-46-26-626.png|width=350,height=284!
>  
> The customer recently switched to PDF 1.7, all of their PDFs get messed up 
> ever since. 
> There are no FOP events in the log, checking the resulting PDF with _pdfcpu_ 
> validates perfectly, even with strict mode on. 
> Setting strict-validation in the renderer also doesn't produce any errors. 
> The problem happens regardless of the version of FOP and fop-pdf-images used. 
> The FO input for reproduction can be reduced to 
> {{http://www.w3.org/1999/XSL/Format"}}
> {{xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>}}
> {{  }}
> {{    }}
> {{      }}
> {{    }}
> {{  }}
> {{  }}
> {{{}{}}}{{{}{}}}
>  
> Various problems regarding layouts are mentioned in the "Known Issues". 
> There is also the general statement _"Apache FOP currently generates PDF 1.4. 
> If you include a PDF with a higher PDF version, the results may be 
> unpredictable."_ to be found (That said, setting different versions in the 
> renderer did not solve the problem).
> Please let me know, if this is out of scope for the project - and if it is, 
> please provide me with any workarounds you might know of!
>  
> (Included are one of the originals together with its output, as well as an 
> older PDF of the same customer which works as expected. )



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


[jira] [Created] (FOP-3193) Font auto-detection crashes on systems with internally recursive font directories

2024-07-18 Thread Jira
Julian Müller created FOP-3193:
--

 Summary: Font auto-detection crashes on systems with internally 
recursive font directories
 Key: FOP-3193
 URL: https://issues.apache.org/jira/browse/FOP-3193
 Project: FOP
  Issue Type: Bug
Affects Versions: 2.9
Reporter: Julian Müller


A user reported to us that our application crashes when exporting to PDF. We 
traced it down to the fact that FOP's FontFileFinder was infinitely recursing 
over font directories on that user's system, i.e., a font directory on this 
user's system contained itself.

This potential infinite recursion is currently hardcoded in 
FontDetectorFactory.DefaultFontFactory.detect():

{code:java}
// search in font base if it is defined and
// is a directory but don't recurse
FontFileFinder fontFileFinder = new FontFileFinder(eventListener);
[...]
List systemFontList;
systemFontList = fontFileFinder.find();
{code}
Note that the leading comment at the top is not true: The font file finder 
potentially recurses to an arbitrary depth when this constructor is called.

I think FOP should set a reasonable limit on the recursion depth when 
auto-detecting fonts to avoid crashing on systems with recursive directory 
structures, or it might even be preferable to make the maximum recursion depth 
in the font auto-detect feature configurable for users of FOP. As things stand, 
it is hard to defend against this issue because FOP makes it difficult to avoid 
the infinite recursion when the font auto-detection feature is enabled (e.g., 
PDFTranscoder hardcodes the usage of PDFDocumentGraphics2DConfigurator, which 
hardcodes the usage of the default font detector, which hardcodes the infinite 
recursion).



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


[jira] [Commented] (FOP-3137) PDF Images - external-document layout broken

2024-07-18 Thread Simon Steiner (Jira)


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

Simon Steiner commented on FOP-3137:


how are you including the fop.xconf, its passed using the fop api, not thru the 
fo file

> PDF Images - external-document layout broken
> 
>
> Key: FOP-3137
> URL: https://issues.apache.org/jira/browse/FOP-3137
> Project: FOP
>  Issue Type: Bug
> Environment: Windows 10.0.19045 Build 19045
> Java 17
> FOP 2.8
> PDF Images 2.8
>Reporter: Rafael Witak
>Priority: Major
> Attachments: image-2023-07-13-16-46-26-626.png, 
> image-2023-07-13-16-47-09-093.png, older.pdf, original.pdf, output.pdf
>
>
> When including the PDFs of one of our customers, the layout gets messed up, 
> turning this: 
> !image-2023-07-13-16-47-09-093.png|width=349,height=265!
> into this:
> !image-2023-07-13-16-46-26-626.png|width=350,height=284!
>  
> The customer recently switched to PDF 1.7, all of their PDFs get messed up 
> ever since. 
> There are no FOP events in the log, checking the resulting PDF with _pdfcpu_ 
> validates perfectly, even with strict mode on. 
> Setting strict-validation in the renderer also doesn't produce any errors. 
> The problem happens regardless of the version of FOP and fop-pdf-images used. 
> The FO input for reproduction can be reduced to 
> {{http://www.w3.org/1999/XSL/Format"}}
> {{xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>}}
> {{  }}
> {{    }}
> {{      }}
> {{    }}
> {{  }}
> {{  }}
> {{{}{}}}{{{}{}}}
>  
> Various problems regarding layouts are mentioned in the "Known Issues". 
> There is also the general statement _"Apache FOP currently generates PDF 1.4. 
> If you include a PDF with a higher PDF version, the results may be 
> unpredictable."_ to be found (That said, setting different versions in the 
> renderer did not solve the problem).
> Please let me know, if this is out of scope for the project - and if it is, 
> please provide me with any workarounds you might know of!
>  
> (Included are one of the originals together with its output, as well as an 
> older PDF of the same customer which works as expected. )



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


[jira] [Commented] (FOP-3137) PDF Images - external-document layout broken

2024-07-18 Thread Rafael Witak (Jira)


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

Rafael Witak commented on FOP-3137:
---

[~ssteiner] Thanks for the quick reply! We have apparently refrained from using 
a {{fop.xconf}} at all and use it neither in production nor in the reduced test 
case we are talking about here. 
Unfortunately, I haven't found a way around the 
{{*org.apache.xmlgraphics.image.loader.ImageException: The file format is not 
supported. No ImagePreloader...*}} that gets thrown any time I _do_ try to 
include a {{{}fop.xconf{}}}. This problem seems to be caused by "overlapping" 
dependencies in Maven - according to the web - but none of the proposed 
solutions I have found so far do the trick for me (reordering dependencies, 
exclusion, maven-shade-plugin...). 

Would you happen to have a minimal working {{pom.xml}} for me so I could test 
your proposed solution?

> PDF Images - external-document layout broken
> 
>
> Key: FOP-3137
> URL: https://issues.apache.org/jira/browse/FOP-3137
> Project: FOP
>  Issue Type: Bug
> Environment: Windows 10.0.19045 Build 19045
> Java 17
> FOP 2.8
> PDF Images 2.8
>Reporter: Rafael Witak
>Priority: Major
> Attachments: image-2023-07-13-16-46-26-626.png, 
> image-2023-07-13-16-47-09-093.png, older.pdf, original.pdf, output.pdf
>
>
> When including the PDFs of one of our customers, the layout gets messed up, 
> turning this: 
> !image-2023-07-13-16-47-09-093.png|width=349,height=265!
> into this:
> !image-2023-07-13-16-46-26-626.png|width=350,height=284!
>  
> The customer recently switched to PDF 1.7, all of their PDFs get messed up 
> ever since. 
> There are no FOP events in the log, checking the resulting PDF with _pdfcpu_ 
> validates perfectly, even with strict mode on. 
> Setting strict-validation in the renderer also doesn't produce any errors. 
> The problem happens regardless of the version of FOP and fop-pdf-images used. 
> The FO input for reproduction can be reduced to 
> {{http://www.w3.org/1999/XSL/Format"}}
> {{xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>}}
> {{  }}
> {{    }}
> {{      }}
> {{    }}
> {{  }}
> {{  }}
> {{{}{}}}{{{}{}}}
>  
> Various problems regarding layouts are mentioned in the "Known Issues". 
> There is also the general statement _"Apache FOP currently generates PDF 1.4. 
> If you include a PDF with a higher PDF version, the results may be 
> unpredictable."_ to be found (That said, setting different versions in the 
> renderer did not solve the problem).
> Please let me know, if this is out of scope for the project - and if it is, 
> please provide me with any workarounds you might know of!
>  
> (Included are one of the originals together with its output, as well as an 
> older PDF of the same customer which works as expected. )



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


[jira] [Commented] (FOP-3137) PDF Images - external-document layout broken

2024-07-16 Thread Simon Steiner (Jira)


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

Simon Steiner commented on FOP-3137:


If you add true to pdf section in fop.xconf, does 
that help?

> PDF Images - external-document layout broken
> 
>
> Key: FOP-3137
> URL: https://issues.apache.org/jira/browse/FOP-3137
> Project: FOP
>  Issue Type: Bug
> Environment: Windows 10.0.19045 Build 19045
> Java 17
> FOP 2.8
> PDF Images 2.8
>Reporter: Rafael Witak
>Priority: Major
> Attachments: image-2023-07-13-16-46-26-626.png, 
> image-2023-07-13-16-47-09-093.png, older.pdf, original.pdf, output.pdf
>
>
> When including the PDFs of one of our customers, the layout gets messed up, 
> turning this: 
> !image-2023-07-13-16-47-09-093.png|width=349,height=265!
> into this:
> !image-2023-07-13-16-46-26-626.png|width=350,height=284!
>  
> The customer recently switched to PDF 1.7, all of their PDFs get messed up 
> ever since. 
> There are no FOP events in the log, checking the resulting PDF with _pdfcpu_ 
> validates perfectly, even with strict mode on. 
> Setting strict-validation in the renderer also doesn't produce any errors. 
> The problem happens regardless of the version of FOP and fop-pdf-images used. 
> The FO input for reproduction can be reduced to 
> {{http://www.w3.org/1999/XSL/Format"}}
> {{xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>}}
> {{  }}
> {{    }}
> {{      }}
> {{    }}
> {{  }}
> {{  }}
> {{{}{}}}{{{}{}}}
>  
> Various problems regarding layouts are mentioned in the "Known Issues". 
> There is also the general statement _"Apache FOP currently generates PDF 1.4. 
> If you include a PDF with a higher PDF version, the results may be 
> unpredictable."_ to be found (That said, setting different versions in the 
> renderer did not solve the problem).
> Please let me know, if this is out of scope for the project - and if it is, 
> please provide me with any workarounds you might know of!
>  
> (Included are one of the originals together with its output, as well as an 
> older PDF of the same customer which works as expected. )



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


[jira] [Commented] (FOP-3137) PDF Images - external-document layout broken

2024-07-16 Thread Rafael Witak (Jira)


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

Rafael Witak commented on FOP-3137:
---

The issue is still unresolved in FOP PDF Images 2.9.

> PDF Images - external-document layout broken
> 
>
> Key: FOP-3137
> URL: https://issues.apache.org/jira/browse/FOP-3137
> Project: FOP
>  Issue Type: Bug
> Environment: Windows 10.0.19045 Build 19045
> Java 17
> FOP 2.8
> PDF Images 2.8
>Reporter: Rafael Witak
>Priority: Major
> Attachments: image-2023-07-13-16-46-26-626.png, 
> image-2023-07-13-16-47-09-093.png, older.pdf, original.pdf, output.pdf
>
>
> When including the PDFs of one of our customers, the layout gets messed up, 
> turning this: 
> !image-2023-07-13-16-47-09-093.png|width=349,height=265!
> into this:
> !image-2023-07-13-16-46-26-626.png|width=350,height=284!
>  
> The customer recently switched to PDF 1.7, all of their PDFs get messed up 
> ever since. 
> There are no FOP events in the log, checking the resulting PDF with _pdfcpu_ 
> validates perfectly, even with strict mode on. 
> Setting strict-validation in the renderer also doesn't produce any errors. 
> The problem happens regardless of the version of FOP and fop-pdf-images used. 
> The FO input for reproduction can be reduced to 
> {{http://www.w3.org/1999/XSL/Format"}}
> {{xmlns:fox="http://xmlgraphics.apache.org/fop/extensions;>}}
> {{  }}
> {{    }}
> {{      }}
> {{    }}
> {{  }}
> {{  }}
> {{{}{}}}{{{}{}}}
>  
> Various problems regarding layouts are mentioned in the "Known Issues". 
> There is also the general statement _"Apache FOP currently generates PDF 1.4. 
> If you include a PDF with a higher PDF version, the results may be 
> unpredictable."_ to be found (That said, setting different versions in the 
> renderer did not solve the problem).
> Please let me know, if this is out of scope for the project - and if it is, 
> please provide me with any workarounds you might know of!
>  
> (Included are one of the originals together with its output, as well as an 
> older PDF of the same customer which works as expected. )



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


[jira] [Resolved] (FOP-3192) Skip page position only for multicolumn layout

2024-07-16 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3192.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/eb335e3f4be1670ef58a608f492f97f6c566c824

> Skip page position only for multicolumn layout
> --
>
> Key: FOP-3192
> URL: https://issues.apache.org/jira/browse/FOP-3192
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: simple.fo
>
>
> fop simple.fo out.pdf
> Output should be in blue



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


[jira] [Updated] (FOP-3192) Skip page position only for multicolumn layout

2024-07-16 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3192:
---
Description: 
fop simple.fo out.pdf
Output should be in blue

> Skip page position only for multicolumn layout
> --
>
> Key: FOP-3192
> URL: https://issues.apache.org/jira/browse/FOP-3192
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: simple.fo
>
>
> fop simple.fo out.pdf
> Output should be in blue



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


[jira] [Updated] (FOP-3192) Skip page position only for multicolumn layout

2024-07-16 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3192:
---
Attachment: simple.fo

> Skip page position only for multicolumn layout
> --
>
> Key: FOP-3192
> URL: https://issues.apache.org/jira/browse/FOP-3192
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: simple.fo
>
>




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


[jira] [Created] (FOP-3192) Skip page position only for multicolumn layout

2024-07-16 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3192:
--

 Summary: Skip page position only for multicolumn layout
 Key: FOP-3192
 URL: https://issues.apache.org/jira/browse/FOP-3192
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner






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


[jira] [Resolved] (FOP-3135) [PATCH] SVG tspan content is displayed out of place

2024-07-15 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3135.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-batik/commit/ccfb34fb8e430dc9fb38d44612e60f6588051990
https://github.com/apache/xmlgraphics-commons/commit/ec49c29700d3380d7b382bcde634d38203c9c2b0
https://github.com/apache/xmlgraphics-fop/commit/ef173cf4b2da33f2b84df3d17ecb71c1273c6e20

> [PATCH] SVG tspan content is displayed out of place
> ---
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Fix For: main
>
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, batik.patch, 
> commons.patch, fop.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] [Updated] (FOP-3135) [PATCH] SVG tspan content is displayed out of place

2024-07-15 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: batik.patch
fop.patch
commons.patch

> [PATCH] SVG tspan content is displayed out of place
> ---
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, batik.patch, 
> commons.patch, fop.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] [Updated] (FOP-3135) [PATCH] SVG tspan content is displayed out of place

2024-07-15 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svgBatik.patch)

> [PATCH] SVG tspan content is displayed out of place
> ---
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, batik.patch, 
> commons.patch, fop.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] [Updated] (FOP-3135) [PATCH] SVG tspan content is displayed out of place

2024-07-15 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: fop.patch)

> [PATCH] SVG tspan content is displayed out of place
> ---
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, batik.patch, 
> commons.patch, fop.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] [Updated] (FOP-3135) [PATCH] SVG tspan content is displayed out of place

2024-07-15 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svgCommon.patch)

> [PATCH] SVG tspan content is displayed out of place
> ---
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svgBatik.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] [Resolved] (FOP-3190) NPE when list item is split alongside an ipd change

2024-07-15 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3190.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/c04cbfb5cf645a4b81fd107a4b300c2d9202b016

> NPE when list item is split alongside an ipd change
> ---
>
> Key: FOP-3190
> URL: https://issues.apache.org/jira/browse/FOP-3190
> Project: FOP
>  Issue Type: Bug
>Reporter: João André Gonçalves
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: fop.patch
>
>
> When using a list that spans multiple pages with different margins, a NPE is 
> thrown



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


[jira] [Updated] (FOP-3190) NPE when list item is split alongside an ipd change

2024-07-15 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3190:
---
Summary: NPE when list item is split alongside an ipd change  (was: 
Document generation may fail when there is a change of widths between pages)

> NPE when list item is split alongside an ipd change
> ---
>
> Key: FOP-3190
> URL: https://issues.apache.org/jira/browse/FOP-3190
> Project: FOP
>  Issue Type: Bug
>Reporter: João André Gonçalves
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.patch
>
>
> When using a list that spans multiple pages with different margins, a NPE is 
> thrown



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


[jira] [Assigned] (FOP-3190) Document generation may fail when there is a change of widths between pages

2024-07-15 Thread Simon Steiner (Jira)


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

Simon Steiner reassigned FOP-3190:
--

Assignee: Simon Steiner

> Document generation may fail when there is a change of widths between pages
> ---
>
> Key: FOP-3190
> URL: https://issues.apache.org/jira/browse/FOP-3190
> Project: FOP
>  Issue Type: Bug
>Reporter: João André Gonçalves
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.patch
>
>
> When using a list that spans multiple pages with different margins, a NPE is 
> thrown



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


[jira] [Updated] (FOP-3191) AFP File missing MODCA Mandatory Triplet

2024-07-12 Thread Jira


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

João André Gonçalves updated FOP-3191:
--
Attachment: fop.patch

> AFP File missing MODCA Mandatory Triplet
> 
>
> Key: FOP-3191
> URL: https://issues.apache.org/jira/browse/FOP-3191
> Project: FOP
>  Issue Type: Bug
>Reporter: João André Gonçalves
>Priority: Minor
> Attachments: fop.patch
>
>
> We are generating afp files that are not compliant with the MO:DCA 
> requirements



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


[jira] [Created] (FOP-3191) AFP File missing MODCA Mandatory Triplet

2024-07-12 Thread Jira
João André Gonçalves created FOP-3191:
-

 Summary: AFP File missing MODCA Mandatory Triplet
 Key: FOP-3191
 URL: https://issues.apache.org/jira/browse/FOP-3191
 Project: FOP
  Issue Type: Bug
Reporter: João André Gonçalves


We are generating afp files that are not compliant with the MO:DCA requirements



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


[jira] [Created] (FOP-3190) Document generation may fail when there is a change of widths between pages

2024-07-12 Thread Jira
João André Gonçalves created FOP-3190:
-

 Summary: Document generation may fail when there is a change of 
widths between pages
 Key: FOP-3190
 URL: https://issues.apache.org/jira/browse/FOP-3190
 Project: FOP
  Issue Type: Bug
Reporter: João André Gonçalves
 Attachments: fop.patch

When using a list that spans multiple pages with different margins, a NPE is 
thrown



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


[jira] [Updated] (FOP-3190) Document generation may fail when there is a change of widths between pages

2024-07-12 Thread Jira


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

João André Gonçalves updated FOP-3190:
--
Attachment: fop.patch

> Document generation may fail when there is a change of widths between pages
> ---
>
> Key: FOP-3190
> URL: https://issues.apache.org/jira/browse/FOP-3190
> Project: FOP
>  Issue Type: Bug
>Reporter: João André Gonçalves
>Priority: Major
> Attachments: fop.patch
>
>
> When using a list that spans multiple pages with different margins, a NPE is 
> thrown



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


[jira] [Commented] (FOP-3188) Support jakarta EE API

2024-07-11 Thread Packiaraj Sakkanan (Jira)


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

Packiaraj Sakkanan commented on FOP-3188:
-

Thanks [~ssteiner] for fixing it.

> Support  jakarta EE API
> ---
>
> Key: FOP-3188
> URL: https://issues.apache.org/jira/browse/FOP-3188
> Project: FOP
>  Issue Type: Improvement
>Reporter: Packiaraj Sakkanan
>Assignee: Simon Steiner
>Priority: Major
>  Labels: EE, Jakarta
> Fix For: main
>
>
> Fop core does not support Jakarta EE APIs. 
> Here is the code reference : 
> [https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/servlet/FopServlet.java#L29-L32]
> I am not seeing any issues open to support JakartaEE. 



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


[jira] [Resolved] (FOP-3188) Support jakarta EE API

2024-07-11 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3188.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/639d5b608224d566443a21efd85432a1dddb734a

> Support  jakarta EE API
> ---
>
> Key: FOP-3188
> URL: https://issues.apache.org/jira/browse/FOP-3188
> Project: FOP
>  Issue Type: Improvement
>Reporter: Packiaraj Sakkanan
>Assignee: Simon Steiner
>Priority: Major
>  Labels: EE, Jakarta
> Fix For: main
>
>
> Fop core does not support Jakarta EE APIs. 
> Here is the code reference : 
> [https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/servlet/FopServlet.java#L29-L32]
> I am not seeing any issues open to support JakartaEE. 



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


[jira] [Assigned] (FOP-3188) Support jakarta EE API

2024-07-11 Thread Simon Steiner (Jira)


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

Simon Steiner reassigned FOP-3188:
--

Assignee: Simon Steiner

> Support  jakarta EE API
> ---
>
> Key: FOP-3188
> URL: https://issues.apache.org/jira/browse/FOP-3188
> Project: FOP
>  Issue Type: Improvement
>Reporter: Packiaraj Sakkanan
>Assignee: Simon Steiner
>Priority: Major
>  Labels: EE, Jakarta
>
> Fop core does not support Jakarta EE APIs. 
> Here is the code reference : 
> [https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/servlet/FopServlet.java#L29-L32]
> I am not seeing any issues open to support JakartaEE. 



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


[jira] [Commented] (FOP-3188) Support jakarta EE API

2024-07-10 Thread Packiaraj Sakkanan (Jira)


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

Packiaraj Sakkanan commented on FOP-3188:
-

Thanks [~ssteiner]. The issue with such runtime workaround is, application code 
code is already migrated to jakartaEE but the dependency api still expects in 
JavaEE format.  It leaves IDE in broken state, i.e.,  lot of compilation issues 
as`javax.servlet.http.HttpServletRequest` is not the same as 
`jakarta.servlet.http.HttpServletRequest`, affecting developer 
productivity/experience 

> Support  jakarta EE API
> ---
>
> Key: FOP-3188
> URL: https://issues.apache.org/jira/browse/FOP-3188
> Project: FOP
>  Issue Type: Improvement
>Reporter: Packiaraj Sakkanan
>Priority: Major
>  Labels: EE, Jakarta
>
> Fop core does not support Jakarta EE APIs. 
> Here is the code reference : 
> [https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/servlet/FopServlet.java#L29-L32]
> I am not seeing any issues open to support JakartaEE. 



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


[jira] [Closed] (FOP-3189) Invoke Medium Map is lost when generating a document with multiple page-sequences in the layout

2024-07-10 Thread Jira


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

João André Gonçalves closed FOP-3189.
-
Resolution: Resolved

> Invoke Medium Map is lost when generating a document with multiple 
> page-sequences in the layout
> ---
>
> Key: FOP-3189
> URL: https://issues.apache.org/jira/browse/FOP-3189
> Project: FOP
>  Issue Type: Bug
>Reporter: João André Gonçalves
>Priority: Minor
>
> IMM extension id used in multiple page sequences, but when the AFP is 
> generated the IMM is missing from the output



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


[jira] [Created] (FOP-3189) Invoke Medium Map is lost when generating a document with multiple page-sequences in the layout

2024-07-10 Thread Jira
João André Gonçalves created FOP-3189:
-

 Summary: Invoke Medium Map is lost when generating a document with 
multiple page-sequences in the layout
 Key: FOP-3189
 URL: https://issues.apache.org/jira/browse/FOP-3189
 Project: FOP
  Issue Type: Bug
Reporter: João André Gonçalves


IMM extension id used in multiple page sequences, but when the AFP is generated 
the IMM is missing from the output



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


[jira] [Commented] (FOP-3188) Support jakarta EE API

2024-07-09 Thread Simon Steiner (Jira)


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

Simon Steiner commented on FOP-3188:


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


> Support  jakarta EE API
> ---
>
> Key: FOP-3188
> URL: https://issues.apache.org/jira/browse/FOP-3188
> Project: FOP
>  Issue Type: Improvement
>Reporter: Packiaraj Sakkanan
>Priority: Major
>  Labels: EE, Jakarta
>
> Fop core does not support Jakarta EE APIs. 
> Here is the code reference : 
> [https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/servlet/FopServlet.java#L29-L32]
> I am not seeing any issues open to support JakartaEE. 



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


[jira] [Created] (FOP-3188) Support jakarta EE API

2024-07-08 Thread Packiaraj Sakkanan (Jira)
Packiaraj Sakkanan created FOP-3188:
---

 Summary: Support  jakarta EE API
 Key: FOP-3188
 URL: https://issues.apache.org/jira/browse/FOP-3188
 Project: FOP
  Issue Type: Improvement
Reporter: Packiaraj Sakkanan


Fop core does not support Jakarta EE APIs. 
Here is the code reference : 
[https://github.com/apache/xmlgraphics-fop/blob/main/fop-core/src/main/java/org/apache/fop/servlet/FopServlet.java#L29-L32]

I am not seeing any issues open to support JakartaEE. 



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


[jira] [Updated] (FOP-3187) Unexpected size of the SVG image if dimensions are not specified

2024-06-24 Thread Jira


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

Jan Tošovský updated FOP-3187:
--
Component/s: image/svg
 (was: layout/block)
Summary: Unexpected size of the SVG image if dimensions are not 
specified  (was: Unexpected height of absolutely positioned block-container 
filled with SVG image)

Changing the subject as the issue is caused by missing width/height dimensions 
in the SVG file. This issue is rather Batik's behavior. In XEP, default 
dimensions are taken from viewBox. In Batik, missing dimensions are set to 
400x400 px.

> Unexpected size of the SVG image if dimensions are not specified
> 
>
> Key: FOP-3187
> URL: https://issues.apache.org/jira/browse/FOP-3187
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Affects Versions: 2.9
>Reporter: Jan Tošovský
>Priority: Major
> Attachments: container_no_scaling.fo, container_no_scaling_fop.pdf, 
> container_no_scaling_xep.pdf, container_scaling.fo, 
> container_scaling_fop.pdf, container_scaling_xep.pdf, image.png, image.svg
>
>
> The container height equals its width if the absolutely positioned 
> block-container is filled with an SVG image. It works fine with raster images.
> See container_scaling.fo with generated PDF outputs in FOP and XEP.
> Comparing FOP and XEP outputs I can also see the difference in the default 
> size if scaling is not specified, see container_no_scaling.fo with PDF 
> outputs.



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


[jira] [Created] (FOP-3187) Unexpected height of absolutely positioned block-container filled with SVG image

2024-06-21 Thread Jira
Jan Tošovský created FOP-3187:
-

 Summary: Unexpected height of absolutely positioned 
block-container filled with SVG image
 Key: FOP-3187
 URL: https://issues.apache.org/jira/browse/FOP-3187
 Project: FOP
  Issue Type: Bug
  Components: layout/block
Affects Versions: 2.9
Reporter: Jan Tošovský
 Attachments: container_no_scaling.fo, container_no_scaling_fop.pdf, 
container_no_scaling_xep.pdf, container_scaling.fo, container_scaling_fop.pdf, 
container_scaling_xep.pdf, image.png, image.svg

The container height equals its width if the absolutely positioned 
block-container is filled with an SVG image. It works fine with raster images.

See container_scaling.fo with generated PDF outputs in FOP and XEP.

Comparing FOP and XEP outputs I can also see the difference in the default size 
if scaling is not specified, see container_no_scaling.fo with PDF outputs.



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


[jira] [Resolved] (FOP-3186) Only support 1 column for redo of layout without page pos only

2024-06-21 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3186.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/12e2889f4e86bd99cb2bc5e5a183e275e22c91de

> Only support 1 column for redo of layout without page pos only
> --
>
> Key: FOP-3186
> URL: https://issues.apache.org/jira/browse/FOP-3186
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: test.fo
>
>
> fop test.fo out.pdf
> Output should be red



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


[jira] [Updated] (FOP-3186) Only support 1 column for redo of layout without page pos only

2024-06-21 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3186:
---
Description: 
fop test.fo out.pdf
Output should be red

> Only support 1 column for redo of layout without page pos only
> --
>
> Key: FOP-3186
> URL: https://issues.apache.org/jira/browse/FOP-3186
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: test.fo
>
>
> fop test.fo out.pdf
> Output should be red



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


[jira] [Created] (FOP-3186) Only support 1 column for redo of layout without page pos only

2024-06-21 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3186:
--

 Summary: Only support 1 column for redo of layout without page pos 
only
 Key: FOP-3186
 URL: https://issues.apache.org/jira/browse/FOP-3186
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner
 Attachments: test.fo





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


[jira] [Updated] (FOP-3186) Only support 1 column for redo of layout without page pos only

2024-06-21 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3186:
---
Attachment: test.fo

> Only support 1 column for redo of layout without page pos only
> --
>
> Key: FOP-3186
> URL: https://issues.apache.org/jira/browse/FOP-3186
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: test.fo
>
>




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


[jira] [Updated] (FOP-3185) Exclude shape not in clipping path for AFP

2024-06-13 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3185:
---
Attachment: test.fo

> Exclude shape not in clipping path for AFP
> --
>
> Key: FOP-3185
> URL: https://issues.apache.org/jira/browse/FOP-3185
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: adobe.pdf, test.fo
>
>




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


[jira] [Resolved] (FOP-3185) Exclude shape not in clipping path for AFP

2024-06-13 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3185.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/b8a6ee005de66e26ba4418c611985f68f323e230

> Exclude shape not in clipping path for AFP
> --
>
> Key: FOP-3185
> URL: https://issues.apache.org/jira/browse/FOP-3185
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: adobe.pdf, test.fo
>
>
> fop test.fo -afp out5.afp
> Output should match input pdf



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


[jira] [Updated] (FOP-3185) Exclude shape not in clipping path for AFP

2024-06-13 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3185:
---
Description: 
fop test.fo -afp out5.afp

Output should match input pdf

> Exclude shape not in clipping path for AFP
> --
>
> Key: FOP-3185
> URL: https://issues.apache.org/jira/browse/FOP-3185
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: adobe.pdf, test.fo
>
>
> fop test.fo -afp out5.afp
> Output should match input pdf



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


[jira] [Updated] (FOP-3185) Exclude shape not in clipping path for AFP

2024-06-13 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3185:
---
Attachment: adobe.pdf

> Exclude shape not in clipping path for AFP
> --
>
> Key: FOP-3185
> URL: https://issues.apache.org/jira/browse/FOP-3185
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: adobe.pdf, test.fo
>
>




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


[jira] [Created] (FOP-3185) Exclude shape not in clipping path for AFP

2024-06-13 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3185:
--

 Summary: Exclude shape not in clipping path for AFP
 Key: FOP-3185
 URL: https://issues.apache.org/jira/browse/FOP-3185
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner






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


[jira] [Resolved] (FOP-3184) Allow change of resource level for SVG in AFP

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3184.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/742784c4a90d18174682aa871b8d4b35a2ea2d1d

> Allow change of resource level for SVG in AFP
> -
>
> Key: FOP-3184
> URL: https://issues.apache.org/jira/browse/FOP-3184
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: 691675404.svg, fop.xconf, test.fo
>
>
> fop test.fo -c fop.xconf -afp out.afp
> Open in AFP Lookup
> IPS is used in the page to refer to the SVG, in the resource group



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


[jira] [Updated] (FOP-3184) Allow change of resource level for SVG in AFP

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3184:
---
Description: 
fop test.fo -c fop.xconf -afp out.afp

Open in AFP Lookup
IPS is used in the page to refer to the SVG, in the resource group


  was:
fop test.fo -c fop.xconf -afp out.afp




> Allow change of resource level for SVG in AFP
> -
>
> Key: FOP-3184
> URL: https://issues.apache.org/jira/browse/FOP-3184
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: 691675404.svg, fop.xconf, test.fo
>
>
> fop test.fo -c fop.xconf -afp out.afp
> Open in AFP Lookup
> IPS is used in the page to refer to the SVG, in the resource group



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


[jira] [Updated] (FOP-3184) Allow change of resource level for SVG in AFP

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3184:
---
Description: 
fop test.fo -c fop.xconf -afp out.afp



> Allow change of resource level for SVG in AFP
> -
>
> Key: FOP-3184
> URL: https://issues.apache.org/jira/browse/FOP-3184
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: 691675404.svg, fop.xconf, test.fo
>
>
> fop test.fo -c fop.xconf -afp out.afp



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


[jira] [Updated] (FOP-3184) Allow change of resource level for SVG in AFP

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3184:
---
Attachment: 691675404.svg

> Allow change of resource level for SVG in AFP
> -
>
> Key: FOP-3184
> URL: https://issues.apache.org/jira/browse/FOP-3184
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: 691675404.svg, fop.xconf, test.fo
>
>




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


[jira] [Updated] (FOP-3184) Allow change of resource level for SVG in AFP

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3184:
---
Attachment: fop.xconf

> Allow change of resource level for SVG in AFP
> -
>
> Key: FOP-3184
> URL: https://issues.apache.org/jira/browse/FOP-3184
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: 691675404.svg, fop.xconf, test.fo
>
>




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


[jira] [Updated] (FOP-3184) Allow change of resource level for SVG in AFP

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3184:
---
Attachment: test.fo

> Allow change of resource level for SVG in AFP
> -
>
> Key: FOP-3184
> URL: https://issues.apache.org/jira/browse/FOP-3184
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: 691675404.svg, fop.xconf, test.fo
>
>




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


[jira] [Created] (FOP-3184) Allow change of resource level for SVG in AFP

2024-06-06 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3184:
--

 Summary: Allow change of resource level for SVG in AFP
 Key: FOP-3184
 URL: https://issues.apache.org/jira/browse/FOP-3184
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner






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


[jira] [Resolved] (FOP-3183) Disable pattern modification using xobjforms

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3183.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop-pdf-images/commit/a74500f89f323fdb69381b75d9941682c6f94cd6

> Disable pattern modification using xobjforms
> 
>
> Key: FOP-3183
> URL: https://issues.apache.org/jira/browse/FOP-3183
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: fop.xconf, shading.pdf, test.fo
>
>
> fop test.fo -c fop.xconf out.pdf
> Pattern should display in pdf



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


[jira] [Updated] (FOP-3183) Disable pattern modification using xobjforms

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3183:
---
Description: 
fop test.fo -c fop.xconf out.pdf

Pattern should display in pdf

> Disable pattern modification using xobjforms
> 
>
> Key: FOP-3183
> URL: https://issues.apache.org/jira/browse/FOP-3183
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, shading.pdf, test.fo
>
>
> fop test.fo -c fop.xconf out.pdf
> Pattern should display in pdf



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


[jira] [Updated] (FOP-3183) Disable pattern modification using xobjforms

2024-06-06 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3183:
---
Attachment: fop.xconf
shading.pdf
test.fo

> Disable pattern modification using xobjforms
> 
>
> Key: FOP-3183
> URL: https://issues.apache.org/jira/browse/FOP-3183
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, shading.pdf, test.fo
>
>




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


[jira] [Created] (FOP-3183) Disable pattern modification using xobjforms

2024-06-06 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3183:
--

 Summary: Disable pattern modification using xobjforms
 Key: FOP-3183
 URL: https://issues.apache.org/jira/browse/FOP-3183
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner
 Attachments: fop.xconf, shading.pdf, test.fo





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


[jira] [Commented] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-06-04 Thread Jira


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

João André Gonçalves commented on FOP-3179:
---

I'll look from there next time I'm able to investigate it.

> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
> URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


[jira] [Commented] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-06-04 Thread Andreas Schlegel (Jira)


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

Andreas Schlegel commented on FOP-3179:
---

[~jgoncalves] May be that could help:

[https://github.com/apache/xmlgraphics-fop/commit/cc76e1af4c4c2ae9dae789dd09d210696ebab97d]

https://issues.apache.org/jira/browse/FOP-2907

 

> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
> URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


[jira] [Commented] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-06-04 Thread Jira


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

João André Gonçalves commented on FOP-3179:
---

[~aschlegel] Hi, I've not been able to investigate much further as I've been 
busy with other work. Last time I had a look I was trying to figure out which 
class was creating the bounding box.

> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
> URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


[jira] [Resolved] (FOP-3182) Add alt text to PDF signature

2024-06-04 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-3182.

Fix Version/s: main
   Resolution: Fixed

https://github.com/apache/xmlgraphics-fop/commit/d8645e1dc5a9c379f00b1786f397d5dcb8b57265

> Add alt text to PDF signature
> -
>
> Key: FOP-3182
> URL: https://issues.apache.org/jira/browse/FOP-3182
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Fix For: main
>
> Attachments: fop.xconf, test.fo
>
>
> fop test.fo -c fop.xconf out.pdf
> Open pdf with https://pdfua.foundation/en/pac-download/ no warnings should be 
> shown



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


[jira] [Updated] (FOP-3182) Add alt text to PDF signature

2024-06-04 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3182:
---
Description: 
fop test.fo -c fop.xconf out.pdf

Open pdf with https://pdfua.foundation/en/pac-download/ no warnings should be 
shown

> Add alt text to PDF signature
> -
>
> Key: FOP-3182
> URL: https://issues.apache.org/jira/browse/FOP-3182
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, test.fo
>
>
> fop test.fo -c fop.xconf out.pdf
> Open pdf with https://pdfua.foundation/en/pac-download/ no warnings should be 
> shown



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


[jira] [Updated] (FOP-3182) Add alt text to PDF signature

2024-06-04 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3182:
---
Attachment: fop.xconf
test.fo

> Add alt text to PDF signature
> -
>
> Key: FOP-3182
> URL: https://issues.apache.org/jira/browse/FOP-3182
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: fop.xconf, test.fo
>
>




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


[jira] [Created] (FOP-3182) Add alt text to PDF signature

2024-06-04 Thread Simon Steiner (Jira)
Simon Steiner created FOP-3182:
--

 Summary: Add alt text to PDF signature
 Key: FOP-3182
 URL: https://issues.apache.org/jira/browse/FOP-3182
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner






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


[jira] [Commented] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-06-04 Thread Andreas Schlegel (Jira)


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

Andreas Schlegel commented on FOP-3179:
---

[~jgoncalves] Could you please give me a brief update on the status of my 
request. I cannot see any status change in the ticket.

> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
> URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


[jira] [Commented] (FOP-3181) Complex page master chooses wrong simple page master

2024-05-24 Thread Jira


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

João André Gonçalves commented on FOP-3181:
---

[~martin.leit...@infinica.com] I managed to replicate the issue as well. I 
simplified the fo to make it easier to debug through. 

I noticed that it first determines the pages properly, but then does a second 
pass through the page master sequence and that's where it calculates the pages 
wrongly. It seems to be an issue with the IPD change, but not sure where. On 
the second pass it's only creating 2 pages, hence the issue. 

> Complex page master chooses wrong simple page master
> 
>
> Key: FOP-3181
> URL: https://issues.apache.org/jira/browse/FOP-3181
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.9
> Environment: Windows 10, embedded FOP into Java code
>Reporter: Martin Leitner
>Priority: Major
> Attachments: doc.areatree, doc.fo, doc.pdf, page.pdf, simpleDoc.fo
>
>
> When rendering the attached doc.fo file to the either pdf or an area tree 
> (also attached), pages 1, 2, and 3 use the expected page masters, but then 
> pages 4 and 5 use the page master that should only be used for the first 
> page. In the area tree it becomes apparent that the page number is reset to 
> 1, although there is only one page-sequence.
> It is a test file that I got from a customer. If I replace some of the weird 
> content with regular lorem ipsum, the bug goes away, but so far I could not 
> identify the offending part.



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


[jira] [Updated] (FOP-3181) Complex page master chooses wrong simple page master

2024-05-24 Thread Jira


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

João André Gonçalves updated FOP-3181:
--
Attachment: simpleDoc.fo

> Complex page master chooses wrong simple page master
> 
>
> Key: FOP-3181
> URL: https://issues.apache.org/jira/browse/FOP-3181
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.9
> Environment: Windows 10, embedded FOP into Java code
>Reporter: Martin Leitner
>Priority: Major
> Attachments: doc.areatree, doc.fo, doc.pdf, page.pdf, simpleDoc.fo
>
>
> When rendering the attached doc.fo file to the either pdf or an area tree 
> (also attached), pages 1, 2, and 3 use the expected page masters, but then 
> pages 4 and 5 use the page master that should only be used for the first 
> page. In the area tree it becomes apparent that the page number is reset to 
> 1, although there is only one page-sequence.
> It is a test file that I got from a customer. If I replace some of the weird 
> content with regular lorem ipsum, the bug goes away, but so far I could not 
> identify the offending part.



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


[jira] [Updated] (FOP-3181) Complex page master chooses wrong simple page master

2024-05-24 Thread Jira


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

João André Gonçalves updated FOP-3181:
--
Attachment: page.pdf

> Complex page master chooses wrong simple page master
> 
>
> Key: FOP-3181
> URL: https://issues.apache.org/jira/browse/FOP-3181
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.9
> Environment: Windows 10, embedded FOP into Java code
>Reporter: Martin Leitner
>Priority: Major
> Attachments: doc.areatree, doc.fo, doc.pdf, page.pdf
>
>
> When rendering the attached doc.fo file to the either pdf or an area tree 
> (also attached), pages 1, 2, and 3 use the expected page masters, but then 
> pages 4 and 5 use the page master that should only be used for the first 
> page. In the area tree it becomes apparent that the page number is reset to 
> 1, although there is only one page-sequence.
> It is a test file that I got from a customer. If I replace some of the weird 
> content with regular lorem ipsum, the bug goes away, but so far I could not 
> identify the offending part.



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


[jira] [Created] (FOP-3181) Complex page master chooses wrong simple page master

2024-05-23 Thread Martin Leitner (Jira)
Martin Leitner created FOP-3181:
---

 Summary: Complex page master chooses wrong simple page master
 Key: FOP-3181
 URL: https://issues.apache.org/jira/browse/FOP-3181
 Project: FOP
  Issue Type: Bug
Affects Versions: 2.9
 Environment: Windows 10, embedded FOP into Java code
Reporter: Martin Leitner
 Attachments: doc.areatree, doc.fo, doc.pdf

When rendering the attached doc.fo file to the either pdf or an area tree (also 
attached), pages 1, 2, and 3 use the expected page masters, but then pages 4 
and 5 use the page master that should only be used for the first page. In the 
area tree it becomes apparent that the page number is reset to 1, although 
there is only one page-sequence.

It is a test file that I got from a customer. If I replace some of the weird 
content with regular lorem ipsum, the bug goes away, but so far I could not 
identify the offending part.



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


[jira] [Commented] (FOP-3135) [PATCH] SVG tspan content is displayed out of place

2024-05-22 Thread Simon Steiner (Jira)


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

Simon Steiner commented on FOP-3135:


https://github.com/apache/xmlgraphics-batik/commit/7bd42913d559211622690cd9179c10b08feb4a5e

> [PATCH] SVG tspan content is displayed out of place
> ---
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svgBatik.patch, svgCommon.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] [Updated] (FOP-3135) [PATCH] SVG tspan content is displayed out of place

2024-05-22 Thread Simon Steiner (Jira)


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

Simon Steiner updated FOP-3135:
---
Summary: [PATCH] SVG tspan content is displayed out of place  (was: [PATCH] 
SVG  content is displayed out of place)

> [PATCH] SVG tspan content is displayed out of place
> ---
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svgBatik.patch, svgCommon.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) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves edited comment on FOP-3135 at 5/22/24 11:47 AM:
-

[~julienlacour31] I'm gonna split this Jira in two since I have a fix for the 
placement of the glyphs, but still need some extra investigation about the 
issue when using a custom font

https://issues.apache.org/jira/browse/FOP-3180


was (Author: JIRAUSER302961):
[~julienlacour31] I'm gonna split this Jira in two since I have a fix for the 
placement of the glyphs, but still need some extra investigation about the 
issue when using a custom font

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svgBatik.patch, svgCommon.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: svgBatik.patch
svgCommon.patch
fop.patch

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svgBatik.patch, svgCommon.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: fop.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, 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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svgCommons.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, 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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svgBatik.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, 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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svg.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svgBatik.patch, svgCommons.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: fop.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.patch, svgBatik.patch, svgCommons.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: fop.patch
svgCommons.patch
svgBatik.patch

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.patch, svgBatik.patch, svgCommons.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svgBatik.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svgCommons.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: (was: svgFop.patch)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.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] [Updated] (FOP-3135) [PATCH] SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Summary: [PATCH] SVG  content is displayed out of place  (was: SVG 
 content is displayed out of place)

> [PATCH] SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.patch, svgBatik.patch, svgCommons.patch, svgFop.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] [Updated] (FOP-3135) SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Summary: SVG  content is displayed out of place  (was: SVG  
content is displayed on a single line without spaces)

> SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.patch, svgBatik.patch, svgCommons.patch, svgFop.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] [Updated] (FOP-3135) SVG content is displayed out of place

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3135:
--
Attachment: fop.patch

> SVG  content is displayed out of place
> -
>
> Key: FOP-3135
> URL: https://issues.apache.org/jira/browse/FOP-3135
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: Julien Lacour
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, fop.patch, 
> svg.patch, svgBatik.patch, svgCommons.patch, svgFop.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] [Updated] (FOP-3180) SVG Glyph positions ignored when using a custom font

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3180:
--
Attachment: DejaVuLGCSerif.ttf

> SVG Glyph positions ignored when using a custom font
> 
>
> Key: FOP-3180
> URL: https://issues.apache.org/jira/browse/FOP-3180
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: João André Gonçalves
>Priority: Minor
> Attachments: DejaVuLGCSerif.ttf, fonts.fo, npe.pdf, pdfFop.xconf, 
> tspan.svg
>
>
> When using a SVG with a custom font, FOP will ignore the coordinates set in 
> the file and render them in a single line. If we remove the font, or a 
> default font, the coordinates are respected
> Linked to: https://issues.apache.org/jira/browse/FOP-3135



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


[jira] [Commented] (FOP-3180) SVG Glyph positions ignored when using a custom font

2024-05-22 Thread Jira


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

João André Gonçalves commented on FOP-3180:
---

Update the xconf with your path for the added font.

> SVG Glyph positions ignored when using a custom font
> 
>
> Key: FOP-3180
> URL: https://issues.apache.org/jira/browse/FOP-3180
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: João André Gonçalves
>Priority: Minor
> Attachments: DejaVuLGCSerif.ttf, fonts.fo, npe.pdf, pdfFop.xconf, 
> tspan.svg
>
>
> When using a SVG with a custom font, FOP will ignore the coordinates set in 
> the file and render them in a single line. If we remove the font, or a 
> default font, the coordinates are respected
> Linked to: https://issues.apache.org/jira/browse/FOP-3135



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


[jira] [Updated] (FOP-3180) SVG Glyph positions ignored when using a custom font

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3180:
--
Attachment: npe.pdf
pdfFop.xconf
tspan.svg
fonts.fo

> SVG Glyph positions ignored when using a custom font
> 
>
> Key: FOP-3180
> URL: https://issues.apache.org/jira/browse/FOP-3180
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: João André Gonçalves
>Priority: Minor
> Attachments: fonts.fo, npe.pdf, pdfFop.xconf, tspan.svg
>
>
> When using a SVG with a custom font, FOP will ignore the coordinates set in 
> the file and render them in a single line. If we remove the font, or a 
> default font, the coordinates are respected
> Linked to: https://issues.apache.org/jira/browse/FOP-3135



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


[jira] [Updated] (FOP-3180) SVG Glyph positions ignored when using a custom font

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3180:
--
Summary: SVG Glyph positions ignored when using a custom font  (was: SVG 
Glyph Position ignored when using a custom font)

> SVG Glyph positions ignored when using a custom font
> 
>
> Key: FOP-3180
> URL: https://issues.apache.org/jira/browse/FOP-3180
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: João André Gonçalves
>Priority: Minor
>
> When using a SVG with a custom font, FOP will ignore the coordinates set in 
> the file and render them in a single line. If we remove the font, or a 
> default font, the coordinates are respected
> Linked to: https://issues.apache.org/jira/browse/FOP-3135



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

2024-05-22 Thread Jira


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

João André Gonçalves commented on FOP-3135:
---

[~julienlacour31] I'm gonna split this Jira in two since I have a fix for the 
placement of the glyphs, but still need some extra investigation about the 
issue when using a custom font

> 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
>Assignee: Simon Steiner
>Priority: Minor
> Attachments: MI-Calibri-test.pdf, MI-out-patch.pdf, MI-out.pdf, 
> MI-test.fo, MI-tspan.svg, MI.patch, WIP-out.pdf, WIP.patch, svg.patch, 
> svgBatik.patch, svgCommons.patch, svgFop.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] [Updated] (FOP-3180) SVG Glyph Position ignored when using a custom font

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3180:
--
Description: 
When using a SVG with a custom font, FOP will ignore the coordinates set in the 
file and render them in a single line. If we remove the font, or a default 
font, the coordinates are respected

Linked to: https://issues.apache.org/jira/browse/FOP-3135

  was:When using a SVG with a custom font, FOP will ignore the coordinates set 
in the file and render them in a single line. If we remove the font, or a 
default font, the coordinates are respected


> SVG Glyph Position ignored when using a custom font
> ---
>
> Key: FOP-3180
> URL: https://issues.apache.org/jira/browse/FOP-3180
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: João André Gonçalves
>Priority: Minor
>
> When using a SVG with a custom font, FOP will ignore the coordinates set in 
> the file and render them in a single line. If we remove the font, or a 
> default font, the coordinates are respected
> Linked to: https://issues.apache.org/jira/browse/FOP-3135



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


[jira] [Updated] (FOP-3180) SVG Glyph Position ignored when using a custom font

2024-05-22 Thread Jira


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

João André Gonçalves updated FOP-3180:
--
Summary: SVG Glyph Position ignored when using a custom font  (was: SVG 
GLyph Position ignored when using a custom font)

> SVG Glyph Position ignored when using a custom font
> ---
>
> Key: FOP-3180
> URL: https://issues.apache.org/jira/browse/FOP-3180
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Reporter: João André Gonçalves
>Priority: Minor
>
> When using a SVG with a custom font, FOP will ignore the coordinates set in 
> the file and render them in a single line. If we remove the font, or a 
> default font, the coordinates are respected



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


[jira] [Created] (FOP-3180) SVG GLyph Position ignored when using a custom font

2024-05-22 Thread Jira
João André Gonçalves created FOP-3180:
-

 Summary: SVG GLyph Position ignored when using a custom font
 Key: FOP-3180
 URL: https://issues.apache.org/jira/browse/FOP-3180
 Project: FOP
  Issue Type: Bug
  Components: image/svg
Reporter: João André Gonçalves


When using a SVG with a custom font, FOP will ignore the coordinates set in the 
file and render them in a single line. If we remove the font, or a default 
font, the coordinates are respected



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


[jira] [Comment Edited] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-05-21 Thread Andreas Schlegel (Jira)


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

Andreas Schlegel edited comment on FOP-3179 at 5/21/24 11:55 AM:
-

[~jgoncalves] we have a stylesheet, a XML created by JAXB and this is 
essentially the code for the transformation. 

final FOUserAgent foUserAgent = this.fopFactory.get().newFOUserAgent();
foUserAgent.setPdfUAEnabled(true);
foUserAgent.setTitle("xyz");       

try (final ByteArrayOutputStream out = new java.io.ByteArrayOutputStream()){
 // Construct fop with desired output format
 final Fop fop = this.fopFactory.get().newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);
 final Transformer transformer = this.noticeXslt.newTransformer();
 transformer.setParameter("versionParam", "2.0");
 // Setup input for XSLT transformation
 final Source src = new StreamSource(new StringReader(xmlTemplate));
 final Result res = new SAXResult(fop.getDefaultHandler());
 // Start XSLT transformation and FOP processing
 transformer.transform(src, res);
 return out.toByteArray();         
}



was (Author: JIRAUSER305469):
{quote}[~jgoncalves] we have a stylesheet, a XML created by JAXB and this is 
essentially the code for the transformation. 

final FOUserAgent foUserAgent = this.fopFactory.get().newFOUserAgent();
foUserAgent.setPdfUAEnabled(true);
foUserAgent.setTitle("xyz");       

try (final ByteArrayOutputStream out = new java.io.ByteArrayOutputStream()){
 // Construct fop with desired output format
 final Fop fop = this.fopFactory.get().newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);
 final Transformer transformer = this.noticeXslt.newTransformer();
 transformer.setParameter("versionParam", "2.0");
 // Setup input for XSLT transformation
 final Source src = new StreamSource(new StringReader(xmlTemplate));
 final Result res = new SAXResult(fop.getDefaultHandler());
 // Start XSLT transformation and FOP processing
 transformer.transform(src, res);
 return out.toByteArray();         
}


> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
> URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


[jira] [Comment Edited] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-05-21 Thread Andreas Schlegel (Jira)


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

Andreas Schlegel edited comment on FOP-3179 at 5/21/24 11:54 AM:
-

{quote}[~jgoncalves] we have a stylesheet, a XML created by JAXB and this is 
essentially the code for the transformation. 

final FOUserAgent foUserAgent = this.fopFactory.get().newFOUserAgent();
foUserAgent.setPdfUAEnabled(true);
foUserAgent.setTitle("xyz");       

try (final ByteArrayOutputStream out = new java.io.ByteArrayOutputStream()){
 // Construct fop with desired output format
 final Fop fop = this.fopFactory.get().newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);
 final Transformer transformer = this.noticeXslt.newTransformer();
 transformer.setParameter("versionParam", "2.0");
 // Setup input for XSLT transformation
 final Source src = new StreamSource(new StringReader(xmlTemplate));
 final Result res = new SAXResult(fop.getDefaultHandler());
 // Start XSLT transformation and FOP processing
 transformer.transform(src, res);
 return out.toByteArray();         
}



was (Author: JIRAUSER305469):
[~jgoncalves] we have a stylesheet, a XML created by JAXB and this is 
essentially the code for the transformation. 
{quote}     final FOUserAgent foUserAgent = 
this.fopFactory.get().newFOUserAgent();
        foUserAgent.setPdfUAEnabled(true);
        foUserAgent.setTitle("xyz");       

      try (final ByteArrayOutputStream out = new 
java.io.ByteArrayOutputStream()) {
            // Construct fop with desired output format
            final Fop fop = 
this.fopFactory.get().newFop(MimeConstants.MIME_PDF, foUserAgent, out);         
   
            final Transformer transformer = this.noticeXslt.newTransformer();   
        
            transformer.setParameter("versionParam", "2.0");           

            // Setup input for XSLT transformation
            final Source src = new StreamSource(new StringReader(xmlTemplate)); 
           
            final Result res = new SAXResult(fop.getDefaultHandler());          
 

            // Start XSLT transformation and FOP processing
            transformer.transform(src, res);

            return out.toByteArray();
        }
{quote}

> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
> URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


[jira] [Commented] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-05-21 Thread Andreas Schlegel (Jira)


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

Andreas Schlegel commented on FOP-3179:
---

[~jgoncalves] we have a stylesheet, a XML created by JAXB and this is 
essentially the code for the transformation. 
{quote}     final FOUserAgent foUserAgent = 
this.fopFactory.get().newFOUserAgent();
        foUserAgent.setPdfUAEnabled(true);
        foUserAgent.setTitle("xyz");       

      try (final ByteArrayOutputStream out = new 
java.io.ByteArrayOutputStream()) {
            // Construct fop with desired output format
            final Fop fop = 
this.fopFactory.get().newFop(MimeConstants.MIME_PDF, foUserAgent, out);         
   
            final Transformer transformer = this.noticeXslt.newTransformer();   
        
            transformer.setParameter("versionParam", "2.0");           

            // Setup input for XSLT transformation
            final Source src = new StreamSource(new StringReader(xmlTemplate)); 
           
            final Result res = new SAXResult(fop.getDefaultHandler());          
 

            // Start XSLT transformation and FOP processing
            transformer.transform(src, res);

            return out.toByteArray();
        }
{quote}

> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
>     URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


[jira] [Commented] (FOP-3179) bounding box on image is not where it should be (PDF/UA)

2024-05-21 Thread Jira


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

João André Gonçalves commented on FOP-3179:
---

[~aschlegel] What class is creating the BoundingBox?

> bounding box on image is not where it should be (PDF/UA)
> 
>
> Key: FOP-3179
> URL: https://issues.apache.org/jira/browse/FOP-3179
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: 2.9
> Environment: Windows 10
>Reporter: Andreas Schlegel
>Priority: Major
> Attachments: any-image.jpg, example.pdf, notice.pdf, notice.xml, 
> notice.xsl, screenshot--image-and-bbox-in-axesPDF.png
>
>
> Our code generates a PDF file with image and bounding box. But the image and 
> bounding box are not on top of each other (see attached example.pdf and open 
> it with axesPDF ).
> If the bounding box is missing, the image cannot be displayed at all or not 
> correctly in alternative representations.
> If you use the axesPDF tool 
> (https://www.axes4.com/de/software-services/axespdf/download), you can see 
> that the bounding box is always placed in the bottom left corner of the 
> respective page.
>  
> PAC3 doesn't show any error except white spaces instead of images 
> (screenreader preview) but this is not classified as error.
>  
> *** Settings:
>  
> pom.xml:
> 2.9
>  
> 
>   org.apache.xmlgraphics
>   fop
>   ${version.fop}
> 
>  
>  
> fop.conf
>   
>     
>       1.6
>       PDF/UA-1  
>     ...
>  
> xsl:
>       
>          
>                             src="any-image.png" fox:alt-text="xyz">
>             
>          
>       
>  



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


  1   2   3   4   5   6   7   8   9   10   >