xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luis Bernardo <lmpmberna...@gmail.com>
Subject Re: Problem that could lose me my job
Date Fri, 03 Feb 2012 23:08:26 GMT
Attached is a edited source and generated pdf that opens in Adobe 
Reader. If it is true to what you expect I can't tell.

I just removed some attributes that are not allowed in the elements they 
had been put in (and the FOP error messages were very clear about 
those). And as someone else said, side regions do not have margins, only 
extents, so no need to use them. I removed those, and the z-indexes too.


On 2/3/12 3:07 PM, Theresa Jayne Forster wrote:
> UPDATE: Tried on 0.95-1 and 0.95 (the latter needed the Avalon framework
> adding manually to the pom)
> Still does not work, any suggestions why I am getting a pdf that works in a
> 3rd party viewer and not in adobe.
>
> Kindest regards
>
>
> Theresa Forster
> Senior Software Developer
> -----Original Message-----
> From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk]
> Sent: 03 February 2012 14:44
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Problem that could lose me my job
>
> Ok Checked the deletion code, it doesn’t appear to be that , I stopped that
> part happening but the pdf is still ending up corrupt for adobe and Foxit
> (but still valid with no errors on Sumatra PDF)
>
> Kindest regards
> Theresa Forster
> Senior Software Developer
>
> -----Original Message-----
> From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk]
> Sent: 03 February 2012 14:06
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Problem that could lose me my job
>
> Ok I have put the complete log for the generation on a gist as it is Waaaaay
> to big to post here https://gist.github.com/1730300
> I will check the code I have that sends the pdf to the client then check it
> is flushing and completing before deleting the file to prevent clutter
> Maybe I need to change my fileisreadystrategy
>
>
> Thanks for the heads up there at least it gives me somewhere to look.
>
>
> Kindest regards
>
>
> Theresa Forster
> Senior Software Developer
>
> -----Original Message-----
> From: mehdi houshmand [mailto:med1985@gmail.com]
> Sent: 03 February 2012 13:51
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Problem that could lose me my job
>
> 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
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>


Mime
View raw message