xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mehdi houshmand <med1...@gmail.com>
Subject Re: Problem that could lose me my job
Date Fri, 03 Feb 2012 13:50:51 GMT
Hi Theresa,

The PDF you put up isn't complete, it's as if FOP stopped creating the
document for some reason. Was an exception thrown? Would there be any
reason why FOP wouldn't finish writing to file? If so, I'd suggest you
try FOP trunk as well to see if the same problem arises, if so, then
the stacktrace should give an indication as to what is causing the
problem.

Mehdi

On 3 February 2012 13:32, Theresa Jayne Forster <theresa@inbrand.co.uk> wrote:
> Why would that make the output PDF invalid to Adobe and not to Sumatra pdf?
>
>
>
>
>
> Kindest regards
>
>
>
>
> Theresa Forster
>
> Senior Software Developer
>
> From: David J. B. Hollis [mailto:dhollis@AandOConsultancy.ltd.uk]
> Sent: 03 February 2012 13:19
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Problem that could lose me my job
>
>
>
> Hi,
>
>
>
> I've just opened the FO file in oXygen, and it throws up a number of errors:
>
>
>
> @ margin-top not allowed in fo:region-start
>
> @ z-index not allowed in fo:region-body
>
> @ z-index not allowed in fo:region-before
>
> @ z-index not allowed in fo:region-after
>
>
>
> ... about 20 or so in the fo:simple-page-master section
>
>
>
> HTH
>
> David
>
>
>
>
>
>
>
>
>
> Sorry, I was under pressure to roll back the servers that we had just
> upgraded to use the fop 1.0 system.
>
> One of the failing PDFs is at http://www.inbrand1.co.uk/failsinadobe.pdf
>
> The FO that generated it is at http://www.inbrand1.co.uk/failsinadobe.fo
>
>
>
> The fopconfig has nothing except font configurations in it. A couple have
> kerning xml files as they produce incorrectly without.
>
>
>
> The routine that produces the PDF is as follows
>
>
>
> public File generatePDFromFO(File foFile) {
>
>         OutputStream ot = null;
>
>         BufferedOutputStream out = null;
>
>         File tempFile = null;
>
>         try {
>
>             tempFile = File.createTempFile("W2P", ".pdf");
>
>             out = new BufferedOutputStream( new FileOutputStream(tempFile));
>
>             fopFactory.setStrictValidation(false);
>
>             DefaultConfigurationBuilder cfgBuilder = new
> DefaultConfigurationBuilder();
>
>             Configuration cfg = cfgBuilder.buildFromFile(new
> File("/fopconfig.xml"));
>
>             fopFactory.setUserConfig(cfg);
>
>             FOUserAgent useragent= fopFactory.newFOUserAgent();
>
>             useragent.setTargetResolution(300);
>
>             Fop fop =
> fopFactory.newFop(MimeConstants.MIME_PDF,useragent,out);
>
>             TransformerFactory factory = TransformerFactory.newInstance();
>
>             Source src = new StreamSource(foFile);
>
>             Transformer transformer = factory.newTransformer();
>
>             Result res = new SAXResult(fop.getDefaultHandler());
>
>             transformer.transform(src, res);
>
>         } catch (IOException ioe) {
>
>             LOGGER.error("IOException ",ioe);
>
>             ioe.printStackTrace();
>
>         } catch (SAXException se) {
>
>             LOGGER.error("Sax Exception ",se);
>
>             se.printStackTrace();
>
>         } catch (ConfigurationException ce) {
>
>             LOGGER.error("Configuration Exception ",ce);
>
>             ce.printStackTrace();
>
>         } catch (TransformerConfigurationException tce) {
>
>             LOGGER.error("Transformer Configuration Exception",tce);
>
>             tce.printStackTrace();
>
>         } catch (TransformerException te) {
>
>             LOGGER.error("Transformer Exception ",te);
>
>             te.printStackTrace();
>
>         }
>
>         return tempFile;
>
>     }
>
>
>
>
>
> Fop config file here
>
>
>
> <fop xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
>
>                 <strict-configuration>true</strict-configuration>
>
>                 <base>C:\preprocessor\filestore\</base>
>
>
>
>                 <font-base>/Fonts</font-base>
>
>
>
>                 <cache-file>/fop-cache</cache-file>
>
>                 <!--
>
> ************************************************************************
>
>   Add fonts here
>
> ************************************************************************
>
> -->
>
>                 <renderers>
>
>                                 <renderer mime="application/pdf">
>
>                                                
<fonts>
>
>                                                                
<font
> embed-url="FRUTL___.TTF" kerning="yes" metrics-url="FrutigerLight.xml">
>
>
> <font-triplet name="Frutiger" style="normal" weight="200"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="FRUTB___.TTF" kerning="yes">
>
>
> <font-triplet name="Frutiger" style="normal" weight="400"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="tfarrow-medium.TTF">
>
>
> <font-triplet name="TFArrow" style="normal" weight="400"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="HELVNBL_.TTF">
>
>
> <font-triplet name="HelveticaNeue" style="normal" weight="900"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="helveticaneue_85hv.ttf">
>
>
> <font-triplet name="HelveticaNeue" style="normal" weight="800"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="HELVNBI_.TTF">
>
>
> <font-triplet name="HelveticaNeue" style="italic" weight="700"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="HELVNM__.TTF">
>
>
> <font-triplet name="HelveticaNeue" style="normal" weight="500"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="HELVNI__.TTF">
>
>
> <font-triplet name="HelveticaNeue" style="italic" weight="400"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="lte50259.ttf">
>
>
> <font-triplet name="HelveticaNeue" style="normal" weight="400"/>
>
>
> <font-triplet name="HelveticaNeue" style="roman" weight="400"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="HELVNL__.TTF">
>
>
> <font-triplet name="HelveticaNeue" style="normal" weight="300"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="HELVNT__.TTF" kerning="yes" metrics-url="HelveticaNeueLight.xml">
>
>
> <font-triplet name="HelveticaNeue" style="normal" weight="200"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="HELVNUL_.TTF">
>
>
> <font-triplet name="HelveticaNeue" style="normal" weight="100"/>
>
>
> </font>
>
>                                                                
<font
> embed-url="LTe50872.ttf">
>
>
> <font-triplet name="HelveticaNeueCond" style="normal" weight="400"/>
>
>                                                                
</font>
>
>                                                                
<font
> embed-url="LTe50874.ttf">
>
>
> <font-triplet name="HelveticaNeueCond" style="normal" weight="700"/>
>
>
> </font>
>
>                                                
</fonts>
>
>                                 </renderer>
>
>                                 <renderer mime="image/png">
>
>
> <transparent-page-background>true</transparent-page-background>
>
>                                   <fonts><auto-detect/></fonts>
>
>                                 </renderer>
>
>                 </renderers>
>
> </fop>
>
>
>
> Kindest regards
>
>
>
>
> Theresa Forster
>
> Senior Software Developer
>
>
>
Mime
View raw message