[jira] [Resolved] (FOP-2986) NUllPointer external-graphic

2023-07-13 Thread Simon Steiner (Jira)


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

Simon Steiner resolved FOP-2986.

Resolution: Not A Problem

> NUllPointer external-graphic
> 
>
> Key: FOP-2986
> URL: https://issues.apache.org/jira/browse/FOP-2986
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.6
> Environment: fop 2.5
> jdk 8
> linux manjaro
> apache tomcat 7.0.69
>Reporter: Ramon Molossi
>Priority: Major
> Attachments: teste.xml, teste.xslt
>
>
> Downloaded sources from apache site, compiled by myself, trying to adjust 
> fop-servlet to work togheter with Oracle Apex.
>  
> Trying to use the default FopServlet(just changed from doGet to doPost), 
> submitted xsl and xml, when I add a simple external graphic like this:
> 
>      
> 
> I get this error:
> java.lang.NullPointerException 
> java.io.FilterInputStream.markSupported(FilterInputStream.java:243) 
> org.apache.xmlgraphics.image.loader.util.ImageUtil.decorateMarkSupported(ImageUtil.java:213)
>  
> org.apache.xmlgraphics.image.loader.util.ImageUtil.autoDecorateInputStream(ImageUtil.java:228)
>  
> org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.createImageSource(AbstractImageSessionContext.java:378)
>  
> org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.access$100(AbstractImageSessionContext.java:54)
>  
> org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext$UnrestrictedFallbackResolver.createSource(AbstractImageSessionContext.java:369)
>  
> org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.newSource(AbstractImageSessionContext.java:95)
>  
> org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:196)
>  
> org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:122)
>  
> org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
>  org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81) 
> org.apache.fop.fo.FObj.processNode(FObj.java:131) 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:293)
>  org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179) 
> com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:208)
>  
> com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:281)
>  
> com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:247)
>  
> com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:559)
>  teste.template$dot$0() teste.applyTemplates() teste.transform() 
> com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:620)
>  
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:730)
>  
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
>  org.apache.fop.servlet.FopServlet.render(FopServlet.java:269) 
> org.apache.fop.servlet.FopServlet.renderXML(FopServlet.java:236) 
> org.apache.fop.servlet.FopServlet.doPost(FopServlet.java:142) 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:650) 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:731) 
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>  
>  
> Tried to downgrade the  xmlgraphics-commons to 2.3, got same error.
>  
>  



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


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

2023-07-13 Thread Rafael Witak (Jira)
Rafael Witak created FOP-3137:
-

 Summary: 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
 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)