xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szeak (Register Man)" <szea...@gmail.com>
Subject Re: Resolve an URI relative to base missing on Windows
Date Fri, 12 Aug 2016 06:57:41 GMT
<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      After some tests and try to embed FOP by another way, the result
      are:<br>
      1. If i apply the "Basic usage pattern", than base setting by
      config file not working on windows.<br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <pre style="white-space: pre-wrap; color: rgb(51, 51, 51); font-size: 14.6667px;
font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="n">FopFactory</span> <span class="n">fopFactory</span> <span
class="o" style="color: rgb(102, 102, 102);">=</span> <span class="n">FopFactory</span><span
class="o" style="color: rgb(102, 102, 102);">.</span><span class="na" style="text-align:
center; color: rgb(64, 112, 160);">newInstance</span><span class="o" style="color:
rgb(102, 102, 102);">(</span><span class="k" style="color: rgb(0, 112, 32); font-weight:
bold;">new</span> <span class="n">File</span><span class="o" style="color:
rgb(102, 102, 102);">(</span><span class="s" style="color: rgb(64, 112, 160);">"C:/Temp/fop.xconf"</span><span
class="o" style="color: rgb(102, 102, 102);">));</span></pre>
      <br>
      2. If i embed fop, as in the "Using the Configuration File"
      documentation, and put the baseURI by parameter to
      FopFactoryBuilder, it works also on windows.<br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <pre style="white-space: pre-wrap; color: rgb(51, 51, 51); font-size: 14.6667px;
font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="n">DefaultConfigurationBuilder</span> <span class="n">cfgBuilder</span>
<span class="o" style="color: rgb(102, 102, 102);">=</span> <span class="k"
style="color: rgb(0, 112, 32); font-weight: bold;">new</span> <span class="n">DefaultConfigurationBuilder</span><span
class="o" style="color: rgb(102, 102, 102);">();</span>
<span class="n">Configuration</span> <span class="n">cfg</span> <span
class="o" style="color: rgb(102, 102, 102);">=</span> <span class="n">cfgBuilder</span><span
class="o" style="color: rgb(102, 102, 102);">.</span><span class="na" style="text-align:
center; color: rgb(64, 112, 160);">buildFromFile</span><span class="o" style="color:
rgb(102, 102, 102);">(</span><span class="k" style="color: rgb(0, 112, 32); font-weight:
bold;">new</span> <span class="n">File</span><span class="o" style="color:
rgb(102, 102, 102);">(</span><span class="s" style="color: rgb(64, 112, 160);">"C:/Temp/mycfg.xml"</span><span
class="o" style="color: rgb(102, 102, 102);">));</span>
<span class="n">fopFactoryBuilder</span> <span class="o" style="color: rgb(102,
102, 102);">=</span> <span class="k" style="color: rgb(0, 112, 32); font-weight:
bold;">new</span> <span class="n">FopFactoryBuilder</span><span class="o"
style="color: rgb(102, 102, 102);">(</span><span class="n">baseURI</span><span
class="o" style="color: rgb(102, 102, 102);">).</span><span class="na" style="text-align:
center; color: rgb(64, 112, 160);">setConfiguration</span><span class="o" style="color:
rgb(102, 102, 102);">(</span><span class="n">cfg</span><span class="o"
style="color: rgb(102, 102, 102);">);</span></pre>
      <br>
      So my concrete problem solved, but using fop by any other way the
      problem occurs.<br>
      <br>
      Szeak<br>
      <br>
      2016-08-08 15:15 keltezéssel, Szeak (Register Man) írta:<br>
    </div>
    <blockquote
      cite="mid:03221525-39a9-f023-91b1-b6833e8302be@gmail.com"
      type="cite">Hi,
      <br>
      <br>
      I'm using FOP 2.1.
      <br>
      <br>
      With the same simple fo file which is including an external image
      (jpg), with sam config file, and same fop,
      <br>
      URI resolving to the image is OK on Linux, but generates the below
      Error on Windows:
      <br>
      <br>
      Image not found. URI: images/logo.jpg. (See position 11:67)
      <br>
      <br>
      If i use url('...') format in src attribute and take the full
      path, it works and includes the image, but relative path is not
      working.
      <br>
      <br>
      The problem is not related to using FOP from the command line or
      embedded mode. You can test from command line easy.
      <br>
      <br>
      The problem is not related to used output format. (I used PDF and
      PS)
      <br>
      <br>
      I have read some problem with URI resolving with the new FOP
      versions (from 2.0), but i think that is a new problem.
      <br>
      <br>
      Please, somebody test this again or i'm waiting for any new info
      or mistake with my files or configuration.
      <br>
      <br>
      I attached my FO and Config to this mail.
      <br>
      <br>
      <br>
      Thanks for any help.
      <br>
      <br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>

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