Re: Poor quality image scaling

2013-07-02 Thread Luis Bernardo
Can you attach the file? I am unable to download it.


On Tue, Jul 2, 2013 at 3:15 PM, Lauri Kasanen c...@gmx.com wrote:

 Luis Bernardo lmpmbernardo at gmail.com writes:

  Your screen capture is not half an inch, so we don't know where the
 scaling comes from. Have you tried to zoom in with your PDF viewer?
  If you still have questions please provide original image, your fo file,
 any fop.xconf if using it, and the generated pdf. I was unable to reproduce
 the issue you describe with a stock png image.

 Here's a zip containing the requested files:
 http://bayfiles.net/file/S52n/Gw7iCz/fopzip.zip

 The image in the PDF looks bad at all zoom levels (100%, fit to window, fit
 to width, 300%, ...).

 Thanks,
 - Lauri


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Help!!! when create a tiff G3 1D fax file

2013-07-05 Thread Luis Bernardo
Start by running from the command line. If you still get a problem send us
your FO file(s).


On Wed, Jul 3, 2013 at 11:55 AM, cilen.deng cilend...@gmail.com wrote:

 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the License); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
  *  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */

 /* $Id$ */

 package tiff;

 // Java

 import org.apache.fop.apps.*;
 import org.apache.fop.render.bitmap.TIFFConstants;
 import org.apache.fop.render.bitmap.TIFFRenderer;

 import javax.xml.transform.Result;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.stream.StreamSource;
 import java.awt.image.BufferedImage;
 import java.io.*;

 /**
  * This class demonstrates the conversion of an FO file to PDF using FOP.
  */
 public class ExampleFO2Tiff {

 // configure fopFactory as desired
 private final FopFactory fopFactory = FopFactory.newInstance();

 /**
  * Converts an FO file to a PDF file using FOP
  * @param fo the FO file
  * @param tiff the target PDF file
  * @throws java.io.IOException In case of an I/O problem
  * @throws org.apache.fop.apps.FOPException In case of a FOP problem
  */
 public void ExampleFO2Tiff(File fo, File tiff) throws IOException,
 FOPException {

 OutputStream out = null;

 try {
 FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
 foUserAgent.setTargetResolution(204);
 TIFFRenderer renderer = new TIFFRenderer(foUserAgent);


 renderer.getWriterParams().setCompressionMethod(TIFFConstants.COMPRESSION_PACKBITS);
 foUserAgent.setRendererOverride(renderer);
 // configure foUserAgent as desired

 // Setup output stream.  Note: Using BufferedOutputStream
 // for performance reasons (helpful with FileOutputStreams).
 out = new FileOutputStream(tiff);
 out = new BufferedOutputStream(out);

 fopFactory.setUserConfig(new

 File(/home/fanfu/projects/untitled1/fanfuWeb/src/main/resources/fos/fop.xconf));
 // Construct fop with desired output format
 Fop fop = fopFactory.newFop(MimeConstants.MIME_TIFF,
 foUserAgent, out);

 // Setup JAXP using identity transformer
 TransformerFactory factory = TransformerFactory.newInstance();
 Transformer transformer = factory.newTransformer(); // identity
 transformer
 // transformer.
 // Setup input stream
 Source src = new StreamSource(fo);

 // 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);

 // Result processing
 FormattingResults foResults = fop.getResults();
 java.util.List pageSequences = foResults.getPageSequences();
 for (java.util.Iterator it = pageSequences.iterator();
 it.hasNext();) {
 PageSequenceResults pageSequenceResults =
 (PageSequenceResults)it.next();
 System.out.println(PageSequence 
 +
 (String.valueOf(pageSequenceResults.getID()).length()  0
 ? pageSequenceResults.getID() : no id)
 +  generated  +
 pageSequenceResults.getPageCount()
 +  pages.);
 }
 System.out.println(Generated  + foResults.getPageCount() + 
 pages in total.);

 } catch (Exception e) {
 e.printStackTrace(System.err);
 System.exit(-1);
 } finally {
 out.close();
 }
 }


 /**
  * Main method.
  * @param args command-line arguments
  */
 public static void main(String[] args) {
 try {
 System.out.println(FOP ExampleFO2PDF\n);
 System.out.println(Preparing...);

 //Setup directories
 File baseDir = new File(.);
 File outDir = new File(baseDir, out);
 outDir.mkdirs();

 //Setup input and output files
 File fofile = new

Re: SVG pixel size

2013-07-08 Thread Luis Bernardo


Pixel is only for monitors. If you want a 1 pixel line you don't need to 
care about dpi. That only matters if you want to print. When you print a 
pixel becomes a dot.


Attached is an example with a 1 pixel thick line. Of course, the 
thickness you see in the monitor depends on the zoom you use. If you 
open the image with Gimp and zoom in to 1600% you will see that the line 
thickness corresponds, on the left scale, to 1 pixel.


Maybe you can clarify your question?

On 7/8/13 10:10 AM, Massimo wrote:

Hi all.
I am producing a PNG file and I'm using an xsl with SVG element like this:

fo:instream-foreign-object
   svg:svg xmlns:svg=http://www.w3.org/2000/svg; width=100%
height=100%
 svg:line x1=15 y1=15 x2=25 y2=15/
 svg:line x1=15 y1=16 x2=25 y2=16/
   /svg:svg
/fo:instream-foreign-object

I need to draw 1 pixel thin lines.
I set the target resolution to 203dpi and I noticed that the pixel of the
lines is scaled (bigger) according the resolution (~3px thin).

Is there any way to control the svg pixel size via program or configuration
leaving  the resolution to 203dpi?

Thanks.




--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/SVG-pixel-size-tp38853.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master page-width=100px page-height=100px master-name=first
  fo:region-body /
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=first
fo:flow flow-name=xsl-region-body
fo:block space-before.optimum=15pt
fo:instream-foreign-object xmlns:svg=http://www.w3.org/2000/svg;
svg:svg width=50px height=50px
  svg:g style=stroke:#00; stroke-width:1px
 svg:line x1=5px y1=5px x2=50px y2=5px/
  /svg:g
/svg:svg
/fo:instream-foreign-object
/fo:block
/fo:flow
  /fo:page-sequence
/fo:root

attachment: test.png
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: SVG pixel size

2013-07-09 Thread Luis Bernardo
Lets look at the default case, that creates a 100x100 pixel image. The
default target dpi is 72, so 100/72 = 1.38.

If you set the target dpi to 204, then the image needs to be 283x283 pixels
because 204*1.3 = 283.. Then a 1 pixel line needs to be 2.83 pixels
to keep the scaling correct. Since you cannot have 2.83 pixel thickness in
the monitor, it defaults to 3 pixels.

Is your goal to print (to paper) a line of a certain thickness? Then you
need to talk about dimensions (say, mm) not pixels.



On Tue, Jul 9, 2013 at 1:35 PM, Massimo massimo.iasev...@snai.it wrote:

 Thanks for the answer.

 I try to better explain the problem with an attached java example.

 If you run the main method you should get two png image
 . svgDefImage.png that contain a 1px thin line generated with default
 target
 resolution
 . svg204Image.png that contain a 3px thin line generated with 204dpi target
 resolution

 According to the svg tag, both files should contain 1px thin lines.

 All images is generated with the same attached fo file.

 Notice that I use a custom Java2D renderer.

 I forgot to mention that I am using the fop trunk version.

 Thanks.
 Massimo.

 SVGTest.java
 http://apache-fop.1065347.n5.nabble.com/file/n38858/SVGTest.java
 svgpixelsize.fo
 http://apache-fop.1065347.n5.nabble.com/file/n38858/svgpixelsize.fo
 svgDefImage.png
 http://apache-fop.1065347.n5.nabble.com/file/n38858/svgDefImage.png
 svg204Image.png
 http://apache-fop.1065347.n5.nabble.com/file/n38858/svg204Image.png



 --
 View this message in context:
 http://apache-fop.1065347.n5.nabble.com/SVG-pixel-size-tp38853p38858.html
 Sent from the FOP - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: SVG pixel size

2013-07-09 Thread Luis Bernardo


Correct. And since FOP is still in the past and uses 72 instead of 96:

2.125 / 72 * 96 = 2.833 (pixels, which become dots when sent to the printer)

On 7/9/13 5:46 PM, Sergiu Dumitriu wrote:

So, a pixel is a fixed length that doesn't scale down with the DPI, it
should always be 1/96 inches. At 204 DPI that would translate into 2.125
dots.


On 07/09/2013 09:33 AM, Luis Bernardo wrote:

Lets look at the default case, that creates a 100x100 pixel image. The
default target dpi is 72, so 100/72 = 1.38.

If you set the target dpi to 204, then the image needs to be 283x283
pixels because 204*1.3 = 283.. Then a 1 pixel line needs to be
2.83 pixels to keep the scaling correct. Since you cannot have 2.83
pixel thickness in the monitor, it defaults to 3 pixels.

Is your goal to print (to paper) a line of a certain thickness? Then you
need to talk about dimensions (say, mm) not pixels.



On Tue, Jul 9, 2013 at 1:35 PM, Massimo massimo.iasev...@snai.it
mailto:massimo.iasev...@snai.it wrote:

 Thanks for the answer.

 I try to better explain the problem with an attached java example.

 If you run the main method you should get two png image
 . svgDefImage.png that contain a 1px thin line generated with
 default target
 resolution
 . svg204Image.png that contain a 3px thin line generated with 204dpi
 target
 resolution

 According to the svg tag, both files should contain 1px thin lines.

 All images is generated with the same attached fo file.

 Notice that I use a custom Java2D renderer.

 I forgot to mention that I am using the fop trunk version.

 Thanks.
 Massimo.

 SVGTest.java
 http://apache-fop.1065347.n5.nabble.com/file/n38858/SVGTest.java
 svgpixelsize.fo http://svgpixelsize.fo
 http://apache-fop.1065347.n5.nabble.com/file/n38858/svgpixelsize.fo
 svgDefImage.png
 http://apache-fop.1065347.n5.nabble.com/file/n38858/svgDefImage.png
 svg204Image.png
 http://apache-fop.1065347.n5.nabble.com/file/n38858/svg204Image.png






-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Encryption and links

2013-07-23 Thread Luis Bernardo
Why do you need to use Bouncy Castle? And can you provide an example of
your source FO file? It is possible that the problem you see is also
present in trunk. Note that support for encryption in trunk has been
expanded since the the 1.0 release so you may want to try trunk too.


On Tue, Jul 23, 2013 at 6:47 AM, lars.bjer...@swedbank.se wrote:

 Hi.

 ** **

 I have been implementing the Bouncy Castle encryption support as described
 in the FOP docs and almost everything works out fine.

 What does not work however is the implementation of external links
 (fo:basic-link - external-destination). In my case the link target will be
 an Internet URL (e.g. http://x.y.com).

 ** **

 When I try to click on a link in the resulting PDF I will be directed to
 my default browser but with a “Target not found” message. When inspecting
 the URL I find that it starts with file:///C:/eclipse.../out/ which is
 the path to the created PDF. After that there is just a string of
 hexadecimal characters (encrypted URL I suspect).

 ** **

 However, when turning off encryption and not changing any other parameter,
 the links will work all right.

 ** **

 I am currently using FOP 1.0 but looked at history of changes for 1.1 I
 did not see anything relating to this.

 ** **

 I found some information regarding this on Internet from 2008 FOP 0.95 and
 so my questions are:

 ** **

 Is the bug still there (it seems so)?

 Does anybody have a workaround (without hacking the FOP code)?

 ** **

 Regards 

  

 *Lars Bjerges*

 zOS  Common Function (Sweden)

 ** **

 Swedbank AB (publ)

 105 34 Stockholm

 Telefon: +46 (0)8 58 59 43 45

 Mobil: +46 (0)70 95 27 774

 Email:lars.bjer...@swedbank.se

 www.swedbank.se

  

 Vi ber dig lägga märke till att detta e-postmeddelande kan innehålla
 konfidentiell information. Om du felaktigt blivit mottagare av detta
 meddelande ber vi dig informera avsändaren om felet genom att använda
 svara-funktionen. Vi ber dig också att radera e-postmeddelandet utan att
 skicka det vidare eller kopiera det. Trots att vi intygar att
 e-postmeddelandet och eventuella bilagor inte innehåller virus och andra
 fel som kan påverka datorn eller IT-systemet där det mottages och läses,
 öppnas det på mottagarens eget ansvar. Vi tar inte på oss något ansvar för
 förlust eller skada, som har uppstått i samband med att e-postmeddelandet
 mottagits och använts.


 _
 

  

 Please note that this message may contain confidential information. If you
 have received this message by mistake, please inform the sender of the
 mistake by sending a reply, then delete the message from your system
 without making, distributing or retaining any copies of it. Although we
 believe that the message and any attachment are free from viruses and other
 errors that might affect the computer or IT system where it is received and
 read, the recipient opens the message at his or her own risk. We assume no
 responsibility for any loss or damage arising from the receipt or use of
 this message.

 ** **

 ** **



Re: Encryption and links

2013-07-25 Thread Luis Bernardo
The new documentation is here:
http://xmlgraphics.apache.org/fop/trunk/pdfencryption.html (at the bottom
it says no external libraries are needed). This was already true for 1.1
but the documentation was not updated. So, yes, there no need for Bouncy
Castle if you use a current JDK. We will investigate the bug with the
hyperlink.


On Thu, Jul 25, 2013 at 8:09 AM, lars.bjer...@swedbank.se wrote:

 @luis, I´m sorry i didn’t have the possibility to respond earlier but here
 goes:

 #1 I thought that an external provide (e.g. Bouncy Castle) was a prereq
 (reference to the same documentation link as Mattias specified which seems
 to be copied from 1.0 docs).

 #2 The FO file, the part concerning the link, looks like this:

 fo:block

   fo:basic-link external-destination=
 http://sv.wikipedia.org/wiki/Stieg_Trenter; text-decoration=underlinecolor
 =blueSvenska Wikipedia/fo:basic-link

 /fo:block

 which will give the desired result without encryption but will fail with
 encryption. It is basically the same as Matthias´ Jira FO.

 ** **

 @Matthias, I looked at the Jira issue and I would say it is a perfect
 match of my findings also. (I cast a vote on it).

 ** **

 So, I would think that this has nothing to do with the encryption
 implementation (i.e. Bouncy Castle) but rather how the FOP engine generates
 the resulting PDF file.

 ** **

 Best regards

 Lars

 ** **

 *Från:* Matthias Reischenbacher [mailto:matthias8...@gmx.at]
 *Skickat:* den 24 juli 2013 21:43
 *Till:* fop-users@xmlgraphics.apache.org
 *Ämne:* Re: Encryption and links

 ** **

 Hi Luis,

 I've had the same issue and created a jiira issue with a minimal test
 case, see:

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

 The problem also exists in current trunk.

 Regarding Bouncy Castle: this is documented here:
 http://xmlgraphics.apache.org/fop/1.1/pdfencryption.html#install_cryptoIs 
 this not necessary anymore with newer JDKs?

 Best regards,
 Matthias

 On 23.07.2013 07:57, Luis Bernardo wrote:

 Why do you need to use Bouncy Castle? And can you provide an example of
 your source FO file? It is possible that the problem you see is also
 present in trunk. Note that support for encryption in trunk has been
 expanded since the the 1.0 release so you may want to try trunk too.

 ** **

 On Tue, Jul 23, 2013 at 6:47 AM, lars.bjer...@swedbank.se wrote:

 Hi.

  

 I have been implementing the Bouncy Castle encryption support as described
 in the FOP docs and almost everything works out fine.

 What does not work however is the implementation of external links
 (fo:basic-link - external-destination). In my case the link target will be
 an Internet URL (e.g. http://x.y.com).

  

 When I try to click on a link in the resulting PDF I will be directed to
 my default browser but with a “Target not found” message. When inspecting
 the URL I find that it starts with file:///C:/eclipse.../out/ which is
 the path to the created PDF. After that there is just a string of
 hexadecimal characters (encrypted URL I suspect).

  

 However, when turning off encryption and not changing any other parameter,
 the links will work all right.

  

 I am currently using FOP 1.0 but looked at history of changes for 1.1 I
 did not see anything relating to this.

  

 I found some information regarding this on Internet from 2008 FOP 0.95 and
 so my questions are:

  

 Is the bug still there (it seems so)?

 Does anybody have a workaround (without hacking the FOP code)?

  

 Regards 

  

 *Lars Bjerges*

 zOS  Common Function (Sweden)

  

 Swedbank AB (publ)

 105 34 Stockholm

 Telefon: +46 (0)8 58 59 43 45

 Mobil: +46 (0)70 95 27 774

 Email:lars.bjer...@swedbank.se

 www.swedbank.se

  

 Vi ber dig lägga märke till att detta e-postmeddelande kan innehålla
 konfidentiell information. Om du felaktigt blivit mottagare av detta
 meddelande ber vi dig informera avsändaren om felet genom att använda
 svara-funktionen. Vi ber dig också att radera e-postmeddelandet utan att
 skicka det vidare eller kopiera det. Trots att vi intygar att
 e-postmeddelandet och eventuella bilagor inte innehåller virus och andra
 fel som kan påverka datorn eller IT-systemet där det mottages och läses,
 öppnas det på mottagarens eget ansvar. Vi tar inte på oss något ansvar för
 förlust eller skada, som har uppstått i samband med att e-postmeddelandet
 mottagits och använts.


 _
 

  

 Please note that this message may contain confidential information. If you
 have received this message by mistake, please inform the sender of the
 mistake by sending a reply, then delete the message from your system
 without making, distributing or retaining any copies

Re: Getting a list of font names without the memory hit...‏

2013-07-30 Thread Luis Bernardo
Are you using FOP in your Desktop app (meaning you feed and FO file and 
output one of the supported formats) or you just want to use some 
classes to get the list of fonts in your system?


On 7/30/13 5:42 PM, Bernard Giannetti wrote:
(apologies for the double post...somehow my email got tagged to the 
end of an unrelated post)



Hi,

I'm making a call to 
org.apache.fop.tools.fontlist.FontListGenerator.listFonts( ... ) to 
get a list of font names for my desktop application. To get the font 
names, I take the keys from the returned fontFamilies SortedMap; the 
actual data is junked.


I hadn't realised just how much memory is used by listfont( ... ) - on 
some platforms such as Windows 7, in excess of 250 MB.  In this case 
I'm hitting out of memory errors.


I was wondering if there's a simpler way (uses less memory) to get 
just the font names (first family names)?  As I said, I don't make use 
of the metrics and other font details...just the first family name for 
each font. Digging down into listfont( ... ), I was wondering if it's 
safe to take the firstFamilyName and place it into a list say and then 
drop the following lines for the containers/sort?


Iterator iter = fontInfo.getFontTriplets().entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry)iter.next();
FontTriplet triplet = (FontTriplet)entry.getKey();
String key = (String)entry.getValue();
FontSpec container;
if (keyBag.contains(key)) {
keyBag.remove(key);

FontMetrics metrics = (FontMetrics)fonts.get(key);

container = new FontSpec(key, metrics);
container.addFamilyNames(metrics.getFamilyNames());
keys.put(key, container);
String firstFamilyName = (String)container.getFamilyNames().first();
List containers = (List)fontFamilies.get(firstFamilyName);
if (containers == null) {
containers = new java.util.ArrayList();
fontFamilies.put(firstFamilyName, containers);
}
containers.add(container);
Collections.sort(containers);
} else {
container = (FontSpec)keys.get(key);
}
container.addTriplet(triplet);
}

I'm guessing a lot of memory is chewed up in the containers/sort 
section...but really I can't be sure as I don't fully follow what's 
going on!


Ideally I'd just up the amount of memory supplied to the desktop 
application, but I don't have that option and besides, it just delays 
the problem of running out of memory.



Thanks in advance,

Bernard.




Re: Greater than or Equal to symbol Fop 1.0

2013-09-12 Thread Luis Bernardo
Try to configure a fall back font that has the glyph. Then Arial is still
used everywhere but for those glyphs.


On Thu, Sep 12, 2013 at 1:22 PM, Bonekrusher djs...@yahoo.com wrote:

 Thanks Glenn,

 Unfortunately my customer requires arial as the font. Is there another
 work-around?



 --
 View this message in context:
 http://apache-fop.1065347.n5.nabble.com/Greater-than-or-Equal-to-symbol-Fop-1-0-tp39197p39199.html
 Sent from the FOP - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Request for getting fop1.1 document

2013-10-07 Thread Luis Bernardo


All the documentation, even if incomplete, is online: 
http://xmlgraphics.apache.org/fop/1.1/.


If you are having trouble getting FOP to work please provide a small 
sample of what you tried so far and we will help you.


On 10/7/13 5:56 PM, Senthil Kumaravel wrote:

Hi All,
I'm working a part of document management project. We'd like to use fop1.1 to 
covert Chinese text to PDF. Unable to get right document in net.  Could you 
please send me the link or PDF for getting knowledge about fop1.1 as soon as 
possible.

Thanks in advance.

Senthil Kumaravel
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Is is possible to have fop abort with non-zero exit code when an image isn't found

2013-10-10 Thread Luis Bernardo


I don't think so.

If you don't mind compiling the code, you can easily abort FOP if an 
image is missing by changing the @event.severity from ERROR to FATAL in 
org.apache.fop.ResourceEventProducer and building (ant clean package). 
But feel free to submit a feature request.


On 10/9/13 9:31 AM, Wolgast Olof wrote:


Hi

I turn to the mailing list because I haven't been able to find the 
answer somewhere else. I would like to run fop from gnu make and have 
fop abort and return a non-zero exit code if an image isn't found. Now 
a warning message (Image not found. URI; ... is printed and the pdf 
is created. Hence gnu make continues and the error isn't detected 
until the log file or the produced pdf is manually inspected. Is there 
any setting which makes fop abort with a non-zero exit code? If not, 
should I submit a feature request?


// Olof





Re: png vs. jpg

2013-10-16 Thread Luis Bernardo


Yes, there is a difference. By default FOP uses a native image loader 
for JPG but not for PNG. There is however a native image loader for PNG 
too, which you can enable in the configuration file. See 
http://wiki.apache.org/xmlgraphics-fop/HowTo/ImageLoaderRawPNG for more 
info. Try it and I expect that you will see a performance improvement.


Native image loaders process the image differently and usually do it 
faster. The reason the native image loader for PNG is not enabled by 
default is because it does not support all types of PNG images, but 
supports the most common, so very likely it will work with your images too.


Why is PNG more expensive than JPG to process? One reason is 
transparency, which JPG does not support. To embed a PNG in PDF the 
transparency bytes have to be separated from the RGB bytes, and then 
both are embedded in the PDF as separated components. The other reason 
is compression. When not using the native image loader, the PNG image 
needs to be uncompressed and converted to a plain RGB bitmap. This 
process can be very expensive.


On 10/16/13 7:39 PM, Roberto Cahanap wrote:


Hello everyone.

We have been trying to figure out why our pdf generation was taking so 
long.


When we changed an image in the PDF from PNG to JPG, then it was much 
faster.


Is there a difference in the way these two graphic formats are 
processed in FOP?


Thank you for your responses.

-Roberto

The information transmitted in this email and any of its attachments 
is intended only for the person or entity to which it is addressed and 
may contain BioReference Laboratories proprietary information, which 
is privileged, confidential, or subject to copyright belonging to 
BioReference Laboratories. Any review, retransmission, dissemination 
or other use of, or taking of any action in reliance upon, this 
information by persons or entities other than the intended recipient 
is prohibited and may be unlawful. If you received this in error, 
please contact the sender immediately and delete and destroy the 
communication and all of the attachments you have received and all 
copies thereof.






Re: png vs. jpg

2013-10-20 Thread Luis Bernardo


That is a good question! It seems to be some legacy configuration that 
copied from an existing fop.xconf that apparently is not used anymore. 
But I will need to investigate because I do not have an answer.


On 10/17/13 10:49 AM, Bernard Giannetti wrote:

Hi Luis,

I went to the page you provided (ImageLoaderRawPNG) and noticed in the 
config for application/pdf


xmlHandler mime=text/svg+xml/

I searched for xmlhandler and cannot find any reference to this tag 
(other than the page you gave).


I'm generating PDFs using embedded FOP (which include a small SVG 
image).  As a test, I generated a PDF with the tag in the FOP config 
and then without and I noticed no (obvious) difference in 
timing/memory.  Is this tag necessary...what does it do?



Thanks in advance,

Bernard.



Date: Wed, 16 Oct 2013 23:44:52 +0100
From: lmpmberna...@gmail.com
To: fop-users@xmlgraphics.apache.org
Subject: Re: png vs. jpg


snip
Yes, there is a difference. By default FOP uses a native image 
loader for JPG but not for PNG. There is however a native image loader 
for PNG too, which you can enable in the configuration file. See 
http://wiki.apache.org/xmlgraphics-fop/HowTo/ImageLoaderRawPNG for 
more info. Try it and I expect that you will see a performance 
improvement.

/snip




Re: PCL renderer problem with accented characters

2013-10-20 Thread Luis Bernardo


You are in the right place!

I am unable to reproduce the problem you describe. Tried with FOP-1.1, 
Java 1.7, Mac OS X. The output is attached (PCL, and PCL converted to 
PDF; note: I do not have a HP printer, so I only checked the output 
converted to PDF).


On 10/19/13 1:45 PM, szeak33 wrote:

Hi!

I'm hope i'm in a good place with my question.

With the most commonly Arial font (and other fonts too, but fewer 
fail) the PCL renderer CUT OFFaccents (ie.: Á, É, Ű, etc.) from 
capital characters in normal style. When using bold style, than 
accents appears pretty good. I tried a lot of settings in fop 
configuration: different target resolution, rendering and text 
rendering options, but no one help. Converting the same fo source to 
PDF is everything OK.

I guess it's a bug, but i'm not sure.

FOP version: 1.1 stable
OS: Ubuntu linux 12.04
Java: latest 1.7

Thanks for any help.




hello-1.1.pcl
Description: Binary data


hello-1.1.pcl.pdf
Description: Adobe PDF document

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: PDF images

2013-10-23 Thread Luis Bernardo


See http://xmlgraphics.apache.org/fop/fop-pdf-images.html. The provided 
packages work with fop-1.1.


On 10/23/13 7:41 PM, honyk wrote:

Dear All,

taking into an account that PDF images are not supported:

http://xmlgraphics.apache.org/fop/1.1/graphics.html

I am still trying to investigate it via PDF images extension:

http://www.jeremias-maerki.ch/download/fop/pdf-images/

Unfortunately, I am getting this fatal error when processing the first PDF
image (PDF v1.4):

Exception in thread main java.lang.VerifyError: (class:
org/apache/fop/render/
pdf/pdfbox/PDFBoxAdapter, method: cloneForNewDocument signature:
(Ljava/lang/Obj
ect;Ljava/lang/Object;Ljava/util/Collection;)Ljava/lang/Object;)
Incompatible ar
gument to function
 at
org.apache.fop.render.pdf.pdfbox.AbstractPDFBoxHandler.createFormForP
DF(AbstractPDFBoxHandler.java:90)
 at
org.apache.fop.render.pdf.pdfbox.PDFBoxImageHandler.handleImage(PDFBo
xImageHandler.java:57)
 at
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(Abstra
ctIFPainter.java:228)

Has this error something to do with FOP? Does this extension work for you in
FOP 1.1?

Thanks, Jan


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Shifted image when centered

2013-10-24 Thread Luis Bernardo


What is the purpose of the absolute-position=fixed left=0mm top=0mm?

The odd behavior you see is because of that, and also due to a bug in 
fop-1.1 that pushes images to the left of the right margin if they 
would  overflow it (the right margin). The bug has been fixed in trunk, 
and didn't exist in 1.0 either (it was a 1.1 regression).


If you use trunk or 1.0 text-align=left|center|right works as expected.

On 10/24/13 5:52 PM, honyk wrote:

Dear All,

I am just curious if this is a bug or feature...

When this FO code is used, the title page image is shifted do the left (the
left edge is outside the page). It happens when both the page master margin
(20mm) and the image's block text-align (center) properties are set.

If any of them is removed, the image is displayed as expected (not left
cropped).

That text-align=center is redundant here and can be removed. I am
reporting it as I was surprised by this behaviour.

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
   
   fo:layout-master-set

   fo:simple-page-master master-name=titlepage page-width=210mm
page-height=297mm margin=20mm
  fo:region-body/
   /fo:simple-page-master
   /fo:layout-master-set
 
   fo:page-sequence master-reference=titlepage

   fo:flow flow-name=xsl-region-body
  fo:block-container absolute-position=fixed left=0mm top=0mm
width=100% height=100%
 fo:block text-align=center
fo:external-graphic content-width=210mm
src=Images/TitlePageImage.jpg/
 /fo:block
  /fo:block-container
   /fo:flow
   /fo:page-sequence
/fo:root

Regards, Jan


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Transforming Incompatible Stylesheets over to FOP Apache

2013-10-31 Thread Luis Bernardo


As others pointed out, the default input for FOP is FO, not XSL and XML.

Nevertheless you can use FOP to create an FO from XSL and XML:

fop -xml my.xml -xsl my.xsl -foout input.fo

Use that to generate a simple input.fo file and send it to this mailing 
list and then it will be easier to help.


You can also try to bypass Arbortext and just use FOP:
fop -fo input.fo -pdf output.pdf

On 10/30/13, 9:48 PM, matrix wrote:

Fellow Forum Members,
I'm using Arbortext Publisher which utilizes FOP Apache coded stylesheets to
output a PDF compliant to the S1000D standard. However, I need to have my
PDF publication conform to an Army military standard known as MIL-SPEC
3031A. These 3031A stylesheets are available for free download at the link
below:

https://www.logsa.army.mil/pub/s1000d/FO-3031-A00-USARMY-PARA_001-00_EN-US.zip

My problem is a compatability related problem. The 3031A stylesheets the
Army provides are not coded to the FOP Apache standard and therefore
incompatible with Arbortext Publisher. In short, I'm not able to output my
publication out of Arbortext Publisher as a 3031A compliant PDF.

Since I'm new to FOP Apache, I'm hoping anybody out there can outline a
strategy on what I need to do to convert the Army provided 3031A stylesheets
over to FOP Apache stylesheets?

Is there a transformation engine that accomplishes this task?

Also, are there any online training videos that show how to modify FOP
Apache stylesheet code? My thinking is maybe I could tweak the code so that
my PDF outputs as something that looks close to a 3031A compliant
publication.

Any info will be greatly appreciated.




.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Transforming-Incompatible-Stylesheets-over-to-FOP-Apache-tp39504.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: java.lang.NoSuchMethodError: org.apache.fontbox.cff.CFFFont.getGIDMappings()Ljava/util/ArrayList;

2013-11-16 Thread Luis Bernardo
You seem to be using Eclipse. Make sure the fontbox*.jar in the the 
classpath.


On 11/15/13, 7:18 PM, Gonzalo Vasquez wrote:
When adding a specific font that contains TrueType fonts or using the 
auto-detect tag in the fop (trunk version) config file, I'm getting 
the following exception. Any comments / ideas?




java.lang.NoSuchMethodError: 
org.apache.fontbox.cff.CFFFont.getGIDMappings()Ljava/util/ArrayList;
at 
org.apache.fop.fonts.truetype.OTFFile.updateBBoxAndOffset(OTFFile.java:51)

at org.apache.fop.fonts.truetype.OpenFont.readFont(OpenFont.java:740)
at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:108)
at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:92)
at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:127)
at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:111)
at 
org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:251)

at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63)
at 
org.apache.fop.fonts.DefaultFontConfigurator.addDirectories(DefaultFontConfigurator.java:122)
at 
org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:85)
at 
org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147)
at 
org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127)

at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
at 
org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187)

at org.apache.fop.area.RenderPagesModel.init(RenderPagesModel.java:75)
at 
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)

at org.apache.fop.area.AreaTreeHandler.init(AreaTreeHandler.java:105)
at 
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350)

at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:106)
at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
at org.apache.fop.apps.Fop.init(Fop.java:78)
at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:179)
at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:220)
at TestRender.test(TestRender.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl mailto:gvasq...@altiuz.cl
http://www.altiuz.cl
http://www.altiuzreports.com
	https://www.facebook.com/altiuz http://twitter.com/altiuz 
http://www.linkedin.com/company/altiuz









Re: Cyrrilic font in Apache FOP 1.1

2013-11-16 Thread Luis Bernardo

On 11/16/13, 8:41 PM, Luis Bernardo wrote:


With trunk use:
FopFactoryBuilder builder = new FopConfParser(new 
File(confFile)).getFopFactoryBuilder();

FopFactory fopFactory = builder.build();

On 11/15/13, 6:23 PM, Gonzalo Vasquez wrote:
H..I'm using the trunk version for FOP, and methods seems to have 
changed their signature :(


El 15-11-2013, a las 15:21, Amigo et_s...@mail.ru 
mailto:et_s...@mail.ru escribió:




Configuration cfg = cfgBuilder.buildFromFile(new 
File(/home/name/temp/fonts/userconfig.xml));

Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
fopFactory.setUserConfig(cfg);


2013/11/15 Gonzalo Vasquez [via Apache FOP] [hidden email] 
x-msg://22/user/SendEmail.jtp?type=nodenode=39597i=0


Same problem here!

How are you telling your code to use such config file?


El 15-11-2013, a las 14:47, Amigo [hidden email]
http://user/SendEmail.jtp?type=nodenode=39596i=1 escribió:

 I have trouble on using Apache FOP 1.1 with arial font on ubuntu.

 Configuration file fonts.xml:

   / fop version=1.0
  base/home/user/temp/fonts//base
  font-base/home/user/temp/fonts//font-base
 renderers
renderer mime=application/pdf
fonts

   font-triplet name=Arial style=normal
weight=normal /
   font-triplet name=ArialMT style=normal
weight=normal /

   /fonts
/renderer
  /renderers
/fop/
 Also tried using this:

 /auto-detect/ /
 and

 /directory/home/user/temp/fonts//directory/
 I am always getting:

 Font Arial,normal,700 not found. Substituting with
any,normal,700.

 What should I fix in order to use Arial font?



 --







Re: Cyrrilic font in Apache FOP 1.1

2013-11-16 Thread Luis Bernardo


If you don't get an error with a font file that does not exist in your 
configuration file, that just means the configuration file is not being 
used. Are you sure the config file is really being loaded?


On 11/16/13, 4:06 AM, Amigo wrote:


Dit not help. Same problem. :(

Interesting, if i change font name, FOP dot't write any error, like 
'file not found'. Is it normal?


font kerning=yes embed-url=/home/name/temp/fonts/arial121334.ttf 
embedding-mode=subset

font-triplet name=Arial style=normal weight=normal/


2013/11/16 Simon Steiner [via Apache FOP] [hidden email] 
/user/SendEmail.jtp?type=nodenode=39602i=0


Hi,

What about using

renderers
   renderer mime=application/pdf
   fonts
   font kerning=yes
embed-url=/System/Library/Fonts/Arial.ttf
embedding-mode=subset
   font-triplet name=Arial style=normal
weight=normal/
   /font
   /fonts
   /renderer
/renderers

http://xmlgraphics.apache.org/fop/trunk/fonts.html

Thanks

-Original Message-
From: Amigo [mailto:[hidden email]
http://user/SendEmail.jtp?type=nodenode=39599i=0]
Sent: 15 November 2013 17:47
To: [hidden email]
http://user/SendEmail.jtp?type=nodenode=39599i=1
Subject: Cyrrilic font in Apache FOP 1.1

I have trouble on using Apache FOP 1.1 with arial font on ubuntu.

Configuration file fonts.xml:

   / fop version=1.0
base/home/user/temp/fonts//base
font-base/home/user/temp/fonts//font-base
 renderers
renderer mime=application/pdf
fonts

   font-triplet name=Arial style=normal weight=normal /
   font-triplet name=ArialMT style=normal weight=normal /

   /fonts
/renderer
  /renderers
/fop/
Also tried using this:

/auto-detect/ /
and

/directory/home/user/temp/fonts//directory/
I am always getting:

Font Arial,normal,700 not found. Substituting with
any,normal,700.

What should I fix in order to use Arial font?



-- 
View this message in context:

http://apache-fop.1065347.n5.nabble.com/Cyrrilic-font-in-Apache-FOP-1-1-tp39
595.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=39599i=2
For additional commands, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=39599i=3



-
To unsubscribe, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=39599i=4
For additional commands, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=39599i=5




If you reply to this email, your message will be added to the
discussion below:

http://apache-fop.1065347.n5.nabble.com/Cyrrilic-font-in-Apache-FOP-1-1-tp39595p39599.html

To unsubscribe from Cyrrilic font in Apache FOP 1.1, click here.
NAML

http://apache-fop.1065347.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





View this message in context: Re: Cyrrilic font in Apache FOP 1.1 
http://apache-fop.1065347.n5.nabble.com/Cyrrilic-font-in-Apache-FOP-1-1-tp39595p39602.html
Sent from the FOP - Users mailing list archive 
http://apache-fop.1065347.n5.nabble.com/FOP-Users-f3.html at Nabble.com.




Re: Content overflows the viewport

2013-11-19 Thread Luis Bernardo


Are you using trunk?

I get this with trunk:

Nov 19, 2013 11:42:05 PM org.apache.fop.events.LoggingEventListener 
processEvent
WARNING: Content overflows the viewport of an fo:block-container in 
inline-progression direction by 54 millipoints. Content will be 
clipped. (See position 490:64)



Position 490:64, is line 490, character position 64.


On 11/18/13, 4:05 PM, Gonzalo Vasquez wrote:

I'm getting several warnings like these:

Nov 18, 2013 12:58:40 PM org.apache.fop.events.LoggingEventListener 
processEvent
Advertencia: Content overflows the viewport of an fo:block-container 
in inline-progression direction by 54 millipoints. Content will be 
clipped. (No context info available)


How can I properly identify the offending elements? Please consider 
that the FO is XSL generated.


Regards,

Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl mailto:gvasq...@altiuz.cl
http://www.altiuz.cl
http://www.altiuzreports.com
	https://www.facebook.com/altiuz http://twitter.com/altiuz 
http://www.linkedin.com/company/altiuz









Re: Content overflows the viewport

2013-11-20 Thread Luis Bernardo
Run from the command line. Since you have the FO file, which you provided
before, running from the command line (using the FO file) will help debug
the overflow issue. I understand that you are generating the FO file on the
fly, but then it will just be an issue of fixing your style sheet.


On Wed, Nov 20, 2013 at 11:56 AM, Gonzalo Vasquez gvasq...@altiuz.clwrote:

 Yes Luis, I'm running trunk, but as Rob said, I'm not getting context
 (line, column) information. How are you running FOP to get such feedback?

   Gonzalo Vásquez Sáez
 Gerente Investigación y Desarrollo (RD)
 Altiuz Soluciones Tecnológicas de Negocios Ltda.
 Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
 +56 2 335 2461
   gvasq...@altiuz.cl
 http://www.altiuz.cl
 http://www.altiuzreports.com
   https://www.facebook.com/altiuz  http://twitter.com/altiuz 
 http://www.linkedin.com/company/altiuz

 El 19-11-2013, a las 20:45, Luis Bernardo lmpmberna...@gmail.com
 escribió:


 Are you using trunk?

 I get this with trunk:

 Nov 19, 2013 11:42:05 PM org.apache.fop.events.LoggingEventListener
 processEvent
 WARNING: Content overflows the viewport of an fo:block-container in
 inline-progression direction by 54 millipoints. Content will be
 clipped. (See position 490:64)


 Position 490:64, is line 490, character position 64.


 On 11/18/13, 4:05 PM, Gonzalo Vasquez wrote:

 I'm getting several warnings like these:

  Nov 18, 2013 12:58:40 PM org.apache.fop.events.LoggingEventListener
 processEvent
 Advertencia: Content overflows the viewport of an fo:block-container in
 inline-progression direction by 54 millipoints. Content will be
 clipped. (No context info available)

  How can I properly identify the offending elements? Please consider that
 the FO is XSL generated.

  Regards,

Gonzalo Vásquez Sáez
 Gerente Investigación y Desarrollo (RD)
 Altiuz Soluciones Tecnológicas de Negocios Ltda.
 Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
 +56 2 335 2461
   gvasq...@altiuz.cl
 http://www.altiuz.cl
 http://www.altiuzreports.com
   https://www.facebook.com/altiuz  http://twitter.com/altiuz 
 http://www.linkedin.com/company/altiuz






Re: Problem with TIFF in fop trunk

2013-11-20 Thread Luis Bernardo


I am unable to reproduce the problem. I am also using Mac OS X 10.9, and 
same trunk revision.


Can you try to place the image on the local disk (instead of retrieving 
it from a web server) to check whether that is causing the problem?


On 11/20/13, 8:55 PM, Joe Wicentowski wrote:

Hi all,

I recently built FOP for the first time to see if a problem I was
experiencing under 1.1 (it would consistently hang when rendering a
certain page) would go away if I tried trunk.  While trunk does now
overcome the problem I was having under 1.1, I am experiencing a new
problem: a TIFF that I embed on the cover page of my output was
displaying correctly under 1.1 but is now appearing as a squat, opaque
black box in the PDF generated under trunk.

I'm running fop trunk rev. 1543560 on Mac OS X 10.9, and ran fop on
the command line:

   $ ~/workspace/fop/fop -d -c fop-config.xml -fo frus1969-76v03.fo
-pdf frus1969-76v03.pdf

I don't get any errors in the output about the image (which is stored
on a local server at being inaccessible.

I've uploaded sample fo, the image, and the resulting PDF at the following URLs:

   http://static.history.state.gov/temp/fop/frus1969-76v03-cover.fo
   http://static.history.state.gov/temp/fop/frus1969-76v03-cover.pdf
   http://static.history.state.gov/temp/fop/Image_0001.tiff
   http://static.history.state.gov/temp/fop/fop-config.xml

The problem is apparent on the PDF, where I would expect to see
Image_0001.tiff embedded but instead see an opaque black box.
According to the docs
(http://xmlgraphics.apache.org/fop/trunk/graphics.html#tiff), this
CCITT Group IV-encoded TIFF image should be compatible with FOP.  And
it rendered fine under 1.1.

I'd appreciate any suggestions you might have.  I'm not quite sure
what to try next.

Thank you,
Joe

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Problem with TIFF in fop trunk

2013-11-21 Thread Luis Bernardo


OK, I see the issue. There seems to be a regression from 1.1 to trunk.

You need jai_imageio.jar in your lib directory if using trunk. With 1.1 
that is not necessary. I will investigate this but for now just get 
jai_imageio.


On 11/21/13, 3:15 AM, Joe Wicentowski wrote:

And just to add one more point:

I downloaded the 1.1 binary to this same Mac and ran:

$ ~/Downloads/fop-1.1/fop -d -c fop-config.xml -fo
frus1969-76v03-cover.fo -pdf frus1969-76v03-cover2.pdf

(Using the same fop-config.xml as described in my original email.)
The resulting PDF has the TIFF image intact, as expected - no black
box as I got with my locally build and configured trunk.

I guess this points not to a system level issue but rather my method
of building or configuring fop trunk, right?

Joe

On Wed, Nov 20, 2013 at 10:03 PM, Joe Wicentowski joe...@gmail.com wrote:

Hi Luis,

Thank you for your reply!  I just tried rebuilding on my other Mac and
reproduced my earlier black box problem.  I also tried your suggestion
to change the image reference to point to the local file system, with
the same results:

Original form of the image reference on line 27:
   fo:external-graphic
src=url('http://localhost:8080/cms/apps/tei-content/images/Image_0001.tiff')/

Form 2:
   fo:external-graphic src=url('Image_0001.tiff')/

Form 3:
   fo:external-graphic
src=url('http://localhost:8080/cms/apps/tei-content/images/Image_0001.tiff')/

Given that you weren't able to reproduce the problem, I wonder if
there could be a configuration problem on my side.  Here was my
procedure after checking out trunk:

First, I built fop using ant package, based on the recommendation at
http://xmlgraphics.apache.org/fop/trunk/compiling.html.

Second, I set up this ~/.foprc file:

FOP_OPTS=-Xmx2000m -Djava.awt.headless=true
FOP_HOME=~/workspace/fop/

Let me explain the values I chose: I set the Xmx because at first my
transformations were stalling at around page 500 of a 1000-plus page
publication, and raising the memory here allowed the transformation to
complete.  I set headless=true because I was using a bash for loop on
a directory of nearly 200 .fo files and the FOP icon kept stealing
focus.  And this FOP_HOME ~/workspace/fop/ directory is where I
checked out fop trunk, i.e., I ran chmod +x on ~/workspace/fop/fop to
be able to call the command I listed before:

$ ~/workspace/fop/fop {and so on...}

Could something in my .foprc be messed up?

Going further afield, I have this Oracle Java JDK:

$ java -version
java version 1.7.0_11
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

I also have the XCode Command Line Tools and homebrew installed with
these packages:

$ brew list
ant automake graphviz libksba libtool openssl python sqlite
autoconf gdbm libgpg-error libpng libyaml pkg-config readline

If there's any other information I can provide, I'd be happy to.

Thanks again,
Joe



On Nov 20, 2013, at 6:34 PM, Luis Bernardo lmpmberna...@gmail.com wrote:

I am unable to reproduce the problem. I am also using Mac OS X 10.9, and same 
trunk revision.

Can you try to place the image on the local disk (instead of retrieving it from 
a web server) to check whether that is causing the problem?


On 11/20/13, 8:55 PM, Joe Wicentowski wrote:
Hi all,

I recently built FOP for the first time to see if a problem I was
experiencing under 1.1 (it would consistently hang when rendering a
certain page) would go away if I tried trunk.  While trunk does now
overcome the problem I was having under 1.1, I am experiencing a new
problem: a TIFF that I embed on the cover page of my output was
displaying correctly under 1.1 but is now appearing as a squat, opaque
black box in the PDF generated under trunk.

I'm running fop trunk rev. 1543560 on Mac OS X 10.9, and ran fop on
the command line:

   $ ~/workspace/fop/fop -d -c fop-config.xml -fo frus1969-76v03.fo
-pdf frus1969-76v03.pdf

I don't get any errors in the output about the image (which is stored
on a local server at being inaccessible.

I've uploaded sample fo, the image, and the resulting PDF at the following URLs:

   http://static.history.state.gov/temp/fop/frus1969-76v03-cover.fo
   http://static.history.state.gov/temp/fop/frus1969-76v03-cover.pdf
   http://static.history.state.gov/temp/fop/Image_0001.tiff
   http://static.history.state.gov/temp/fop/fop-config.xml

The problem is apparent on the PDF, where I would expect to see
Image_0001.tiff embedded but instead see an opaque black box.
According to the docs
(http://xmlgraphics.apache.org/fop/trunk/graphics.html#tiff), this
CCITT Group IV-encoded TIFF image should be compatible with FOP.  And
it rendered fine under 1.1.

I'd appreciate any suggestions you might have.  I'm not quite sure
what to try next.

Thank you,
Joe

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h

Re: Optimizing FO template

2013-11-21 Thread Luis Bernardo


I haven't looked at your sample, but regarding your previous SVG sample, 
and as an example and without wanting to drastically change your FO, 
replace the first SVG:


fo:block-container overflow=hidden 
position=absolute

fo:block
fo:instream-foreign-object
svg:svg version=1.0 width=612 height=396
svg:rect x=0 y=50 width=546 height=346
stroke-width=0.25 fill=white stroke=black /
/svg:svg
/fo:instream-foreign-object
/fo:block
/fo:block-container

by (border color changed to distinguish it from the others)

fo:block-container overflow=hidden 
margin-top=50pt position=relative width=546pt height=346pt 
border=0.5pt red solid

fo:block
!--fo:instream-foreign-object
svg:svg version=1.0 width=612 height=396
svg:rect x=0 y=50 width=546 height=346
stroke-width=0.25 fill=white stroke=black /
/svg:svg
/fo:instream-foreign-object--
/fo:block
/fo:block-container

That should give you an idea. There is not need to use SVG to draw 
rectangular borders.


On 11/21/13, 9:13 PM, Gonzalo Vasquez wrote:
Someone pointed out days ago that SVG lines/rect could faster if 
rendered as FO objects, any pointers on such?


Any other extra tips that may help improving rendering performance 
with the attached template?


Regards,
Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl mailto:gvasq...@altiuz.cl
http://www.altiuz.cl
http://www.altiuzreports.com
	https://www.facebook.com/altiuz http://twitter.com/altiuz 
http://www.linkedin.com/company/altiuz




=






Re: Custom fonts in Apache FOP (used with Saxon in Eclipse)

2013-12-02 Thread Luis Bernardo


Do not use auto-detect. Instead configure the fonts as shown here: 
http://xmlgraphics.apache.org/fop/trunk/fonts.html#register.


The instructions are for trunk but this works the same in 1.1.

On 11/26/13, 9:38 AM, FJMan wrote:

The fop.xconf looks like this:


renderers
 renderer mime=application/pdf
   filterList
 valueflate/value
   /filterList

   fonts

 font-triplet name=Arial style=normal weight=normal/


 font-triplet name=Arial,Italic style=italic weight=normal/


 font-triplet name=Courier New style=normal weight=normal/

  auto-detect/
   /fonts



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Custom-fonts-in-Apache-FOP-used-with-Saxon-in-Eclipse-tp39692p39693.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: External-Graphics PNG Output

2013-12-09 Thread Luis Bernardo


You need to set this in the fop.xconf file:

  !-- Target resolution in dpi (dots/pixels per inch) for specifying 
the target resolution for generated bitmaps, default: 72dpi --

  target-resolution600/target-resolution

600 is a suggestion, but if you don't set it, as the comment says, you 
get 72dpi...


Take a look at the PNGRenderer and TIFFRenderer in the 
o.a.fop.render.bitmap package. A JPEGRenderer would be implemented 
similarly.


On 12/5/13, 9:31 PM, Chris Cartlidge wrote:


Hi Guys,

So attached are the files to re-create the issue. I am using a 
standard FOP configuration that you get when running through the 
examples directory. You may also note that the colour of the PDF 
images changes and looks like it's not retaining the profile as well 
as the quality of the image being poor.


I'm running on FOP 1.1

Any helpers or pointers would be great. Also how do I get into 
contributing to this project, I want to builder a JPEG render for FOP...


*From:*A Gian [mailto:a.yan...@hotmail.com mailto:a.yan...@hotmail.com]
*Sent:* 04 December 2013 14:10
*To:* fop-users@xmlgraphics.apache.org 
mailto:fop-users@xmlgraphics.apache.org

*Subject:* RE: External-Graphics  PNG Output

Hello Chris,
which fop version  are you  using  ?  1.1? Also, if you could provide 
all the necessary resources in order to reproduce the problem (such 
as  fo file, images etc ) it would be easier for other people to help you.

Thanasis



From: chris.cartli...@adgistics.com mailto:chris.cartli...@adgistics.com
Date: Wed, 4 Dec 2013 12:04:47 +
Subject: External-Graphics  PNG Output
To: fop-users@xmlgraphics.apache.org 
mailto:fop-users@xmlgraphics.apache.org


Hi Guys,

I have a simple fo document that includes a PDF as an 
/external/-/graphic. When this is rendered as a PDF the quality is 
great as you would expect. However, when I run this through the 
standard Bitmap renderer to produce a PNG the quality is awful and the 
image is pixelated../


//

/Any idea? /

**


 



This message and any attachments transmitted with it are confidential 
and intended solely for the use of the addressee(s). If you are not 
the addressee, you may not disseminate, distribute or copy this 
message and you should destroy it and kindly notify the sender by 
return. All opinions and conclusions in this message are solely those 
of the author and should be understood as neither given nor endorsed 
by Adgistics Limited unless specifically stated. Whilst we take 
reasonable precautions to ensure this message is free of viruses, 
opening and using this message is at the risk of the recipient.


Adgistics Limited: Registered in England and Wales, Company Number: 
3859657, Registered Office 5 Copper Row, Tower Bridge Piazza, London 
SE1 2LH. Vat Registered Number: 752019256.



 



This message and any attachments transmitted with it are confidential 
and intended solely for the use of the addressee(s). If you are not 
the addressee, you may not disseminate, distribute or copy this 
message and you should destroy it and kindly notify the sender by 
return. All opinions and conclusions in this message are solely those 
of the author and should be understood as neither given nor endorsed 
by Adgistics Limited unless specifically stated. Whilst we take 
reasonable precautions to ensure this message is free of viruses, 
opening and using this message is at the risk of the recipient.


Adgistics Limited: Registered in England and Wales, Company Number: 
3859657, Registered Office 5 Copper Row, Tower Bridge Piazza, London 
SE1 2LH. Vat Registered Number: 752019256.



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Upgrading FOP extension from 0.95 to 1.1 issues

2013-12-09 Thread Luis Bernardo


I guess the Painter classes are the ones you want to look at (PSPainter 
and so on).


On 12/4/13, 4:02 PM, Sebastien HO wrote:

Hi,

I am trying to upgrade an extension that has been written on FOP V0.95 to
FOP V1.1.

Some classes have been deleted from one version to the other one which leads
to compilation issues. I guess code structure have changed.

The classes that are missing are :
-  org.apache.fop.pdf.PDFState :
I use this class to get the current AffineTransform
Java Code :
AffineTransform transform =
pdfi.currentState.getTransform();
transform.scale(0.001D, 0.001D);
pdfi.aRect = transform.createTransformedShape(new
Rectangle2D.Float(pdfi.posX, pdfi.posY, pdfi.width,
pdfi.height)).getBounds2D();

 Can someone tell me where can I get this information?

The following have also been deleted :
-org.apache.fop.render.ps.PSRenderer and
org.apache.fop.render.ps.PSRendererMaker
-org.apache.fop.render.afp.AFPRenderer and
org.apache.fop.render.afp.AFPRendererMaker
-org.apache.fop.render.plc.PLCRenderer and
org.apache.fop.render.plc.PLCRendererMaker

Can someone tell me how it works to access rendering class?

Regards,

Sebastien


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Rendering Latex Snippets using XSL-FO and FOP

2014-01-24 Thread Luis Bernardo
This is not very recent, but take a look at
http://jeuclid.sourceforge.net/trunk/jeuclid-fop/index.html.



On Fri, Jan 24, 2014 at 8:54 AM, Michael Wechner
michael.wech...@wyona.comwrote:

 Hi

 I recently learned about

 http://www.mathjax.org/

 which is a great library to render Latex snippets inside HTML. See for
 example the abstract contained by

 http://projecteuclid.org/euclid.aos/1388545673

 I would like to do the same thing with PDF, which means I have an XML
 containing Latex snippets, e.g.

 p
 We study sparse principal components analysis in high dimensions, where
 $p$ (the number of variables) can be much larger than $n$ (the number of
 observations), and analyze the problem of estimating the subspace
 spanned by the principal eigenvectors of the population covariance
 matrix. We introduce two complementary notions of $\ell_{q}$ subspace
 sparsity: row sparsity and column sparsity. We prove nonasymptotic lower
 and upper bounds on the minimax subspace estimation error for $0\leq
 q\leq1$. The bounds are optimal for row sparse subspaces and nearly
 optimal for column sparse subspaces, they apply to general classes of
 covariance matrices, and they show that $\ell_{q}$ constrained estimates
 can achieve optimal minimax rates without restrictive spiked covariance
 conditions. Interestingly, the form of the rates matches known results
 for sparse regression when the effective noise variance is defined
 appropriately. Our proof employs a novel variational $\sin\Theta$
 theorem that may be useful in other regularized spectral estimation
 problems.
 /p

 and then I would like to use XSL-FO and FOP to generate PDF.

 Is that possible somehow? Or any other ideas how I could generate such a
 PDF?

 Thanks

 Michael

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: SVG - embedded CMYK bitmaps

2014-01-28 Thread Luis Bernardo


Yes, by default JPEG CMYKs are converted to sRGB if the color profile is 
embedded in the image (I had not tried with JPEG CMYKs embedded in SVG 
but I think that also there the images are processed by FOP ). The 
reason this is done is due to the fact that the standard Java JPEG 
handling functions cannot handle CMYK. So FOP converts CMYK to sRGB to 
be able to embed the image with acceptable colors.


The solution is to use a ImageIO library that can handle CMYK in JPEGs. 
The default jai_imageio.jar cannot handle that either. The only one I 
know is the TwelveMonkeys ImageIo. I tested it with JPEGs and also TIFF 
and it worked well. See 
http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/201306.mbox/%3c51ba5640.1070...@gmail.com%3E.


On 1/28/14, 9:09 PM, Matthias Reischenbacher wrote:

Hi,

I've noticed that JPEGs with DeviceCMYK color space, embedded in SVGs, 
are converted to sRGB when generating a PDF file. Does that happen 
with all kind of JPEG CMYKs? How are embedded bitmaps processed? Is 
that done by Batik and that's way its handled differently than normal 
fo:external-graphic CMYK-JPEGs?


Thanks for any clarification on this matter... I've attached a sample 
SVG file.


Best regards,
Matthias


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Tiff image - color distortion

2014-01-28 Thread Luis Bernardo


Two questions about CMYK on the same day!

The JDK JPEG image handling functions cannot handle CMYK. If the images 
include a color profile then FOP can convert the images to RGB. To get 
FOP generate a PDF with images that preserve the CMYK colors you need to 
use a ImageIO library like TwelveMonkeys. Get it, compile it and place 
the JPEG related jar in the FOP lib directory (note that you will also 
need to add some of the core jars).


On 1/28/14, 5:12 PM, Valentina wrote:

Hi I am including Tiff image in Pdf output.

The problem is that it is not rendering the image correctly. For 
example, the original Tiff image has much stronger contrast (i.e. some 
very dark sections, some very light sections), whilst the pdf output 
image appears more greyish and noisy.


Is this a known issue?

Also I looked here:
http://xmlgraphics.apache.org/fop/1.1/graphics.html#tiff

FOP can embed TIFF images without decompression into PDF, PostScript 
and AFP if they have either CCITT T.4, CCITT T.6, or JPEG compression. 
Otherwise, a TIFF-capable Image I/O codec is necessary for decoding 
the image.


There may be some limitation concerning images in the CMYK color space.

Could someone explain the meaning of those sentences. Thanks.



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Changes in pdf tiff compression configuration has no effect on size of pdf generated

2014-01-28 Thread Luis Bernardo


Note that the images use compression internally. If the image loader 
selected by FOP to process your image is the default ImageIO one (i.e., 
not a native FOP image loader) the image will be uncompressed. If then 
you turn off PDF stream compression, then yes, you should end up with a 
much larger file.


Maybe you can explain why you do not want compression?

On 1/28/14, 1:10 PM, Valentina Cupac wrote:

Thanks!

I wasn't exactly sure what should be configured in the pdf rendering 
settings. (The goal is to have no compression applied to tiff images 
which are included in pdf output), so I tried some possible changes, 
listed below.


My raw images are about 200KB.
The generated pdf file (images - tiff, png + a bit of text) is 3MB.

The good thing is that now the images are not compressed (I'm assuming 
that occurs since the pdf is now larger, the effect comes from here: 
filterList type=imagevaluenull/value/filterList


However, the interesting part is that the pdf file is now much larger 
than the size of the original images. Is this an expected effect?



=== Current configuration ===

renderer mime=application/pdf
  filterList
!-- provides compression using zlib flate (default is on) --
valueflate/value
!-- encodes binary data into printable ascii characters 
(default off)

 This provides about a 4:5 expansion of data size --
!-- valueascii-85/value --
!-- encodes binary data with hex representation (default off)
 This filter is not recommended as it doubles the data 
size --

!-- valueascii-hex/value --
  /filterList


=== ATTEMPTED CONFIGURATION ===

renderer mime=application/pdf
filterList valueflate/value /filterList filterList 
type=image valuenull/value /filterList




Could you let me know if there are any other settings I could try


2014-01-28 Registar Man szea...@gmail.com mailto:szea...@gmail.com

Hi!

The image/tiff renderer configuration settings only works when you
generate tiff output not pdf.
For PDF rendering settings you must configure in the pdf renderer
section.

Bye, Csaba

-
To unsubscribe, e-mail:
fop-users-unsubscr...@xmlgraphics.apache.org
mailto:fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail:
fop-users-h...@xmlgraphics.apache.org
mailto:fop-users-h...@xmlgraphics.apache.org






Re: altova stylevision fop rtf

2014-01-28 Thread Luis Bernardo


Are you using trunk or 1.1? This example does not run with 1.1 as is.

On 1/28/14, 3:56 PM, edi4988 wrote:

Thank you for your help. I fixed the problem. You were right . I appreciate
your time and help.

Now, I use this example
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java

but I have an error in this part:

* // configure fopFactory as desired
  final FopFactory fopFactory = FopFactory.newInstance(new
File(.).toURI());*

this is my error:

*The method newInstance() in the type FopFactory is not applicable for the
arguments (URI)*

Do you know why I have the error?

Thanks



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/altova-stylevision-fop-rtf-tp4825p39916.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Tiff image - color distortion

2014-01-29 Thread Luis Bernardo
TIFF can use JPEG compression, so it is likely that the issue is with JPEG
image handling even though it is a TIFF. But TwelveMonkeys also has an
imageio-tiff component so you can try both. Get the source from github,
build it (mvn clean install, I think) and place the needed jars in the FOP
lib directory. The fop.xconf does not need to be modified.


On Wed, Jan 29, 2014 at 7:12 AM, Valentina Cupac valentina.cu...@tp.rswrote:

 That is what I would like to do  to preserving the original image.

 Just to clarify, you mentioned JDK JPEG image handling, is that what needs
 to be used for Tiff image handling (in my report I have just Tiff images),
 and if so, do any settings need to modified in the fop.xconf file?

 -- Forwarded message --
 From: Luis Bernardo lmpmberna...@gmail.com
 Date: 2014-01-29
 Subject: Re: Tiff image - color distortion
 To: fop-users@xmlgraphics.apache.org



 Two questions about CMYK on the same day!

 The JDK JPEG image handling functions cannot handle CMYK. If the images
 include a color profile then FOP can convert the images to RGB. To get FOP
 generate a PDF with images that preserve the CMYK colors you need to use a
 ImageIO library like TwelveMonkeys. Get it, compile it and place the JPEG
 related jar in the FOP lib directory (note that you will also need to add
 some of the core jars).


 On 1/28/14, 5:12 PM, Valentina wrote:

 Hi I am including Tiff image in Pdf output.

 The problem is that it is not rendering the image correctly. For example,
 the original Tiff image has much stronger contrast (i.e. some very dark
 sections, some very light sections), whilst the pdf output image appears
 more greyish and noisy.

 Is this a known issue?

 Also I looked here:
 http://xmlgraphics.apache.org/fop/1.1/graphics.html#tiff

 FOP can embed TIFF images without decompression into PDF, PostScript and
 AFP if they have either CCITT T.4, CCITT T.6, or JPEG compression.
 Otherwise, a TIFF-capable Image I/O codec is necessary for decoding the
 image.

 There may be some limitation concerning images in the CMYK color space.

 Could someone explain the meaning of those sentences. Thanks.



 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org





Re: Changes in pdf tiff compression configuration has no effect on size of pdf generated

2014-01-29 Thread Luis Bernardo
If the image is CMYK and you get gray scale output it means the image had
no color profile embedded. If you embed one FOP should convert it to RGB
unless you have an ImageIO library that can handle CMYK.


On Wed, Jan 29, 2014 at 7:06 AM, Valentina valent...@tp.rs wrote:

 The reason I didn't want compression is as follows:
 * My external Tiff image (96dpi, Bit-depth: 16, Compression: Uncompressed)
 wasn't rendering correctly, so I thought a possible reason could be
 compression
 * The next possible reason could be something about color profiles, which
 was the motivation for my other thread

 So the basic issue is that a grayscale image appears incorrectly in pdf
 (it appears washed out, lower contrast, more noisy) and I don't know what
 the cause is, and the above were the potential reasons that came to mind.

 2014-01-29 Luis Bernardo lmpmberna...@gmail.com


 Note that the images use compression internally. If the image loader
 selected by FOP to process your image is the default ImageIO one (i.e., not
 a native FOP image loader) the image will be uncompressed. If then you turn
 off PDF stream compression, then yes, you should end up with a much larger
 file.

 Maybe you can explain why you do not want compression?


 On 1/28/14, 1:10 PM, Valentina Cupac wrote:

  Thanks!

  I wasn't exactly sure what should be configured in the pdf rendering
 settings. (The goal is to have no compression applied to tiff images which
 are included in pdf output), so I tried some possible changes, listed below.

  My raw images are about 200KB.
 The generated pdf file (images - tiff, png + a bit of text) is 3MB.

  The good thing is that now the images are not compressed (I'm assuming
 that occurs since the pdf is now larger, the effect comes from here: 
 filterList
 type=imagevaluenull/value/filterList

  However, the interesting part is that the pdf file is now much larger
 than the size of the original images. Is this an expected effect?


  === Current configuration ===

  renderer mime=application/pdf
   filterList
 !-- provides compression using zlib flate (default is on) --
 valueflate/value

 !-- encodes binary data into printable ascii characters (default
 off)
  This provides about a 4:5 expansion of data size --
 !-- valueascii-85/value --

 !-- encodes binary data with hex representation (default off)
  This filter is not recommended as it doubles the data size
 --
 !-- valueascii-hex/value --
   /filterList


  === ATTEMPTED CONFIGURATION ===

  renderer mime=application/pdf
   filterList valueflate/value /filterList filterList
 type=image valuenull/value /filterList



  Could you let me know if there are any other settings I could try


  2014-01-28 Registar Man szea...@gmail.com

 Hi!

 The image/tiff renderer configuration settings only works when you
 generate tiff output not pdf.
 For PDF rendering settings you must configure in the pdf renderer
 section.

 Bye, Csaba

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org







Re: Tiff image - color distortion

2014-01-29 Thread Luis Bernardo
If you can share the image send it to this mailing list. Otherwise you can
send it to me and I can take a look. It is possible that the default image
loader is still being used, or something else is at play, but we will need
the image to check.


On Wed, Jan 29, 2014 at 1:07 PM, Valentina valent...@tp.rs wrote:

 I compiled the library.

 Inside the lib directory, I now have the following:

 avalon-framework
 batik-all
 commons-io
 commons-logging
 seralizer
 twelvemonkeys-common-image
 twelvemonkeys-common-io
 twelvemonkeys-common-lang
 twelvemonkeys-imageio-core
 twelvemonkeys-imageio-jpeg
 twelvemonkeys-imageio-metadata
 twelvemonkeys-common-image
 twelvemonkeys-common-io
 twelvemonkeys-common-tiff
 xalan
 xercesImpl
 xml-apis
 xml-apis-ext
 xmlgraphics-commons

 I run the command fop template.fo report.pdf

 I do not see difference before/after twelvemonkeys was added.
 Was there anything else that I should have done?


 2014-01-29 Luis Bernardo lmpmberna...@gmail.com

 TIFF can use JPEG compression, so it is likely that the issue is with JPEG
 image handling even though it is a TIFF. But TwelveMonkeys also has an
 imageio-tiff component so you can try both. Get the source from github,
 build it (mvn clean install, I think) and place the needed jars in the FOP
 lib directory. The fop.xconf does not need to be modified.


 On Wed, Jan 29, 2014 at 7:12 AM, Valentina Cupac 
 valentina.cu...@tp.rswrote:

 That is what I would like to do  to preserving the original image.

 Just to clarify, you mentioned JDK JPEG image handling, is that what
 needs to be used for Tiff image handling (in my report I have just Tiff
 images), and if so, do any settings need to modified in the fop.xconf file?

 -- Forwarded message --
 From: Luis Bernardo lmpmberna...@gmail.com
 Date: 2014-01-29
 Subject: Re: Tiff image - color distortion
 To: fop-users@xmlgraphics.apache.org



 Two questions about CMYK on the same day!

 The JDK JPEG image handling functions cannot handle CMYK. If the images
 include a color profile then FOP can convert the images to RGB. To get FOP
 generate a PDF with images that preserve the CMYK colors you need to use a
 ImageIO library like TwelveMonkeys. Get it, compile it and place the JPEG
 related jar in the FOP lib directory (note that you will also need to add
 some of the core jars).


 On 1/28/14, 5:12 PM, Valentina wrote:

 Hi I am including Tiff image in Pdf output.

 The problem is that it is not rendering the image correctly. For
 example, the original Tiff image has much stronger contrast (i.e. some very
 dark sections, some very light sections), whilst the pdf output image
 appears more greyish and noisy.

 Is this a known issue?

 Also I looked here:
 http://xmlgraphics.apache.org/fop/1.1/graphics.html#tiff

 FOP can embed TIFF images without decompression into PDF, PostScript
 and AFP if they have either CCITT T.4, CCITT T.6, or JPEG compression.
 Otherwise, a TIFF-capable Image I/O codec is necessary for decoding the
 image.

 There may be some limitation concerning images in the CMYK color space.

 Could someone explain the meaning of those sentences. Thanks.



 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org







Re: Tiff image - color distortion

2014-01-29 Thread Luis Bernardo
Remove the image-loading section from fop.xconf, or at least the first
line (the second line can stay and may even be necessary). The way you have
it you may be giving preference to ImageLoaderImageIO (which is indeed the
default unless there is a native) over the twelvemonkeys image loader.


On Wed, Jan 29, 2014 at 3:11 PM, Valentina Cupac valentina.cu...@tp.rswrote:

 The following is the image data, obtained with
 http://www.awaresystems.be/imaging/tiff/astifftagviewer.html

 ==

 PART A. Tiff data

 1. Original tiff data of Tiff image exported from LeadTools

 SubFileType (1 Long): Zero
 ImageWidth (1 Long): 1396
 ImageLength (1 Long): 460
 BitsPerSample (1 Short): 16
 Compression (1 Short): Uncompressed
 Photometric (1 Short): MinIsBlack
 StripOffsets (2 Long): 238, 1047238
 Orientation (1 Short): TopLeft
 SamplesPerPixel (1 Short): 1
 RowsPerStrip (1 Long): 375
 StripByteCounts (2 Long): 1047000, 237320
 PlanarConfig (1 Short): Contig
 PageNumber (2 Short): 0, 0

 2. Tiff data when LeadTools image is opened in Paint.NET, then did Save as
 in Paint.NET

 SubFileType (1 Long): Zero
 ImageWidth (1 Long): 1396
 ImageLength (1 Long): 460
 BitsPerSample (4 Short): 8, 8, 8, 8
 Compression (1 Short): LZW
 Photometric (1 Short): RGB
 StripOffsets (1 Long): 8
 SamplesPerPixel (1 Short): 4
 RowsPerStrip (1 Long): 460
 StripByteCounts (1 Long): 1015503
 XResolution (1 Rational): 96
 YResolution (1 Rational): 96
 PlanarConfig (1 Short): Contig
 ResolutionUnit (1 Short): Inch
 PageNumber (2 Short): 0, 0
 Software (18 ASCII): Paint.NET v3.5.10
 Predictor (1 Short): 2
 ExtraSamples (1 Short): 2

 3. Tiff data when LeadTools image is opened in ImageJ, then did Save as
 from Image J.

 SubFileType (1 Long): Zero
 ImageWidth (1 Long): 1396
 ImageLength (1 Long): 460
 BitsPerSample (1 Short): 16
 Photometric (1 Short): MinIsBlack
 ImageDescription (34 ASCII): ImageJ=1.47v min=0.0 max=65535.0
 StripOffsets (1 Long): 168
 SamplesPerPixel (1 Short): 1
 RowsPerStrip (1 Short): 460
 StripByteCounts (1 Long): 1284320

 ===

 PART B. Effects

 Within the Windows image viewer program, all those images appear the same.

 However, when generating pdf with FOP, this is what happens:
 * Image [1] renders incorrectly
 * Image [2] renders correctly *
 * Image [3] renders incorrectly


 Also I have these settings:

   image-loading
 penalty value=-1000
 class=org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderImageIO/
 penalty value=INFINITE
 class=org.apache.xmlgraphics.image.loader.impl.ImageLoaderRawCCITTFax/
   /image-loading

 So this means it's using the default Java image loader as far as I know.



 2014-01-29 Luis Bernardo lmpmberna...@gmail.com

 If you can share the image send it to this mailing list. Otherwise you can
 send it to me and I can take a look. It is possible that the default image
 loader is still being used, or something else is at play, but we will need
 the image to check.


 On Wed, Jan 29, 2014 at 1:07 PM, Valentina valent...@tp.rs wrote:

 I compiled the library.

 Inside the lib directory, I now have the following:

 avalon-framework
 batik-all
 commons-io
 commons-logging
 seralizer
 twelvemonkeys-common-image
 twelvemonkeys-common-io
 twelvemonkeys-common-lang
 twelvemonkeys-imageio-core
 twelvemonkeys-imageio-jpeg
 twelvemonkeys-imageio-metadata
 twelvemonkeys-common-image
 twelvemonkeys-common-io
 twelvemonkeys-common-tiff
 xalan
 xercesImpl
 xml-apis
 xml-apis-ext
 xmlgraphics-commons

 I run the command fop template.fo report.pdf

 I do not see difference before/after twelvemonkeys was added.
 Was there anything else that I should have done?


 2014-01-29 Luis Bernardo lmpmberna...@gmail.com

 TIFF can use JPEG compression, so it is likely that the issue is with
 JPEG image handling even though it is a TIFF. But TwelveMonkeys also has an
 imageio-tiff component so you can try both. Get the source from github,
 build it (mvn clean install, I think) and place the needed jars in the FOP
 lib directory. The fop.xconf does not need to be modified.


 On Wed, Jan 29, 2014 at 7:12 AM, Valentina Cupac valentina.cu...@tp.rs
  wrote:

 That is what I would like to do  to preserving the original image.

 Just to clarify, you mentioned JDK JPEG image handling, is that what
 needs to be used for Tiff image handling (in my report I have just Tiff
 images), and if so, do any settings need to modified in the fop.xconf 
 file?

 -- Forwarded message --
 From: Luis Bernardo lmpmberna...@gmail.com
 Date: 2014-01-29
 Subject: Re: Tiff image - color distortion
 To: fop-users@xmlgraphics.apache.org



 Two questions about CMYK on the same day!

 The JDK JPEG image handling functions cannot handle CMYK. If the
 images include a color profile then FOP can convert the images to RGB. To
 get FOP generate a PDF with images that preserve the CMYK colors you need
 to use a ImageIO library like TwelveMonkeys. Get

Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4

2014-02-04 Thread Luis Bernardo
If you are using FOP-1.1 then you should use fop-pdf-images that you can
get from https://dist.apache.org/repos/dist/dev/xmlgraphics/binaries/. That
includes the PDFBox jars, but they are 1.3.1 only.

If you need PDFBox-1.8.3, then you should use FOP-trunk and
fop-pdf-images-trunk. Note that FOP-trunk includes a patched fontbox-1.8.3
(and you should use it instead of the official fontbox-1.8.3). It is
expected that FOP will use the official fontbox jar in the near future.


On Tue, Feb 4, 2014 at 1:26 PM, Kai Hofmann powers...@web.de wrote:

 Hello *,

 I have an old Fop with an old fop-pdf-images release perfectly running
 since years :)
 But now I updated to FOP 1.1 release, fop-pdf-images trunk (also tested
 2.0.1) and PDFBox 1.8.3/4.
 That because I use PDFBox in my code also by myself with some newer
 features.

 So my first problem was that with PDFBox 1.8.3 I got exceptions from
 PDFBox - which seems to be solved with updating today to 1.8.4 :)
 The problem now is different - when running in debug more nothing more
 happens after the following output:

 2014-02-04 10:55:01,611 [PollScheduler] DEBUG
 org.apache.fop.layoutmgr.AbstractBreaker - PLM part: 1, start at pos 0,
 break at pos 3, break class = ANY
 2014-02-04 10:55:01,611 [PollScheduler] DEBUG
 org.apache.fop.layoutmgr.AbstractBreaker -  addAreas from 0 to 0
 2014-02-04 10:55:01,614 [PollScheduler] DEBUG
 org.apache.fop.area.IDTracker - signalIDProcessed()
 2014-02-04 10:55:01,614 [PollScheduler] DEBUG
 org.apache.fop.area.IDTracker - signalIDProcessed()
 2014-02-04 10:55:01,614 [PollScheduler] DEBUG
 org.apache.fop.area.IDTracker - signalIDProcessed()
 2014-02-04 10:55:01,960 [PollScheduler] DEBUG
 org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline:
 Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@86ad0a with
 penalty 0
 2014-02-04 10:55:01,963 [PollScheduler] DEBUG
 org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline:
 Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@1a966b9Converters: 
 [org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap@166d0be,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterBuffered2Rendered@1127906,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterRendered2PNG@1c79e64]
 with penalty 1020
 2014-02-04 10:55:01,963 [PollScheduler] DEBUG
 org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline:
 Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@6fe64fConverters: 
 [org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698]
 with penalty 1000
 2014-02-04 10:55:01,963 [PollScheduler] DEBUG
 org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline:
 Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@7953f0Converters: 
 [org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap@166d0be]
 with penalty 1010
 2014-02-04 10:55:01,963 [PollScheduler] DEBUG
 org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline:
 Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@175dce3Converters: 
 [org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap@166d0be,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterBuffered2Rendered@1127906]
 with penalty 1010
 2014-02-04 10:55:01,963 [PollScheduler] DEBUG
 org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline:
 Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@f8f12cConverters: 
 [org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698,
 org.apache.fop.image.loader.batik.ImageConverterG2D2SVG@1a19cec] with
 penalty 1010
 2014-02-04 10:55:01,963 [PollScheduler] DEBUG
 org.apache.xmlgraphics.image.loader.ImageManager - Chosen pipeline: Loader:
 org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@86ad0a

 Looks like no crash happens, no exception, also no cpu consumtion - really
 strange.
 When trying the older fop-pdf-images 2.0.1 it stops (maybe) at the same
 point - but gives me a warning that a pdf 1.5 was used which might result
 in unexpected results. But also nothing more happens.

 I also checked out the fop-pdf-images source code to find out more, but
 without much luck.

 One time I got a Null pointer expection from PreloaderPDF.loadPDF(..) line
 117:

 pddoc.getDocument().setWarnMissingClose(false);

 But can't reproduce this at the moment.

 Can somebody help with this?


 Greetings and thanks

  PowerStat

 --
 Kai Hofmann   EMail: powers...@web.de
 Bremen/Germany

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Aw: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4

2014-02-05 Thread Luis Bernardo


PDFBox-1.8.4 was only released a few days ago and that explains why 
fop-pdf-images is still using 1.8.3. I will update it today.


Meanwhile, if you want to apply the two patches that fontbox needs, they 
are in the lib directory of the fop project. They were created against 
PDFBox-1.8.3, and possibly they can be applied cleanly to 1.8.4.


On 2/5/14, 7:09 AM, Kai Hofmann wrote:

Hello,
  
my experience with the official trunk version is that PDFBox-1.8.3 has a bug that is fixed in 1.8.4 that makes it impossible to use the fop-pdf-image trunk at the moment - so would be nice if this could be updated. I have not understand the pdfbox patches yet, so I was not able to apply them to pdfbox 1.8.4.
  
As you mention the official binaries are no longer usable for me, because the pdfbox version included is to much outdated - and I need pdfbox too in my code.

At the moment I am thinking about using a separate class loader for the 
official binaries, but in my eyes this is the badest way ...
  
Best way for me would be if fop-pdf-images-trunk could be updated to pdfbox 1.8.4 then I will give fop-trunk a try, but with pdfbox 1.8.3 it is only broken software for me :(
  
Thanks
  
   PowerStat
  
  


Gesendet: Dienstag, 04. Februar 2014 um 14:39 Uhr
Von: Luis Bernardo lmpmberna...@gmail.com
An: fop-users@xmlgraphics.apache.org fop-users@xmlgraphics.apache.org
Betreff: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4

If you are using FOP-1.1 then you should use fop-pdf-images that you can get 
from https://dist.apache.org/repos/dist/dev/xmlgraphics/binaries/. That 
includes the PDFBox jars, but they are 1.3.1 only.
  
If you need PDFBox-1.8.3, then you should use FOP-trunk and fop-pdf-images-trunk. Note that FOP-trunk includes a patched fontbox-1.8.3 (and you should use it instead of the official fontbox-1.8.3). It is expected that FOP will use the official fontbox jar in the near future.
  
On Tue, Feb 4, 2014 at 1:26 PM, Kai Hofmann powers...@web.de[powers...@web.de] wrote:Hello *,


I have an old Fop with an old fop-pdf-images release perfectly running since 
years :)
But now I updated to FOP 1.1 release, fop-pdf-images trunk (also tested 2.0.1) 
and PDFBox 1.8.3/4.
That because I use PDFBox in my code also by myself with some newer features.
  
So my first problem was that with PDFBox 1.8.3 I got exceptions from PDFBox - which seems to be solved with updating today to 1.8.4 :)

The problem now is different - when running in debug more nothing more happens 
after the following output:

2014-02-04 10:55:01,611 [PollScheduler] DEBUG 
org.apache.fop.layoutmgr.AbstractBreaker - PLM part: 1, start at pos 0, break 
at pos 3, break class = ANY
2014-02-04 10:55:01,611 [PollScheduler] DEBUG 
org.apache.fop.layoutmgr.AbstractBreaker -  addAreas from 0 to 0
2014-02-04 10:55:01,614 [PollScheduler] DEBUG org.apache.fop.area.IDTracker - 
signalIDProcessed()
2014-02-04 10:55:01,614 [PollScheduler] DEBUG org.apache.fop.area.IDTracker - 
signalIDProcessed()
2014-02-04 10:55:01,614 [PollScheduler] DEBUG org.apache.fop.area.IDTracker - 
signalIDProcessed()
2014-02-04 10:55:01,960 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@86ad0a with penalty 0
2014-02-04 10:55:01,963 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@1a966b9 Converters: 
[org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698, 
org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap@166d0be, 
org.apache.xmlgraphics.image.loader.impl.ImageConverterBuffered2Rendered@1127906,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterRendered2PNG@1c79e64] 
with penalty 1020
2014-02-04 10:55:01,963 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@6fe64f Converters: 
[org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698] with penalty 
1000
2014-02-04 10:55:01,963 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@7953f0 Converters: 
[org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698, 
org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap@166d0be] with 
penalty 1010
2014-02-04 10:55:01,963 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@175dce3 Converters: 
[org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698, 
org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap@166d0be, 
org.apache.xmlgraphics.image.loader.impl.ImageConverterBuffered2Rendered@1127906]
 with penalty 1010
2014-02-04 10:55:01,963 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory

Re: Aw: Re: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4

2014-02-05 Thread Luis Bernardo


fop-pdf-images was updated with pdfbox-1.8.4 jars.

if you checkout and run ant dist you get all the jars in an archive.

On 2/5/14, 11:51 AM, Kai Hofmann wrote:

Dear Luis Bernardo,

thanks for doing the update to pdfbox 1.8.4 in advance.
I tried to apply the patches to the pdfbox trunk - where they failed and I had 
some problems with figuring out the reasons (like a missing test class - which 
is simple, and other moved code).
But you are right, because 1.8.4 is a bugfix release they should work there - 
so I should checkout the 1.8.4 branch instead of the trunk ;-)

Greetings from Germany

PowerStat
  
--

Kai Hofmann   EMail: powers...@web.de
Bremen/Germany
  
  


Gesendet: Mittwoch, 05. Februar 2014 um 11:03 Uhr
Von: Luis Bernardo lmpmberna...@gmail.com
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Aw: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4
PDFBox-1.8.4 was only released a few days ago and that explains why
fop-pdf-images is still using 1.8.3. I will update it today.

Meanwhile, if you want to apply the two patches that fontbox needs, they
are in the lib directory of the fop project. They were created against
PDFBox-1.8.3, and possibly they can be applied cleanly to 1.8.4.

On 2/5/14, 7:09 AM, Kai Hofmann wrote:

Hello,

my experience with the official trunk version is that PDFBox-1.8.3 has a bug 
that is fixed in 1.8.4 that makes it impossible to use the fop-pdf-image trunk 
at the moment - so would be nice if this could be updated. I have not 
understand the pdfbox patches yet, so I was not able to apply them to pdfbox 
1.8.4.

As you mention the official binaries are no longer usable for me, because the 
pdfbox version included is to much outdated - and I need pdfbox too in my code.
At the moment I am thinking about using a separate class loader for the 
official binaries, but in my eyes this is the badest way ...

Best way for me would be if fop-pdf-images-trunk could be updated to pdfbox 
1.8.4 then I will give fop-trunk a try, but with pdfbox 1.8.3 it is only broken 
software for me :(

Thanks

PowerStat



Gesendet: Dienstag, 04. Februar 2014 um 14:39 Uhr
Von: Luis Bernardo lmpmberna...@gmail.com
An: fop-users@xmlgraphics.apache.org fop-users@xmlgraphics.apache.org
Betreff: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4

If you are using FOP-1.1 then you should use fop-pdf-images that you can get 
from https://dist.apache.org/repos/dist/dev/xmlgraphics/binaries/. That 
includes the PDFBox jars, but they are 1.3.1 only.

If you need PDFBox-1.8.3, then you should use FOP-trunk and 
fop-pdf-images-trunk. Note that FOP-trunk includes a patched fontbox-1.8.3 (and 
you should use it instead of the official fontbox-1.8.3). It is expected that 
FOP will use the official fontbox jar in the near future.

On Tue, Feb 4, 2014 at 1:26 PM, Kai Hofmann 
powers...@web.de[powers...@web.de] wrote:Hello *,

I have an old Fop with an old fop-pdf-images release perfectly running since 
years :)
But now I updated to FOP 1.1 release, fop-pdf-images trunk (also tested 2.0.1) 
and PDFBox 1.8.3/4.
That because I use PDFBox in my code also by myself with some newer features.

So my first problem was that with PDFBox 1.8.3 I got exceptions from PDFBox - 
which seems to be solved with updating today to 1.8.4 :)
The problem now is different - when running in debug more nothing more happens 
after the following output:

2014-02-04 10:55:01,611 [PollScheduler] DEBUG 
org.apache.fop.layoutmgr.AbstractBreaker - PLM part: 1, start at pos 0, break 
at pos 3, break class = ANY
2014-02-04 10:55:01,611 [PollScheduler] DEBUG 
org.apache.fop.layoutmgr.AbstractBreaker - addAreas from 0 to 0
2014-02-04 10:55:01,614 [PollScheduler] DEBUG org.apache.fop.area.IDTracker - 
signalIDProcessed()
2014-02-04 10:55:01,614 [PollScheduler] DEBUG org.apache.fop.area.IDTracker - 
signalIDProcessed()
2014-02-04 10:55:01,614 [PollScheduler] DEBUG org.apache.fop.area.IDTracker - 
signalIDProcessed()
2014-02-04 10:55:01,960 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@86ad0a with penalty 0
2014-02-04 10:55:01,963 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@1a966b9 Converters: 
[org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698, 
org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap@166d0be, 
org.apache.xmlgraphics.image.loader.impl.ImageConverterBuffered2Rendered@1127906,
 org.apache.xmlgraphics.image.loader.impl.ImageConverterRendered2PNG@1c79e64] 
with penalty 1020
2014-02-04 10:55:01,963 [PollScheduler] DEBUG 
org.apache.xmlgraphics.image.loader.pipeline.PipelineFactory - Pipeline: 
Loader: org.apache.fop.render.pdf.pdfbox.ImageLoaderPDF@6fe64f Converters: 
[org.apache.fop.render.pdf.pdfbox.ImageConverterPDF2G2D@972698] with penalty 
1000
2014-02-04 10:55:01,963 [PollScheduler] DEBUG

Re: Placing Copyright notice on SigPlan without using float?

2014-02-06 Thread Luis Bernardo


I think Pascal suggestion of using intermediate format is your best bet.

Goes like this:
fop -fo test.fo -if application/pdf test.if.xml

edit the test.if.xml and then
fop -ifin test-modified.if.xml -pdf test.pdf

attached is an example. you can do it better and add the copyright to a 
static region and add a blank space at the beginning. then the only 
thing you need to do is to apply a vertical translation to the first 
column and you can write a script to do it.


On 2/6/14, 4:08 PM, Aaron W. Hsu wrote:

Pascal Sancho psancho@gmail.com writes:


For such questions, you should ask on DocBook List (follow [1]).

[1] http://www.docbook.org/help

Thanks, I'm on that list, but I was under the impression that this list
might provide better solutions to actually getting the desired behavior
in FOP. I'm sure once I understand a fundamental FO approach that I will
be able to implement it in DocBook.



?xml version=1.0 encoding=UTF-8?
document xmlns=http://xmlgraphics.apache.org/fop/intermediate; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:nav=http://xmlgraphics.apache.org/fop/intermediate/document-navigation; xmlns:foi=http://xmlgraphics.apache.org/fop/internal; version=2.0
header
x:xmpmeta xmlns:x=adobe:ns:meta/
rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;
rdf:Description xmlns:xmp=http://ns.adobe.com/xap/1.0/; rdf:about=
xmp:CreateDate2014-02-06T23:39:15Z/xmp:CreateDate
xmp:CreatorToolApache FOP Version svn-trunk/xmp:CreatorTool
xmp:MetadataDate2014-02-06T23:39:15Z/xmp:MetadataDate
/rdf:Description
/rdf:RDF
/x:xmpmeta
/header
page-sequence xml:space=preserve
page index=0 name=1 page-master-name=A4-portrait width=595275 height=841889
page-header/
content
viewport transform=translate(56692,56692) width=481891 height=728505
g transform=translate(0,-10266)
font family=sans-serif style=normal weight=400 variant=normal size=12000 color=#00/
text x=0 y=24666The 1952 Winter Olympics, officially known/text
text x=0 y=39066as the VI Olympic Winter Games, took/text
text x=0 y=53466place in Oslo, Norway, from 14 to 25/text
text x=0 y=67866February. Discussions about Oslo hosting/text
text x=0 y=82266the Winter Olympic Games began as/text
text x=0 y=9early as 1935; the city wanted to host the/text
text x=0 y=1110661948 Games, but World War II made that/text
text x=0 y=125466impossible. Instead, Oslo won the right/text
text x=0 y=139866to host the 1952 Games in a contest that/text
text x=0 y=154266included Cortina d'Ampezzo in Italy and/text
text x=0 y=168666Lake Placid in the United States. All of/text
text x=0 y=183066the venues were in Oslo's metropolitan/text
text x=0 y=197466area except for the alpine skiing events,/text
text x=0 y=211866which were held at Norefjell, 113 km (70/text
text x=0 y=226266mi) from the capital. A new hotel was built/text
text x=0 y=240666for the press and dignitaries, along with/text
text x=0 y=255066three dormitories to house athletes and/text
text x=0 y=269466coaches, creating the first modern athlete's/text
text x=0 y=283866village. The city of Oslo bore the financial/text
text x=0 y=298266burden of hosting the Games in return for/text
text x=0 y=312666the revenue they generated. The Games/text
text x=0 y=327066attracted 694 athletes representing 30/text
text x=0 y=341466countries, who participated in four sports/text
text x=0 y=355866and 22 events.[1] Japan and Germany/text
text x=0 y=370266made their returns to winter Olympic/text
text x=0 y=384666competition, after being forced to miss the/text
text x=0 y=3990661948 Games in the aftermath of World/text
text x=0 y=413466War II. Germany was represented solely/text
text x=0 y=427866by West German athletes because East/text
text x=0 y=442266Germany declined to compete as a unified/text
text x=0 y=45team. Portugal and New Zealand made/text
text x=0 y=471066their Winter Olympic debuts, and for the/text
text x=0 y=485466first time women were allowed to compete/text
text x=0 y=499866in cross-country skiing. Norwegian truck/text
text x=0 y=514266driver Hjalmar Andersen won three out/text
text x=0 y=528666of four speed skating events to become/text
text x=0 y=543066the most decorated athlete at the Games./text
text x=0 y=557466Germany resumed its former prominence/text
text x=0 y=571866in bobsleigh, with wins in the four- and/text
text x=0 y=586266two-man events. Dick Button of the United/text
text x=0 y=600666States performed the first triple jump/text
text x=0 y=615066in international competition to claim his/text
text x=0 y=629466second consecutive men's figure skating/text
text x=0 y=643866Olympic title. The 1952 Games featured/text
text x=0 y=658266one demonstration sport, bandy, but only/text
text x=0 y=672666three Nordic countries competed in the/text
text x=0 y=687066tournament. Norway dominated the overall/text
text x=0 y=701466medal count with 16 medals, seven of/text
text x=0 y=715866them gold. The Games closed with the/text
text x=0 y=726132(c) my copyright notice 2014/text
/g
g 

Re: Fop trunk / fop-pdf-images / PDFBox 1.8.4 -additional infos

2014-02-09 Thread Luis Bernardo


Are you sharing the FopFactory between threads?

I ran an intense single threaded test that reuses the FopFactory and had 
no problem. If you are running single thread then send your PDF so that 
we can investigate.


On 2/6/14, 1:20 PM, Kai Hofmann wrote:

I have some additional information to the NullPointerException:

- the result of pddoc.getDocument() (line 117) is Null
- the Exception only occurs when reusing the FopFactory - never during the 
first run.

Maybe a problem with reusing the PDFBox? I will try to have a deeper look.

Greetings

   PowerStat

  
--

Kai Hofmann   EMail: powers...@web.de
Bremen/Germany
  
  


Gesendet: Donnerstag, 06. Februar 2014 um 13:27 Uhr
Von: Kai Hofmann powers...@web.de
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Fop trunk / fop-pdf-images / PDFBox 1.8.4
Dear Luis Bernadro,

I have now created a complete trunk version (fop, fop-pdf-image with pdfbox 
1.8.4 (patched), xmlgraphics trunk, batik trunk).
Now I end up with the following stack trace:

Caused by: java.lang.NullPointerException
at org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:117)
at 
org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java:83)
at 
org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:176)
at 
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:128)
at 
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
at org.apache.fop.fo.FObj.processNode(FObj.java:129)
at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:289)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:178)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
at org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:359)
at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:145)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:390)

Do you have an idear about this?

Greetings

PowerStat
  
--

Kai Hofmann   EMail: powers...@web.de
Bremen/Germany
  
  


Gesendet: Donnerstag, 06. Februar 2014 um 02:12 Uhr
Von: Luis Bernardo lmpmberna...@gmail.com
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Aw: Re: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4
fop-pdf-images was updated with pdfbox-1.8.4 jars.

if you checkout and run ant dist you get all the jars in an archive.

On 2/5/14, 11:51 AM, Kai Hofmann wrote:

Dear Luis Bernardo,

thanks for doing the update to pdfbox 1.8.4 in advance.
I tried to apply the patches to the pdfbox trunk - where they failed and I had 
some problems with figuring out the reasons (like a missing test class - which 
is simple, and other moved code).
But you are right, because 1.8.4 is a bugfix release they should work there - 
so I should checkout the 1.8.4 branch instead of the trunk ;-)

Greetings from Germany

PowerStat

--
Kai Hofmann EMail: powers...@web.de
Bremen/Germany



Gesendet: Mittwoch, 05. Februar 2014 um 11:03 Uhr
Von: Luis Bernardo lmpmberna...@gmail.com
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Aw: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4
PDFBox-1.8.4 was only released a few days ago and that explains why
fop-pdf-images is still using 1.8.3. I will update it today.

Meanwhile, if you want to apply the two patches that fontbox needs, they
are in the lib directory of the fop project. They were created against
PDFBox-1.8.3, and possibly they can be applied cleanly to 1.8.4.

On 2/5/14, 7:09 AM, Kai Hofmann wrote:

Hello,

my experience with the official trunk version is that PDFBox-1.8.3 has a bug 
that is fixed in 1.8.4 that makes it impossible to use the fop-pdf-image trunk 
at the moment - so would be nice if this could be updated. I have not 
understand the pdfbox patches yet, so I was not able to apply them to pdfbox 
1.8.4.

As you mention the official binaries are no longer usable for me, because the 
pdfbox version included is to much outdated - and I need pdfbox too in my code.
At the moment I am thinking about using a separate class loader for the 
official binaries, but in my eyes this is the badest way ...

Best way for me would be if fop-pdf-images-trunk could be updated to pdfbox 
1.8.4 then I will give fop-trunk a try, but with pdfbox 1.8.3 it is only broken 
software for me :(

Thanks

PowerStat



Gesendet: Dienstag, 04. Februar 2014 um 14:39 Uhr
Von: Luis Bernardo lmpmberna...@gmail.com
An: fop-users@xmlgraphics.apache.org fop-users@xmlgraphics.apache.org
Betreff: Re: Fop 1.1 / fop-pdf-images / PDFBox 1.8.3/4

If you are using FOP-1.1 then you should use fop-pdf-images that you can get 
from https://dist.apache.org/repos/dist/dev/xmlgraphics/binaries/. That 
includes the PDFBox jars, but they are 1.3.1 only.

If you need PDFBox-1.8.3, then you should use FOP-trunk and 
fop

Re: Retrieve-Marker retrieve-position = all?

2014-02-17 Thread Luis Bernardo


I don't think a general solution is possible within XSL-FO. If the 
number of entries (titles) per page is fixed (except for the last page) 
then it is simple. If the number of entries per page is bounded, and 
there is enough real estate in the page to place the resolved markers 
then it can be done with some manipulation of intermediate format (IF).


The approach would be for every marker to register the current value and 
the next few ones. Say, you do not expect more than 5 entries per page. 
Then for every title you would use two markers. So marker 
this-and-next for title10 would be title10, title11, title12, 
title13, title14, and marker this would be title10. Then you would 
retrieve the first this-and-next marker in the page, and the last 
this marker in the page. The resolved values in IF would then look 
like title10, title11, title12, title13, title14, title13, where the 
last entry if from the last this marker in the page. Then you would 
process the IF to reduce it to title10, title11, title12, title13.


On 2/14/14, 6:45 PM, Matthias Reischenbacher wrote:

Hi,

I'd like to display multiple markers with the same name on the page 
header. Conceptually those markers correspond to chapter titles and 
all chapter titles, visible on a single page, should be printed. Up 
until now I've used the retrieve-position attribute for showing the 
first or last chapter title. But this time I'd need the first, last 
and all in between on the current page. Is this even possible with 
XSL-FO/FOP? If not, is it achievable by manipulating the fop 
intermediate structure?


Best regards,
Matthias

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Scaling images

2014-02-24 Thread Luis Bernardo
I think the issue is height=100%, which doesn't work the way you probably
expect... When you specify 100%, you want 100% of what? Width does not
suffer from the same problem because the width is constrained by the page
width. Since the height is not constrained by the page height, as you maybe
expected, then you get the  behavior you noticed.

From the spec for height:

percentage
Specifies a percentage height. The percentage is calculated with respect to
the height of the
generated box's containing block. If the height of the containing block is
not specified explicitly
(i.e., it depends on content height), the value is interpreted like auto.

So that's what you get, i.e., you get auto.


On Mon, Feb 24, 2014 at 1:09 PM, markus.sticker.e...@zf.com wrote:

  Hello FOP,



 I've got an issue about scalling images.

 The target is to scale images so they fit to the space on the page.

 Scaling the width works fine.

 I set this (breit.png is a picture with extreme width):

 fo:external-graphic
 src=url(file:///c:/temp/SernaPlugin/Source/draft/draft/breit.png)
 content-width=scale-to-fit  width=100% height=100%
 inline-progression-dimension.maximum=100%
 inline-progression-dimension.minimum=1%  scaling=uniform /



 So I tried this (hoch.png is a picture with extreme height) :

 fo:external-graphic
 src=url(file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.png)
 content-height=scale-to-fit width=100% height=100%
 inline-progression-dimension.maximum=100%
 inline-progression-dimension.minimum=1%  scaling=uniform/

 à That failed à The image was not scaled.



 So what's wrong ?



 Thanks and
 Kind regards

 Markus Sticker
 Forschung und Entwicklung ZF Konzern/Research and Development ZF Group
 Infrastruktur/Infrastructure (DTEP4)

 *ZF **Friedrichshafen AG*
 88038 Friedrichshafen, Deutschland/Germany
 Telefon/Phone  +49 7541 77-7644, Telefax/Fax  +49 7541 77-907644
 *markus.sticker.e...@zf.com markus.sticker.e...@zf.com*


 Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof.
 Dr. Giorgio Behr
 Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), Dr.
 Konstantin Sauer, Jürgen Holeksa, Michael Hankel, Wilhelm Rehm, Rolf Lutz

 Sitz/Headquarters: Friedrichshafen
 Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the
 municipal court of Ulm HRB 630206





Re: Scaling images

2014-02-24 Thread Luis Bernardo
Yes, that is the best approach. You can even check now that a percentage
for the height attribute in the external-graphic element works since the
height of the containing block is being explicitly set.


On Mon, Feb 24, 2014 at 2:25 PM, markus.sticker.e...@zf.com wrote:

  Ok should I use something like this?

   fo:block-container width=100mm height=150mm border=solid solid
 solid solid border-color=pink background-color=violet 

 fo:block id=id1049528 border=solid solid solid solid
 border-color=red background-color=blue

   fo:external-graphic
 src=url(file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.jpg)
 content-height=scale-to-fit scaling=uniform/

 /fo:block

   /fo:block-container



 *Von:* Luis Bernardo [mailto:lmpmberna...@gmail.com]
 *Gesendet:* Montag, 24. Februar 2014 14:33
 *An:* fop-users@xmlgraphics.apache.org
 *Betreff:* Re: Scaling images



 I think the issue is height=100%, which doesn't work the way you
 probably expect... When you specify 100%, you want 100% of what? Width does
 not suffer from the same problem because the width is constrained by the
 page width. Since the height is not constrained by the page height, as you
 maybe expected, then you get the  behavior you noticed.



 From the spec for height:



 percentage

 Specifies a percentage height. The percentage is calculated with respect
 to the height of the

 generated box's containing block. If the height of the containing block is
 not specified explicitly

 (i.e., it depends on content height), the value is interpreted like auto.



 So that's what you get, i.e., you get auto.



 On Mon, Feb 24, 2014 at 1:09 PM, markus.sticker.e...@zf.com wrote:

 Hello FOP,



 I've got an issue about scalling images.

 The target is to scale images so they fit to the space on the page.

 Scaling the width works fine.

 I set this (breit.png is a picture with extreme width):

 fo:external-graphic src=url(
 file:///c:/temp/SernaPlugin/Source/draft/draft/breit.png)
 content-width=scale-to-fit  width=100% height=100%
 inline-progression-dimension.maximum=100%
 inline-progression-dimension.minimum=1%  scaling=uniform /



 So I tried this (hoch.png is a picture with extreme height) :

 fo:external-graphic src=url(
 file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.png)
 content-height=scale-to-fit width=100% height=100%
 inline-progression-dimension.maximum=100%
 inline-progression-dimension.minimum=1%  scaling=uniform/

 à That failed à The image was not scaled.



 So what's wrong ?



 Thanks and
 Kind regards

 Markus Sticker
 Forschung und Entwicklung ZF Konzern/Research and Development ZF Group
 Infrastruktur/Infrastructure (DTEP4)

 *ZF **Friedrichshafen AG*
 88038 Friedrichshafen, Deutschland/Germany
 Telefon/Phone  +49 7541 77-7644, Telefax/Fax  +49 7541 77-907644
 *markus.sticker.e...@zf.com markus.sticker.e...@zf.com*


 Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof.
 Dr. Giorgio Behr
 Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), Dr.
 Konstantin Sauer, Jürgen Holeksa, Michael Hankel, Wilhelm Rehm, Rolf Lutz

 Sitz/Headquarters: Friedrichshafen
 Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the
 municipal court of Ulm HRB 630206







Re: Scaling images

2014-02-25 Thread Luis Bernardo
Add the height attribute to the external-graphic element. Now, I was
expecting that height=100% would work in this case but it doesn't seem to
be the case so either there is a bug in the code or in my understanding.
But if you specify an absolute value, say height=150mm, then it works.


On Mon, Feb 24, 2014 at 2:54 PM, markus.sticker.e...@zf.com wrote:

  But it fails also.

 Is there really a support of content-height=scale-to-fit?



 *Von:* Luis Bernardo [mailto:lmpmberna...@gmail.com]
 *Gesendet:* Montag, 24. Februar 2014 15:46

 *An:* fop-users@xmlgraphics.apache.org
 *Betreff:* Re: Scaling images



 Yes, that is the best approach. You can even check now that a percentage
 for the height attribute in the external-graphic element works since the
 height of the containing block is being explicitly set.



 On Mon, Feb 24, 2014 at 2:25 PM, markus.sticker.e...@zf.com wrote:

 Ok should I use something like this?

   fo:block-container width=100mm height=150mm border=solid solid
 solid solid border-color=pink background-color=violet 

 fo:block id=id1049528 border=solid solid solid solid
 border-color=red background-color=blue

   fo:external-graphic src=url(
 file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.jpg)
 content-height=scale-to-fit scaling=uniform/

 /fo:block

   /fo:block-container



 *Von:* Luis Bernardo [mailto:lmpmberna...@gmail.com]
 *Gesendet:* Montag, 24. Februar 2014 14:33
 *An:* fop-users@xmlgraphics.apache.org
 *Betreff:* Re: Scaling images



 I think the issue is height=100%, which doesn't work the way you
 probably expect... When you specify 100%, you want 100% of what? Width does
 not suffer from the same problem because the width is constrained by the
 page width. Since the height is not constrained by the page height, as you
 maybe expected, then you get the  behavior you noticed.



 From the spec for height:



 percentage

 Specifies a percentage height. The percentage is calculated with respect
 to the height of the

 generated box's containing block. If the height of the containing block is
 not specified explicitly

 (i.e., it depends on content height), the value is interpreted like auto.



 So that's what you get, i.e., you get auto.



 On Mon, Feb 24, 2014 at 1:09 PM, markus.sticker.e...@zf.com wrote:

 Hello FOP,



 I've got an issue about scalling images.

 The target is to scale images so they fit to the space on the page.

 Scaling the width works fine.

 I set this (breit.png is a picture with extreme width):

 fo:external-graphic src=url(
 file:///c:/temp/SernaPlugin/Source/draft/draft/breit.png)
 content-width=scale-to-fit  width=100% height=100%
 inline-progression-dimension.maximum=100%
 inline-progression-dimension.minimum=1%  scaling=uniform /



 So I tried this (hoch.png is a picture with extreme height) :

 fo:external-graphic src=url(
 file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.png)
 content-height=scale-to-fit width=100% height=100%
 inline-progression-dimension.maximum=100%
 inline-progression-dimension.minimum=1%  scaling=uniform/

 à That failed à The image was not scaled.



 So what's wrong ?



 Thanks and
 Kind regards

 Markus Sticker
 Forschung und Entwicklung ZF Konzern/Research and Development ZF Group
 Infrastruktur/Infrastructure (DTEP4)

 *ZF **Friedrichshafen AG*
 88038 Friedrichshafen, Deutschland/Germany
 Telefon/Phone  +49 7541 77-7644, Telefax/Fax  +49 7541 77-907644
 *markus.sticker.e...@zf.com markus.sticker.e...@zf.com*


 Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof.
 Dr. Giorgio Behr
 Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), Dr.
 Konstantin Sauer, Jürgen Holeksa, Michael Hankel, Wilhelm Rehm, Rolf Lutz

 Sitz/Headquarters: Friedrichshafen
 Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the
 municipal court of Ulm HRB 630206









Re: AW: Scaling images

2014-02-25 Thread Luis Bernardo


For you specifying an absolute height in the block-container or in the 
external-graphic should be the same (in terms of complexity). So I don't 
see the need for a workaround. But I will confirm whether the fact that 
content-height does not seem to take the height from the block-container 
is a bug, and then I will create a Jira ticket if needed.


On 2/25/14, 2:18 PM, markus.sticker.e...@zf.com wrote:


Ok. But scaling has in our case to be dynamic.

So I even can calulate the maximum availiable space.

Will there be a bug created in the Jira?

What I mean is, will it be fixed by the apache team or
should I build a workaround?

*Von:*Luis Bernardo [mailto:lmpmberna...@gmail.com]
*Gesendet:* Dienstag, 25. Februar 2014 14:05
*An:* fop-users@xmlgraphics.apache.org
*Betreff:* Re: Scaling images

Add the height attribute to the external-graphic element. Now, I was 
expecting that height=100% would work in this case but it doesn't 
seem to be the case so either there is a bug in the code or in my 
understanding. But if you specify an absolute value, say 
height=150mm, then it works.


On Mon, Feb 24, 2014 at 2:54 PM, markus.sticker.e...@zf.com 
mailto:markus.sticker.e...@zf.com wrote:


But it fails also.

Is there really a support of content-height=scale-to-fit?

*Von:*Luis Bernardo [mailto:lmpmberna...@gmail.com 
mailto:lmpmberna...@gmail.com]

*Gesendet:* Montag, 24. Februar 2014 15:46


*An:* fop-users@xmlgraphics.apache.org 
mailto:fop-users@xmlgraphics.apache.org

*Betreff:* Re: Scaling images

Yes, that is the best approach. You can even check now that a 
percentage for the height attribute in the external-graphic element 
works since the height of the containing block is being explicitly set.


On Mon, Feb 24, 2014 at 2:25 PM, markus.sticker.e...@zf.com 
mailto:markus.sticker.e...@zf.com wrote:


Ok should I use something like this?

fo:block-container width=100mm height=150mm border=solid solid 
solid solid border-color=pink background-color=violet 


fo:block id=id1049528 border=solid solid solid solid 
border-color=red background-color=blue


fo:external-graphic 
src=url(file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.jpg 
file:///c:%5Ctemp%5CSernaPlugin%5CSource%5Cdraft%5Cdraft%5Choch.jpg) content-height=scale-to-fit 
scaling=uniform/


/fo:block

/fo:block-container

*Von:*Luis Bernardo [mailto:lmpmberna...@gmail.com 
mailto:lmpmberna...@gmail.com]

*Gesendet:* Montag, 24. Februar 2014 14:33
*An:* fop-users@xmlgraphics.apache.org 
mailto:fop-users@xmlgraphics.apache.org

*Betreff:* Re: Scaling images

I think the issue is height=100%, which doesn't work the way you 
probably expect... When you specify 100%, you want 100% of what? Width 
does not suffer from the same problem because the width is 
constrained by the page width. Since the height is not constrained by 
the page height, as you maybe expected, then you get the  behavior you 
noticed.


From the spec for height:

percentage

Specifies a percentage height. The percentage is calculated with 
respect to the height of the


generated box's containing block. If the height of the containing 
block is not specified explicitly


(i.e., it depends on content height), the value is interpreted like 
auto.


So that's what you get, i.e., you get auto.

On Mon, Feb 24, 2014 at 1:09 PM, markus.sticker.e...@zf.com 
mailto:markus.sticker.e...@zf.com wrote:


Hello FOP,

I've got an issue about scalling images.

The target is to scale images so they fit to the space on the page.

Scaling the width works fine.

I set this (breit.png is a picture with extreme width):

fo:external-graphic 
src=url(file:///c:/temp/SernaPlugin/Source/draft/draft/breit.png 
file:///c:%5Ctemp%5CSernaPlugin%5CSource%5Cdraft%5Cdraft%5Cbreit.png) 
content-width=scale-to-fit width=100% height=100% 
inline-progression-dimension.maximum=100% 
inline-progression-dimension.minimum=1% scaling=uniform /


So I tried this (hoch.png is a picture with extreme height) :

fo:external-graphic 
src=url(file:///c:/temp/SernaPlugin/Source/draft/draft/hoch.png 
file:///c:%5Ctemp%5CSernaPlugin%5CSource%5Cdraft%5Cdraft%5Choch.png) content-height=scale-to-fit 
width=100% height=100% inline-progression-dimension.maximum=100% 
inline-progression-dimension.minimum=1% scaling=uniform/


àThat failed àThe image was not scaled.

So what's wrong ?

Thanks and
Kind regards

Markus Sticker
Forschung und Entwicklung ZF Konzern/Research and Development ZF Group
Infrastruktur/Infrastructure (DTEP4)

*ZF **Friedrichshafen AG*
88038 Friedrichshafen, Deutschland/Germany
Telefon/Phone +49 7541 77-7644 tel:%2B49%207541%2077-7644, 
Telefax/Fax +49 7541 77-907644 tel:%2B49%207541%2077-907644

_markus.sticker.e...@zf.com mailto:markus.sticker.e...@zf.com_


Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: 
Prof. Dr. Giorgio Behr
Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), 
Dr. Konstantin Sauer, Jürgen Holeksa, Michael Hankel, Wilhelm Rehm, 
Rolf Lutz

Re: FOP 1.0 Linux Arial not working

2014-02-26 Thread Luis Bernardo
Is the font configured under the renderer element of the format you want to
produce?


On Wed, Feb 26, 2014 at 3:32 PM, Eric Lehmann e.lehman...@gmail.com wrote:

 Hi

 I want to use Arial in my xsl stylesheet but there are several problems.

 FOP Version: Fop 1.0
 OS : SLES 11 SP2

 First I get the arial.ttf from a windows client.
 Generate the metrics file with:
  java -cp
 build/fop.jar:lib/avalon-framework-4.2.0.jar:lib/commons-logging-1.0.4.jar:lib/commons-io-1.3.1.jar:lib/xmlgraphics-commons-1.5.jar
 org.apache.fop.fonts.apps.TTFReader /opt/fop/fonts/arial.ttf arial.xml

 To there everythings is ok

 Then I add to config.xml:
  fonts
 !-- arial --
 font metrics-url=/opt/fop/fonts/arial.xml kerning=yes
 embed-url=/opt/fop/fonts/arial.ttf
   font-triplet name=Arial style=normal weight=normal/
 /font
   /fonts

 And run fop with:
 /opt/fop/fop.sh -c /opt/fop/conf/config.xml -d  -fo /tmp/test.fo -pdf
 /tmp/test.pdf

 Which gives me such output:
 WARNING: Font Arial,normal,400 not found. Substituting with
 any,normal,400.

 Where is my fautl??

 THX a lot and regards from Germany.





Re: How to Disable schema validation in FOP 1.1 (as in FOP 0.20.5)

2014-03-13 Thread Luis Bernardo
In general setting strict validation to false or passing the -r switch in
the command line should do the trick. Can you send your example?


On Thu, Mar 13, 2014 at 11:54 AM, zeroxff francesco.fiorava...@eng.itwrote:

 Hello,

 Is it possible to convert FO file to PDF without validating FO? I've a set
 of old .fo files which can be processed and converted to PDF by FOP 0.20.5.

 Those files violate the (unofficial) FO XSD but the old release of Apache
 FOP ignores this and produces a PDF file.

 I've tried to disable the strict validation in Apache FOP 1 (via
 fopFactory.setStrictValidation(false)) but i've got no result.

 Is there any way to disable validation, as a backward compatibility measure
 with FOP 0.20.5?

 Examples of XSD violations (ignored by FOP 0.20.5)


 Here, fo:region-body, according to xsd, must be in first position but is
 not
 mandatory according to w3c


 Here, fo:external-graphic, according to xsd,  must be enclosed in a
 fo:block.../fo:block element

 Thanks in advance.
 ff




 --
 View this message in context:
 http://apache-fop.1065347.n5.nabble.com/How-to-Disable-schema-validation-in-FOP-1-1-as-in-FOP-0-20-5-tp40222.html
 Sent from the FOP - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: How to Disable schema validation in FOP 1.1 (as in FOP 0.20.5)

2014-03-13 Thread Luis Bernardo


OK, setting strict validation to false relaxes strict validation but it 
doesn't mean that it is totally lax or just bypassed. It turns out that 
relaxed validation doesn't forgive your first example An example 
that would pass would be placing an fo:table-footer element after a 
fo:table-body.


On 3/13/14, 2:27 PM, zeroxff wrote:

Hello again,

i enclose the examples in plain text:
Examples of XSD violations (ignored by FOP 0.20.5)

fo:simple-page-master margin-right=7mm margin-left=7mm 
margin-bottom=7mm margin-top=7mm page-height=297mm 
page-width=210mm master-name=A4

   fo:region-before extent=240mm region-name=xsl-region-before/
   fo:region-after extent=20mm/
   fo:region-body margin-bottom=30.0mm margin-top=70mm/
/fo:simple-page-master

Here, fo:region-body, according to xsd, must be in first position but 
is not mandatory according to w3c


fo:table-cell border-width=0.1mm border-before-style=solid 
border-left-style=solid space-before=13mm column-number=1
   fo:external-graphic scaling-method=integer-pixels height=58px 
width=245px src=file:logo.gif/

/fo:table-cell

Here, fo:external-graphic, according to xsd,  must be enclosed in a 
fo:block.../fo:block element


sorry for the inconvenience.
ff


2014-03-13 15:12 GMT+01:00 Luis Bernardo [via Apache FOP] [hidden 
email] /user/SendEmail.jtp?type=nodenode=40226i=0:


In general setting strict validation to false or passing the -r
switch in the command line should do the trick. Can you send your
example?


On Thu, Mar 13, 2014 at 11:54 AM, zeroxff [hidden email]
http://user/SendEmail.jtp?type=nodenode=40224i=0 wrote:

Hello,

Is it possible to convert FO file to PDF without validating
FO? I've a set
of old .fo files which can be processed and converted to PDF
by FOP 0.20.5.

Those files violate the (unofficial) FO XSD but the old
release of Apache
FOP ignores this and produces a PDF file.

I've tried to disable the strict validation in Apache FOP 1 (via
fopFactory.setStrictValidation(false)) but i've got no result.

Is there any way to disable validation, as a backward
compatibility measure
with FOP 0.20.5?

Examples of XSD violations (ignored by FOP 0.20.5)


Here, fo:region-body, according to xsd, must be in first
position but is not
mandatory according to w3c


Here, fo:external-graphic, according to xsd,  must be enclosed
in a
fo:block.../fo:block element

Thanks in advance.
ff




--
View this message in context:

http://apache-fop.1065347.n5.nabble.com/How-to-Disable-schema-validation-in-FOP-1-1-as-in-FOP-0-20-5-tp40222.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=40224i=1
For additional commands, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=40224i=2





If you reply to this email, your message will be added to the
discussion below:

http://apache-fop.1065347.n5.nabble.com/How-to-Disable-schema-validation-in-FOP-1-1-as-in-FOP-0-20-5-tp40222p40224.html

To unsubscribe from How to Disable schema validation in FOP 1.1
(as in FOP 0.20.5), click here.
NAML

http://apache-fop.1065347.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
*Francesco Fioravanti*
Direzione PAL - Area Document Management

*Engineering Ingegneria Informatica spa*
Galleria del Leone, 3 - 40100 Bologna
www.eng.it http://www.eng.it
c/o
*Regione Emilia-Romagna - PARER*
Viale Aldo Moro, 64 - 40100 Bologna
tel 051 527 8069


View this message in context: Re: How to Disable schema validation in 
FOP 1.1 (as in FOP 0.20.5) 
http://apache-fop.1065347.n5.nabble.com/How-to-Disable-schema-validation-in-FOP-1-1-as-in-FOP-0-20-5-tp40222p40226.html
Sent from the FOP - Users mailing list archive 
http://apache-fop.1065347.n5.nabble.com/FOP-Users-f3.html at Nabble.com.




Re: Problems with PostScript and AFP output

2014-03-17 Thread Luis Bernardo


There are no images embedded in the PostScript file you sent. Either you 
got an error during generation or we need the sources to see what the 
issue is.



On 3/17/14, 9:34 PM, Gonzalo Vasquez wrote:

Dear FOP Team,

We are currently trying to get the same output from a single FO file. 
Our PDF document is our model to follow, but both the PostScript and 
AFP outputs are having some issues:


- PostScript: images aren't getting rendered
- AFP: Text fields are getting a wrong overlay over them

Please see attached files for example.

Testing is done both in Windows (2012 R2)  Linux (Xubuntu / Wheezy 
kernel 3.11.0-18), with Apache FOP from the trunk (about 1 month ago).



Any help would be appreciated.

Regards,
Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl mailto:gvasq...@altiuz.cl
http://www.altiuz.cl
http://www.altiuzreports.com
	https://www.facebook.com/altiuz http://twitter.com/altiuz 
http://www.linkedin.com/company/altiuz














Re: Problems with PostScript and AFP output

2014-03-18 Thread Luis Bernardo


The problem must be with the extension. Can you provide an example where 
the image data is in a instream-foreign-object element (instead of 
relying on extension to do that)? Then it will be a lot simpler to 
explain what the problem is.


On 3/18/14, 2:57 PM, Gonzalo Vasquez wrote:

Dear Luis,

Images / barcodes are inserted in the xsl-fo using an extension we 
designed to allow caching and embedding them as base64 data. Perhaps 
the PostScript output is not extension compatible?


Please see attached fo file, and image extension + java sources.

Regards,
Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl mailto:gvasq...@altiuz.cl
http://www.altiuz.cl
http://www.altiuzreports.com
	https://www.facebook.com/altiuz http://twitter.com/altiuz 
http://www.linkedin.com/company/altiuz





El 17-03-2014, a las 20:07, Luis Bernardo lmpmberna...@gmail.com 
mailto:lmpmberna...@gmail.com escribió:




There are no images embedded in the PostScript file you sent. Either 
you got an error during generation or we need the sources to see what 
the issue is.



On 3/17/14, 9:34 PM, Gonzalo Vasquez wrote:

Dear FOP Team,

We are currently trying to get the same output from a single FO 
file. Our PDF document is our model to follow, but both the 
PostScript and AFP outputs are having some issues:


- PostScript: images aren't getting rendered
- AFP: Text fields are getting a wrong overlay over them

Please see attached files for example.

Testing is done both in Windows (2012 R2)  Linux (Xubuntu / Wheezy 
kernel 3.11.0-18), with Apache FOP from the trunk (about 1 month ago).



Any help would be appreciated.

Regards,
Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl mailto:gvasq...@altiuz.cl
http://www.altiuz.cl http://www.altiuz.cl/
http://www.altiuzreports.com http://www.altiuzreports.com/
	https://www.facebook.com/altiuz http://twitter.com/altiuz 
http://www.linkedin.com/company/altiuz








=










Re: Missing images in PostScript output

2014-03-18 Thread Luis Bernardo


Support is better now than when that was written. Pretty much everything 
that works in PDF works in PostScript now with some minor limitations.


When that was written SVG gradients were not supported in PostScript. 
That has changed and the most common gradients are supported now. 
Transparency is problematic in general but even then the output now is 
pretty close to the PDF output.


See https://issues.apache.org/jira/browse/FOP-2313 for some examples.

On 3/18/14, 5:02 PM, Gonzalo Vasquez wrote:
Checking FOP Documentation 
(https://xmlgraphics.apache.org/fop/1.0/output.html 
https://app.getsignals.com/link?url=https%3A%2F%2Fxmlgraphics.apache.org%2Ffop%2F1.0%2Foutput.htmlukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgIKG17MKDAk=F3809B35-9459-4744-938F-C66DD13D7EAB), 
under the PostScript section I see:



  Limitations

 *

Images and SVG may not be displayed correctly. SVG support is far
from being complete. No image transparency is available.

Can anyone provide a list of actually supported image formats for 
PostScript output?


Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (RD)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
gvasq...@altiuz.cl mailto:gvasq...@altiuz.cl
http://www.altiuz.cl 
https://app.getsignals.com/link?url=http%3A%2F%2Fwww.altiuz.clukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgIKG17MKDAk=F29ABEC3-0BC4-43AE-9917-5D96550826D0
http://www.altiuzreports.com 
https://app.getsignals.com/link?url=http%3A%2F%2Fwww.altiuzreports.comukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgIKG17MKDAk=443BAE9C-EC3C-4E1B-9624-29374B231322


https://app.getsignals.com/link?url=https%3A%2F%2Fwww.facebook.com%2Faltiuzukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgIKG17MKDAk=EB2337CB-8432-4DA4-8DE5-BABAC6B73C09
 
https://app.getsignals.com/link?url=http%3A%2F%2Ftwitter.com%2Faltiuzukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgIKG17MKDAk=2880CE40-070F-4B29-8EAE-DA375A6AB613
 
https://app.getsignals.com/link?url=http%3A%2F%2Fwww.linkedin.com%2Fcompany%2Faltiuzukey=agxzfnNpZ25hbHNjcnhyGAsSC1VzZXJQcm9maWxlGICAgIKG17MKDAk=D7EAF95A-7AE1-4C8D-9AE5-3C395A326CC6









Re: why the xml and xsl files have to be in the bin folder of tomcat when I generate a application web for that the application works?

2014-03-26 Thread Luis Bernardo


See http://xmlgraphics.apache.org/fop/trunk/servlets.html.

With the example servlet provided by FOP you need to specify the full 
path of your files (that is /path/to/my/file.fo).


On 3/26/14, 9:02 PM, edi4988 wrote:

Hi everyone,

why the xml and xsl files have to be in the bin folder of tomcat when I
generate a application web for that the application works?

I have a web application to create rtf and pdf files with a Servlet. I need
to have my xml file and xsl file in in the bin folder of tomcat to that my
application works, but if I have the files in other different folder the
application dosen't work.

I use the example on this page :
http://svn.apache.org/viewvc/xmlgraphics/fop/tags/fop-1_1/src/java/org/apache/fop/servlet/FopServlet.java?view=log

what can i do for that  the xml and xsl files can to be in other folder
different to bin?

By example in a folder from my web application.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/why-the-xml-and-xsl-files-have-to-be-in-the-bin-folder-of-tomcat-when-I-generate-a-application-web-f-tp40348.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: why the xml and xsl files have to be in the bin folder of tomcat when I generate a application web for that the application works?

2014-04-03 Thread Luis Bernardo


As explained in http://xmlgraphics.apache.org/fop/trunk/servlets.html, 
if you use the sample servlet then you should access it as in


 *

   
http://localhost:8080/fop/fop?xml=/home/path/to/xmlfile.xmlxsl=/home/path/to/xslfile.xsl

Are you doing that? Can you provide the URL you use?

On 4/3/14, 10:13 PM, edi4988 wrote:
I have my xslt and xml files in my Tomcat Server, but when I try to 
use this files  by example in the path 
http://localhost:8080/XML/SIICG.xml  the application doesn't work. But 
if I have the files by example in c:/xml/SIICG.xml the application 
works fine.


Do you know any idea what am i doing wrong?

I use the example on this page :
http://svn.apache.org/viewvc/xmlgraphics/fop/tags/fop-1_1/src/java/org/apache/fop/servlet/FopServlet.java?view=log

Thanx


2014-04-03 12:00 GMT-06:00 rsargent [via Apache FOP] [hidden email] 
/user/SendEmail.jtp?type=nodenode=40425i=0:


Move them to the app root?

On 04/03/2014 11:57 AM, edi4988 wrote:

Do you know what can I do if my files have this path
http://localhost:8080/XML/SIICG.xml
  ?

Thanx



--
View this message in 
context:http://apache-fop.1065347.n5.nabble.com/why-the-xml-and-xsl-files-have-to-be-in-the-bin-folder-of-tomcat-when-I-generate-a-application-web-f-tp40348p40422.html
Sent from the FOP - Users mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=40423i=0 For
additional commands, e-mail: [hidden email]
http://user/SendEmail.jtp?type=nodenode=40423i=1





If you reply to this email, your message will be added to the
discussion below:

http://apache-fop.1065347.n5.nabble.com/why-the-xml-and-xsl-files-have-to-be-in-the-bin-folder-of-tomcat-when-I-generate-a-application-web-f-tp40348p40423.html

To unsubscribe from why the xml and xsl files have to be in the
bin folder of tomcat when I generate a application web for that
the application works?, click here.
NAML

http://apache-fop.1065347.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





View this message in context: Re: why the xml and xsl files have to be 
in the bin folder of tomcat when I generate a application web for that 
the application works? 
http://apache-fop.1065347.n5.nabble.com/why-the-xml-and-xsl-files-have-to-be-in-the-bin-folder-of-tomcat-when-I-generate-a-application-web-f-tp40348p40425.html
Sent from the FOP - Users mailing list archive 
http://apache-fop.1065347.n5.nabble.com/FOP-Users-f3.html at Nabble.com.




Re: Greek Characters in Postscript Output

2014-05-16 Thread Luis Bernardo


You can use TrueType fonts with PostScript. Things changed a lot since 
0.20.5


On 5/16/14, 12:17 PM, Normen wrote:

Hello User Group,

we are currently in the process of porting our 0.20.5 FOP embed up to a more
actual version 1.0/1.1 and wanted to aim for Postscript Output (currently we
use the Java Renderer to print).

So before we used TrueTpe Fonts enabling us to use i.e. alpha and omega
characters in one standard font, i.e. Arial.

Now with postscript, as far as i understand it, we can only use single-byte
character encoded fonts, so we have a massively limited array of characters
in comparison to True Type fonts.

Do you have any solution to such a problem? We need to use Arial (could
substitute with Base-14 Helvetica) and Verdana (or a lookalike).

How would we achieve a font enabling these special characters?

Thank you a lot in advance for any clues ou could give me.

Best Regards

Normen



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Greek-Characters-in-Postscript-Output-tp40610.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Changing the log level

2014-06-05 Thread Luis Bernardo


See http://wiki.apache.org/xmlgraphics-fop/HowTo/SetupJDK14Logging and 
also take a look at the bottom of the fop script.


But pretty much, a logging.properties file like this:

handlers= java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = 
java.util.logging.SimpleFormatter

#.level= INFO
.level= WARNING

Followed by
export LOGLEVEL=-Djava.util.logging.config.file=/path/to/logging.properties
is all you need. LOGLEVEL will then be picked up by the fop script.

On 6/5/14, 12:16 PM, Andrew McFarland Campbell wrote:

Hi,
I'm running FOP as part of the PDF2 plugin in the DITA-OT, version 1.8.
At the moment, I'm getting INFO-level messages to STDOUT. How do I 
change the log level so I only get WARNING and above?

The version of FOP seems to be 1.1
Thanks,
Andrew



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Changing the log level

2014-06-06 Thread Luis Bernardo


At most that will impact the logging, not the FOP output. I cannot 
reproduce the issue so I don't know what causes that. If you can 
reproduce the issue when you run just FOP from the command line (i.e.: 
fop -c fop.xconf -fo input.fo -pdf output.pdf) then send your 
logging.properties file and we can investigate.


On 6/6/14, 9:22 AM, Andrew McFarland Campbell wrote:

Thanks - that worked! I'm now getting the log info I want to see.
Because I'm working with the DITA-OT, I ended up updating the ANT_OPTS 
environment variable to have 
-Djava.util.logging.config.file=C:/Dev/FOP/logging.properties in it.
There is one thing that concerns me slightly. When I build the 
document, I get this message to STDOUT:


[fop] Can't set level for java.util.logging.ConsoleHandler

Is this something I should worry about? And how do I fix this?


On 6 June 2014 00:35, Luis Bernardo lmpmberna...@gmail.com 
mailto:lmpmberna...@gmail.com wrote:



See http://wiki.apache.org/xmlgraphics-fop/HowTo/SetupJDK14Logging
and also take a look at the bottom of the fop script.

But pretty much, a logging.properties file like this:

handlers= java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter
#.level= INFO
.level= WARNING

Followed by
export
LOGLEVEL=-Djava.util.logging.config.file=/path/to/logging.properties
is all you need. LOGLEVEL will then be picked up by the fop script.


On 6/5/14, 12:16 PM, Andrew McFarland Campbell wrote:

Hi,
I'm running FOP as part of the PDF2 plugin in the DITA-OT,
version 1.8.
At the moment, I'm getting INFO-level messages to STDOUT. How
do I change the log level so I only get WARNING and above?
The version of FOP seems to be 1.1
Thanks,
Andrew



-
To unsubscribe, e-mail:
fop-users-unsubscr...@xmlgraphics.apache.org
mailto:fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail:
fop-users-h...@xmlgraphics.apache.org
mailto:fop-users-h...@xmlgraphics.apache.org






Re: Issue with large words in the text block

2014-06-13 Thread Luis Bernardo


Use hyphenation: 
http://xmlgraphics.apache.org/fop/1.1/hyphenation.html#support


On 6/12/14, 2:53 PM, byasoraama wrote:

I am new user to FOP...

I have an fo:block element in fo:table-cell which is in fo:table-row of a
fo:table. This table has 6 columns,  obviously column width is small. Now,
when a *Word* in the block is larger than the block it is overlapping the
next block. Give me some attribute value or any other solution so that the
bigger word breaks into the new line...Thanks in advance

the part of My fo file XML is :

fo:table-row
  fo:table-cell border-style=solid  border-width=0.1mm
  fo:block text-align=center font-size=10pt
margin=0pt7:12/fo:block
  /fo:table-cell
/fo:table-row



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Issue-with-large-words-in-the-text-block-tp40773.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: [PDF Renderer] Why FOP scales down 300 dpi images and not maintain the intrinsic image dimension?

2014-06-17 Thread Luis Bernardo
FOP does not implicitly assume that the pixel size is 72 dpi. FOP uses the
pixel size (resolution) specified in the image. Since you are using JPEG
and the resolution may be specified in the EXIF segment make sure you use
trunk, not 1.1. If the image has no resolution (or the resolution is in the
EXIF segment and you are using 1.1) then FOP defaults to 72dpi. You can
change that specifying a different value in the source-resolution /
element in the conf file.



On Tue, Jun 17, 2014 at 9:46 AM, Dridi Seifeddine sdr...@iptech-group.com
wrote:

 Hello,



  Is that what you were trying to achieve?



 No. I want to leave the image as it is and prevent FOP from scaling up or
 down. Using this:

 fo:external-graphic src=300dpi.jpg width=”1919px” height=”1272px” 
 content-width=scale-to-fit content-height=scale-to-fit/



 FOP implicitly assumes that the image’s DPI is 72, so when calculating the
 mpt size we get (1919000, 1272000), and the image is rendered with no
 scaling applied.



 My question is: Is there any way to override the image’s DPI in FOP using
 the config?



 Thanks



 Seifeddine









Re: config: interaction between font substitutions and embed-url

2014-07-16 Thread Luis Bernardo
Are you sure the fonts are found the second time, or you just say that
because the message is not repeated? Font setup may be just happening once
and then reused.


On Wed, Jul 16, 2014 at 4:12 AM, Jason Harrop jhar...@gmail.com wrote:

 Hi all, I'm seeing something which seems a little strange to me..

 With the fop config below, the first time it is set (via
 fop.apps.FopConfParser, using March 19 2014 code) , it seems unable to
 use the destination fonts:-

 ERROR org.apache.fop.fonts.substitute.FontSubstitutions
 .adjustFontInfo line 53 - Unable to match font substitution for
 destination qualifier font-family=[Calibri], font-style=[italic],
 font-weight=[bold]

 ERROR org.apache.fop.fonts.substitute.FontSubstitutions
 .adjustFontInfo line 53 - Unable to match font substitution for
 destination qualifier font-family=[Times New Roman],
 font-style=[normal], font-weight=[400]

 However, if I use the config again in the same thread, well, the
 second time, the fonts are found and those error messages aren't
 emitted.

 I observe the same behaviour using FOP 1.1 (FopFactory).

 thoughts?  thanks .. Jason


 fop version=1.0

   strict-configurationtrue/strict-configuration

   fonts

 substitutions

   substitution

 from font-family=ZapfDingbats font-style=normal
 font-weight=700/

 to font-family=Calibri font-weight=bold font-style=italic/

   /substitution

   substitution

 from font-family=Calibri font-style=normal font-weight=400/

 to font-family=Times New Roman font-weight=400
 font-style=normal/

   /substitution

 /substitutions

   /fonts

   renderers

 renderer mime=application/pdf

   fonts

 font embed-url=file:/C:/Windows/FONTS/times.ttf

   font-triplet name=Times New Roman style=normal
 weight=normal/

 /font

 font embed-url=file:/C:/Windows/FONTS/timesbd.ttf

   font-triplet name=Times New Roman style=normal
 weight=bold/

 /font

 font embed-url=file:/C:/Windows/FONTS/timesbi.ttf

   font-triplet name=Times New Roman style=italic
 weight=bold/

 /font

 font embed-url=file:/C:/Windows/FONTS/timesi.ttf

   font-triplet name=Times New Roman style=italic
 weight=normal/

 /font

 font embed-url=file:/C:/Windows/FONTS/calibri.ttf

   font-triplet name=Calibri style=normal weight=normal/

 /font

 font embed-url=file:/C:/Windows/FONTS/calibrib.ttf

   font-triplet name=Calibri style=normal weight=bold/

 /font

 font embed-url=file:/C:/Windows/FONTS/calibriz.ttf

   font-triplet name=Calibri style=italic weight=bold/

 /font

 font embed-url=file:/C:/Windows/FONTS/calibrii.ttf

   font-triplet name=Calibri style=italic weight=normal/

 /font

   /fonts

 /renderer

   /renderers

 /fop

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Formating issue with fop

2014-08-11 Thread Luis Bernardo
That file is truncated. Can you provide another copy? But the message means
that for a given row you added more columns (fo;table-cell) than the number
you specified before in fo:table-columns.


On Mon, Aug 11, 2014 at 7:49 AM, rushabh rushabh.ajm...@igate.com wrote:

 Hi,

 I have been using apache fop 1.0

 I am facing this issue of formating with two-three reports . But i am not
 able to resolve the issue . here i have attched one fo document. Please can
 you suggest me how to resolve such isssue.


 error :- The column-number or number of cells in the row overflows the
 number of fo:table-columns specified for the table. (See position -1:-1)

 report_1407733383988.fo
 
 http://apache-fop.1065347.n5.nabble.com/file/n41053/report_1407733383988.fo
 



 --
 View this message in context:
 http://apache-fop.1065347.n5.nabble.com/Formating-issue-with-fop-tp41053.html
 Sent from the FOP - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: How to config font in FOP 1.1

2014-10-02 Thread Luis Bernardo


Since you only use one font-family in the document and applies to the 
full content of the document you don't need to configure any font 
substitution. Just configure the font you use. Also, don't use the 
metrics-url. Are you running from the command line?


On 10/2/14, 1:06 PM, tranhsv wrote:

Dear the members of Apache Software Foundation !
I have 2 questions  with FOP 1.1.
1) The first question is about font configuration in FOP .
I'm using FOP 1.1. After I have converted a fo file to pdf by FOP 1.1
library , I have received the following warning messages.

2014-10-02 18:17:20,712 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x3064, 
tuhiragana) not available in font Helvetica.
2014-10-02 18:17:20,712 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x304d, 
kihiragana) not available in font Helvetica.
2014-10-02 18:17:20,712 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x307e, 
mahiragana) not available in font Helvetica.
2014-10-02 18:17:20,712 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x3057, 
sihiragana) not available in font Helvetica.
2014-10-02 18:17:20,712 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x3066, 
tehiragana) not available in font Helvetica.
2014-10-02 18:17:20,712 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x306f, 
hahiragana) not available in font Helvetica.
2014-10-02 18:17:20,713 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x3001, 
ideographiccomma) not available in font Helvetica.
2014-10-02 18:17:20,713 WARN  org.apache.fop.apps.FOUserAgent  - Glyph ? (0x4e0b) not 
available in font Helvetica.

I don't know what's wrong with my fop.xconf ? I have attached my fop.xconf in 
this email. My program is using IpagStsong font.
In order to have this font , I have merged multiple font files into a font file.
I want to convert all fonts to my IpagStsong font. Because I only want to use a 
font file .
So I need re-map any font-family to IpagStsong font. What should I do in this 
case?
?xml version=1.0?
fop version=1.0
renderers
 renderer mime=application/pdf
fonts
font metrics-url=IpagStsong.xml kerning=yes 
embed-url=IpagStsong.ttf
font-triplet name=IPAGothic style=normal 
weight=normal/
font-triplet name=IPAGothic style=normal 
weight=bold/
font-triplet name=IPAGothic style=italic 
weight=normal/
/font
substitutions
  substitution
from font-family=*/
to font-family=IPAGothic/
  /substitution
/substitutions
/fonts
 /renderer
/renderers
/fop


2) In another case , if my configuration such as the following :
  ?xml version=1.0?

!-- NOTE: This is the version of the configuration --
fop version=1.0
renderers
  renderer mime=application/pdf
fonts
!--auto-detect/--
font metrics-url=IpagStsong.xml kerning=yes 
embed-url=IpagStsong.ttf
font-triplet name=IPAGothic style=normal weight=normal/
font-triplet name=IPAGothic style=normal weight=bold/
font-triplet name=IPAGothic style=italic weight=normal/
font-triplet name=sans-serif style=normal weight=normal/
font-triplet name=sans-serif style=normal weight=bold/
font-triplet name=sans-serif style=italic weight=normal/
font-triplet name=Helvetica style=normal weight=normal/
font-triplet name=Helvetica style=normal weight=bold/
font-triplet name=Helvetica style=italic weight=normal/
font-triplet name=SansSerif style=normal weight=normal/
font-triplet name=SansSerif style=normal weight=bold/
font-triplet name=SansSerif style=italic weight=normal/
font-triplet name=Times style=normal weight=normal/
font-triplet name=Times style=normal weight=bold/
font-triplet name=Times style=italic weight=normal/
font-triplet name=Times Roman, style=normal weight=normal/
font-triplet name=Times Roman, style=normal weight=bold/
font-triplet name=Times Roman, style=italic weight=normal/
font-triplet name=Times-Roman style=normal weight=normal/
font-triplet name=Times-Roman style=normal weight=bold/
font-triplet name=Times-Roman style=italic weight=normal/
font-triplet name=serif style=normal weight=normal/
font-triplet name=serif style=normal weight=bold/
font-triplet name=serif style=italic weight=normal/
font-triplet name=any style=normal weight=normal/
font-triplet name=any style=normal 

Re: Encoding problem with one specific letter and postscript

2014-10-30 Thread Luis Bernardo
I do get the behavior you describe if I use the arial font file you
provided but I get a different result if I use an arial font file from my
system. I do still get the problem with copy and paste from PDF, but all
characters are correctly displayed in the PDF (converted from PS with
ps2pdf). I suggest you try different Arial fonts since that seems to impact
the result.

On Tue, Oct 28, 2014 at 6:18 PM, Lembit Gerz lembit.g...@nortal.com wrote:

 Hi Chris

 Thank you for your reply. Unfortunately, the problem persists. I have
 attatched a minimal set of files to reproduce the problem.
 Here's what I did:
 Downloaded the trunk version and ran ant all.
 Placed the contents of fopp.zip to the fop root directory.
 Ran fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml
 Ran ps2pdf name.ps name.pdf
 I also tried with ohter fonts like Verdana and Times New Roman, but the
 two problematic letters still appear as boxes.
 If I remove the single-byte encoding, all the letters are displayed
 correctly, but then I cannot copy any of the Lithuanian letters from the
 PDF.



 Thanks,

 Lembit


 -Original Message-
 From: Chris Bowditch [mailto:bowditch_ch...@hotmail.com]
 Sent: 27. oktoober 2014. a. 18:21
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: Encoding problem with one specific letter and postscript

 Hi Lembit,

 Sorry for slow reply, I've been on holiday. You really need to add

 optimize-resourcestrue/optimize-resources

 element to your fop.xconf file in the Postscript Renderer section.
 Without that FOP can't accurately judge which characters can be subset or
 not.

 Adding encoding-mode attribute will circumvent the subset issue because it
 will embed up to 256 characters, but since you are using a wide range of
 characters that probably isn't enough.

 I also recommend testing the Trunk version if that doesn't resolve your
 issue, since a lot of bugs have been fixed since v1.1 was released.

 Thanks,

 Chris

 On 12/10/2014 20:16, Lembit Gerz wrote:
 
  Hello,
 
  I am using FOP 1.1 to generate postscript files with embedded fonts.
  Later I’m using ps2pdf to convert the postscript files to pdfs. The
  text includes Lithuanian letters.
 
  However, after coverting them to pdf, two specific letters are
  displayed as squares, all the ohter Lituhuanian letters are displayed
  correctly. The problematic letters are the upper- and lowercase
  letters ė and Ė (e with dot, 0116 and 0117 in unicode). I can copy all
  the letters from the pdf (including the two problematic ones – when
  copying the square and pasting it somewhere, it displays the letter
  correctly).
 
  I am using the standard Arial font from Windows fonts (arial.ttf).
 
  This is my fop-config.xml:
 
  configuration
 
  renderers
 
  renderer mime=application/postscript
 
  auto-rotate-landscapetrue/auto-rotate-landscape
 
 fonts
 
 font embed-url=./arial.ttf
  encoding-mode=single-byte
 
 font-triplet name=Arial style=normal
  weight=normal/
 
 /font
 
 /fonts
 
  /renderer
 
  /renderers
 
  /configuration
 
  When leaving out the encoding-mode=“single-byte“, the letters display
  correctly, but when copying from the pdf, I get gibberish.
 
  When generating straight to pdf with FOP, everything is displayed
  correctly and copying is also possible.
 
  I have tried other ps-pdf converters and they give the same result.
 
  Using a metric file did not help.
 
  The problem can be reproduced with the xml and xslt in the fop quick
  start guide (https://xmlgraphics.apache.org/fop/quickstartguide.html)
  with these modifications:
 
  Set the name in name.xml to ABC14pąęčėųūĘĖŲČĄ.
 
  Add the attribute font-familiy=“Arial“ to the fo:block in name2fo.xsl.
 
  Use the above fop-config file and include the standard Arial font in
  FOP’s directory.
 
  Run ’fop -xml name.xml -xsl name2fo.xsl -ps name.ps -c fop-config.xml’
 
  Can anyone suggest, what could be the issue or how should I go about
  debugging this?
 
  Thank You.
 
  Lembit
 


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: TIFF CMYK image with AFP

2014-12-01 Thread Luis Bernardo
Can you provide the tiff image and fop.xconf you use?

On Mon, Dec 1, 2014 at 10:56 AM, Christian Pestel 
christian.pes...@orange.fr wrote:

 Hi,

 TIFF image with CMYK color space is not well rendered in AFP.
 I think that the native TIFF codec don’t implement that :

 xmlgraphics\image\codec\tiff\TIFFImage.java
 public TIFFImage(SeekableStream stream, TIFFDecodeParam param, int
 directory)
 ...
 default: // Other including CMYK, CIE L*a*b*, unknown.
if (sampleSize % 8 == 0) {
imageType = TYPE_GENERIC;
}
 ...

 Is it possible to use a different codec that would cover this type of
 image like TwelveMonkeys imageio-tiff codec ?


 Thanks,


 Christian Pestel
 christian.pes...@orange.fr


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: SVG to PDF: rasterized image on filter effect/mask/clipping path ?

2014-12-01 Thread Luis Bernardo
Can you provide your SVG? What is the FOP transcoder version (too see that
check the Producer entry in the Properties of the generated PDF)?


On Mon, Dec 1, 2014 at 11:02 AM, cedric bompart cedric.bomp...@gmail.com
wrote:

 Hi,

 I'm currently converting a JavaFX node graph to PDF (via a SVG document).
 I'm using FOP 1.1 and Batik 1.7 on Java 7.

 I'm trying to apply filter effects to a SVG node and the result on the PDF
 output produces an ugly rasterized image on top of the affected area. I'm
 getting a similar result if I'm using a clipping path or a mask.

 Is that the intended behaviour?  The intermediate SVG document is nicely
 rendered in Inkscape, the effect/mask affects only the colour matrix.
 I'm only dealing with effects which alter the colour matrix (saturation,
 hue, brightness, etc). I'm not doing any kind of Gaussian blur which an
 image mask could be appropriate as an implementation of this effect.

 Due to this weird behaviour, for clipping a shape; I've implemented
 directly the clipping on the shape path instead of using an independent
 clipping path.

 Do I need to do the same thing for altering the colours on a shape; by
 manually doing the effect on the colour fill/stroke of a shape instead of
 using a filter effect?

 Can somebody shed some light please? :-)


 Regards,
 Ced.

 PS: I'm not sure if this is intended for FOP or Batik project but the PDF
 transcoder is in FOP...





Re: TIFF CMYK image with AFP

2014-12-02 Thread Luis Bernardo
Try with trunk now. For your image you will also need the jai_imageio.jar
for the colors to be right.

On Mon, Dec 1, 2014 at 5:00 PM, Christian Pestel christian.pes...@orange.fr
 wrote:

   Yes ! It’s work very well !  [image: Sourire]

  I look forward to your patch

 Thanks a lot, Luis.



 Christian Pestel

 christian.pes...@orange.fr cpes...@bdoc.com

  *From:* Luis Bernardo lmpmberna...@gmail.com
 *Sent:* Monday, December 01, 2014 5:31 PM
 *To:* fop-users@xmlgraphics.apache.org
 *Subject:* Re: TIFF CMYK image with AFP

  I see. I do have a patch for this, something that I fixed a while ago
 and never got around to commit (see attachment and check it is OK). I will
 try to have it applied tomorrow.

 On Mon, Dec 1, 2014 at 4:05 PM, Christian Pestel 
 christian.pes...@orange.fr wrote:
   Hi Luis,

 I join image, fo and afp files
 I use Fop Trunk version

 Fop.config :

 renderer mime=application/x-afp
 renderer-resolution300/renderer-resolution
 images mode=color cmyk=true native=false fs45=true 
  jpeg allow-embedding=false bitmap-encoding-quality=1.0/
 /images





 Christian Pestel

 christian.pes...@orange.fr cpes...@bdoc.com

  *From:* Luis Bernardo lmpmberna...@gmail.com
 *Sent:* Monday, December 01, 2014 3:48 PM
 *To:* fop-users@xmlgraphics.apache.org
 *Subject:* Re: TIFF CMYK image with AFP

   Can you provide the tiff image and fop.xconf you use?

 On Mon, Dec 1, 2014 at 10:56 AM, Christian Pestel 
 christian.pes...@orange.fr wrote:
 Hi,

 TIFF image with CMYK color space is not well rendered in AFP.
 I think that the native TIFF codec don’t implement that :

 xmlgraphics\image\codec\tiff\TIFFImage.java
 public TIFFImage(SeekableStream stream, TIFFDecodeParam param, int
 directory)
 ...
 default: // Other including CMYK, CIE L*a*b*, unknown.
if (sampleSize % 8 == 0) {
imageType = TYPE_GENERIC;
}
 ...

 Is it possible to use a different codec that would cover this type of
 image like TwelveMonkeys imageio-tiff codec ?


 Thanks,


 Christian Pestel
 christian.pes...@orange.fr


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


 --

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: SVG image cache using a URIResolver?

2014-12-07 Thread Luis Bernardo


Probably the URI is validated during the XML/XSL to FO transformation, 
and the validation requires a call -- you can check that by returning an 
invalid response. In any case, the official input for FOP is FO and the 
caching was implemented with that in mind.


You can tweak your URIResolver to not call the DB and just return an 
OK response the first time it is called for a particular URI.


You can tweak your URI resolver

On 12/5/14, 2:55 PM, Marc Bleron wrote:

Hi,

Using FOP 1.1 on Java 1.5

I have SVG images stored in a database (Oracle 11.2) which I want to include
in a PDF document.
To achieve that I've created a custom URIResolver listening to a specific
uri scheme, and used that uri as source for fo:external-graphics, e.g.

xsl:template match=Object
   fo:block
 fo:external-graphic src=url('cache:/media/{@cache-id}')
content-width=scale-to-fit width=100%/
   /fo:block
/xsl:template

While transforming and rendering the output document, the URIResolver then
issues the corresponding query against the db using the cache-id value and
returns a StreamSource. That works fine.

The problem is that the URIResolver (and therefore the db) is called twice
when building the PDF document : once when transforming my input XML into FO
and another time when rendering the PDF from the FO.

My question is : is that intended behaviour? Isn't the caching mechanism
supposed to work in this situation?
Just want to be sure.

When using a FO object directly (identity transformation), the URIResolver
is called only once.

Thanks for any pointers.

Marc.



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: TIFF CMYK image with AFP

2014-12-10 Thread Luis Bernardo


The IOCA spec certainly allows that. I think that when a lot of the AFP 
code was written there were lingering doubts about the LZW patent and 
that may be the reason compression is not done. I will need to take a look.


On 12/10/14, 4:07 PM, Christian Pestel wrote:

Hi Luis,
If the CMYK TIFFs image file is compressed (LZW), Fop decompress the 
data during image loading and convert datas in AFP IOCA resource with 
these IFD parameters

- Image Encoding Parameter: Compression algorithm: No Compression
- Image Encoding Parameter: Recording algorithm: RIDIC
Do you think that it’s possible to compress again AFP data image ?
and set IFD parameters to
- Image Encoding Parameter: Compression algorithm: TIFF LZW
- Image Encoding Parameter: Recording algorithm: RIDIC

**

Christian Pestel

christian.pes...@orange.fr mailto:cpes...@bdoc.com

*From:* Christian Pestel mailto:christian.pes...@orange.fr
*Sent:* Monday, December 01, 2014 6:00 PM
*To:* fop-users@xmlgraphics.apache.org 
mailto:fop-users@xmlgraphics.apache.org

*Subject:* Re: TIFF CMYK image with AFP
Yes ! It’s work very well ! Sourire
I look forward to your patch
Thanks a lot, Luis.

**

Christian Pestel

christian.pes...@orange.fr mailto:cpes...@bdoc.com

*From:* Luis Bernardo mailto:lmpmberna...@gmail.com
*Sent:* Monday, December 01, 2014 5:31 PM
*To:* fop-users@xmlgraphics.apache.org 
mailto:fop-users@xmlgraphics.apache.org

*Subject:* Re: TIFF CMYK image with AFP
I see. I do have a patch for this, something that I fixed a while ago 
and never got around to commit (see attachment and check it is OK). I 
will try to have it applied tomorrow.
On Mon, Dec 1, 2014 at 4:05 PM, Christian Pestel 
christian.pes...@orange.fr mailto:christian.pes...@orange.fr wrote:

Hi Luis,
I join image, fo and afp files
I use Fop Trunk version
Fop.config :
renderer mime=application/x-afp
renderer-resolution300/renderer-resolution
images mode=color cmyk=true native=false fs45=true 
 jpeg allow-embedding=false bitmap-encoding-quality=1.0/
/images

**

Christian Pestel

christian.pes...@orange.fr mailto:cpes...@bdoc.com

*From:* Luis Bernardo mailto:lmpmberna...@gmail.com
*Sent:* Monday, December 01, 2014 3:48 PM
*To:* fop-users@xmlgraphics.apache.org 
mailto:fop-users@xmlgraphics.apache.org

*Subject:* Re: TIFF CMYK image with AFP
Can you provide the tiff image and fop.xconf you use?
On Mon, Dec 1, 2014 at 10:56 AM, Christian Pestel 
christian.pes...@orange.fr mailto:christian.pes...@orange.fr wrote:

Hi,

TIFF image with CMYK color space is not well rendered in AFP.
I think that the native TIFF codec don’t implement that :

xmlgraphics\image\codec\tiff\TIFFImage.java
public TIFFImage(SeekableStream stream, TIFFDecodeParam param, int 
directory)

...
default: // Other including CMYK, CIE L*a*b*, unknown.
   if (sampleSize % 8 == 0) {
   imageType = TYPE_GENERIC;
   }
...

Is it possible to use a different codec that would cover this type of 
image like TwelveMonkeys imageio-tiff codec ?



Thanks,


Christian Pestel
christian.pes...@orange.fr mailto:christian.pes...@orange.fr


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org 
mailto:fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org 
mailto:fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org 
mailto:fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org 
mailto:fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Searching hyphenated variablenames in PDF (with Acrobat)

2015-01-14 Thread Luis Bernardo


There was only one file attached Also, I was not able to reproduce 
the issue (maybe because I don't understand what you describe) -- I used 
the Mac version of Adobe Reader 11.0.10. Can you clarify? What is the 
word you are searching for?


On 1/14/15 6:26 PM, markus.sticker.e...@zf.com wrote:


Hi,

I wonder about the different behavior with these two files in the 
attachment.


The part I’m dealing with looks nearly the same, but as I try to 
search or copy the

text parts I get different results.

At first I tried to seach the some words:

Kraftfahrzeugsteuer à 1 hit

Kraft_fahrzeugsteuer à 1 hit

Jesuslatschenherstellerdachverbandsvorsitzender à 1 hit

Jesus_latschenhersteller_dachverbandsvorsitzender à 0 hits 

So why does the last one do not work?

Kind regards

Markus Sticker





Re: Barcode generation with FOP 1.1

2015-01-19 Thread Luis Bernardo


I got the jars from http://sourceforge.net/projects/barcode4j/files/.

There is a fop-ext and a fop-ext-complete jar. I assume the latter 
includes the xgc jar, so if you use the former, as I did, I expect the 
xgc jar to be necessary (but I did not try to check if it is really 
necessary).


On 1/19/15 12:57 PM, MartinKl wrote:

Thanks for your response. I will try it from cmd but I´ve checked my eclipse
classpath and I can see all libs.

C:\APPS\SVN_WorkingCopy\apps\jdk1.7.0_67\bin\javaw.exe
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:52817
-Dfile.encoding=Cp1250 -classpath C:\Users\jd42742\Desktop\barcode and
fop\target\classes;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\fop\1.1\fop-1.1.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\xmlgraphics-commons\1.5\xmlgraphics-commons-1.5.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-svg-dom\1.7\batik-svg-dom-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-anim\1.7\batik-anim-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-css\1.7\batik-css-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-dom\1.7\batik-dom-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-parser\1.7\batik-parser-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-util\1.7\batik-util-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;C:\APPS\SVN_WorkingCopy\m2repo\xml-apis\xml-apis-ext\1.3.04\xml-apis-ext-1.3.04.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-bridge\1.7\batik-bridge-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-script\1.7\batik-script-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-js\1.7\batik-js-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-xml\1.7\batik-xml-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\xalan\xalan\2.6.0\xalan-2.6.0.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-awt-util\1.7\batik-awt-util-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-gvt\1.7\batik-gvt-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-transcoder\1.7\batik-transcoder-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-svggen\1.7\batik-svggen-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-extension\1.7\batik-extension-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\xmlgraphics\batik-ext\1.7\batik-ext-1.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar;C:\APPS\SVN_WorkingCopy\m2repo\commons-io\commons-io\1.3.1\commons-io-1.3.1.jar;C:\APPS\SVN_WorkingCopy\m2repo\net\sf\barcode4j\barcode4j-fop-ext\2.0\*barcode4j-fop-ext-2.0.jar*;C:\APPS\SVN_WorkingCopy\m2repo\net\sf\barcode4j\barcode4j\2.1\*barcode4j-2.1.jar*;C:\APPS\SVN_WorkingCopy\m2repo\avalon-framework\avalon-framework-impl\4.2.0\avalon-framework-impl-4.2.0.jar;C:\APPS\SVN_WorkingCopy\m2repo\commons-cli\commons-cli\1.0\commons-cli-1.0.jar;C:\APPS\SVN_WorkingCopy\m2repo\commons-lang\commons-lang\1.0\commons-lang-1.0.jar;C:\APPS\SVN_WorkingCopy\m2repo\junit\junit\3.7\junit-3.7.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\ant\ant\1.7.1\ant-1.7.1.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\ant\ant-launcher\1.7.1\ant-launcher-1.7.1.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\avalon\framework\avalon-framework-impl\4.3.1\avalon-framework-impl-4.3.1.jar;C:\APPS\SVN_WorkingCopy\m2repo\org\apache\avalon\framework\avalon-framework-api\4.3.1\avalon-framework-api-4.3.1.jar
org.referencefop.BarcodeTest

so my envinronment might be broken somehow.

btw. What is barcode4j-xgc.jar ?  I wasnt able to find it anywhere. What it
contains?

Thanks




--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Barcode-generation-with-FOP-1-1-tp41617p41623.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Barcode generation with FOP 1.1

2015-01-19 Thread Luis Bernardo


xgc and fop are sibling projects, and fop depends on xgc too 
(xmlgraphics-commons). so it made sense to add that jar to the classpath.


On 1/19/15 3:18 PM, MartinKl wrote:

Thank you very much Luis. Apparently the barcode4j-xgc.jar is essential for
barcode generation. When I add it to classpath it worked.

Thank to all of you who participated and tried to help. Special thanks to
Luis Bernardo.

Luis: How did you know that the barcode4j-xgc.jar should be on the
classpath? I've searched on the internet quite long time and the jar is not
mentioned anywhere.




--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Barcode-generation-with-FOP-1-1-tp41617p41626.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Barcode generation with FOP 1.1

2015-01-18 Thread Luis Bernardo
I tested your example from the command line using fop-1.1 and the the 
jars barcode4j-fop-ext.jar, barcode4j-xgc.jar and barcode4j.jar and it 
worked. So the issue is probably with your environment setup.


After you run you code, in the debug perspective, right click in the 
execution entry and select properties. You should see then the classpath 
used by eclipse.



On 1/17/15 10:54 PM, MartinKl wrote:

Thanks for reproducing the issue. I´ve checked the the link with same issue
you provided. Issues is still in reopen state and noone probably touched
four 2+ years :/  I am still hoping to in fixing the issue or finding some
workaround.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Barcode-generation-with-FOP-1-1-tp41617p41619.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Fixing the table height

2015-02-12 Thread Luis Bernardo


The suggestion given was to keep the row height fixed. Obviously the 
table height will be a multiple then of the number of rows.


You have not explained well what you are trying to achieve. You want a 
fixed table height regardless of the number of rows and their height?


Can you provide a drawing of what you expect, or maybe a document 
generated with the older FOP version you were using?


On 2/12/15 10:26 AM, fop_ag wrote:

Hi Luis Bernardo,

Even having block-container inside the table cell didnt give the expected
result.. Still the height is growing depending on total no of rows in table.

Here is the xsl snippet which i used -

fo:table-row height=3mm
   fo:table-cell padding=1mm
padding-top=0.5mm padding-bottom=0.5mm
   fo:block-container border=solid red 1pt

block-progression-dimension.minimum=1cm

inline-progression-dimension=100%
 fo:block hyphenate=true
wrap-option=wrap  white-space-collapse=false
white-space-treatment=preserve linefeed-treatment=preserve

xsl:value-of select=B.4.k.2.1//fo:block

/fo:block-container
/fo:table-cell
/fo:table-row



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Re-Fixing-the-table-height-tp41699p41744.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Fixing the table height

2015-02-12 Thread Luis Bernardo


I think the desired behavior is to have rows of fixed height. Having a 
block-container with fixed height inside a table-cell should achieve the 
desired result.


On 2/10/15 5:20 PM, Pascal Sancho wrote:

Hi,

FOP 1.1 only accepts value auto for fo:table@height.
Other values are replaced with 'auto'.
If you want a frame with a fixed (or minimal) height, then embed your
table in an fo:block-containter:
fo:block-container
 border=solid red 1pt
 block-progression-dimension.minimum=1cm
 inline-progression-dimension=100%
 fo:table table-layout=fixed width=100%
 ...
 /fo:table
/fo:block-container

2015-02-10 13:05 GMT+01:00 fop_ag nithinurs.venugopalraj...@arisglobal.com:

Hi,

I'm trying to use the fo:block-container like u mentioned, but still the
table height is not constant..
It grows or shrinks depending on total no of rows in the table.

THis is the xsl i used xsl_updated.txt
http://apache-fop.1065347.n5.nabble.com/file/n41706/xsl_updated.txt



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Re-Fixing-the-table-height-tp41699p41706.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org







-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Hyphenation pattern Lincensing issues

2015-01-07 Thread Luis Bernardo


See if http://tug.org/tex-hyphen/#languages answers your question.  You 
can also try to contact the authors of the pattern you are using or ask 
at tex-hyp...@tug.org.


On 1/7/15 3:45 PM, jfrm.mau...@gmail.com wrote:

Le 07/01/2015 14:58, Simon Steiner a écrit :

Hi,

 Many of the hyphenation files distributed with TeX and its 
offspring are licenced under the LaTeX Project Public License (LPPL), 
which prevents them from being distributed with Apache software.


Thank you for your answer.
I read that however I was not able to determine what was the 
particular issue for the french case.


The link: http://www.latex-project.org/lppl.html on FOP page seems to 
be broken.


Regards





Re: bug: fop crashes when using float and span=all

2015-03-19 Thread Luis Bernardo


Please create a bug in Jira. I think that span, like float does, may 
trigger a restart of the layout engine and the two restarts are not 
playing well together...


On 3/19/15 5:01 PM, Andreas Argirakis wrote:

Hi.

Using fop nightly 20150319 on Windows 7.

Attached are three .fo files showing that a combination of using 
fo:float and fo:block span=all will sometimes crash fop.


The file two-columns-with-float-and-two-blocks-and-span.fo will crash 
fop with the following stack trace:


SEVERE: Exception
org.apache.fop.apps.FOPException
java.lang.NullPointerException
at 
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:288)
at 
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)

at org.apache.fop.cli.Main.startFOP(Main.java:186)
at org.apache.fop.cli.Main.main(Main.java:217)
Caused by: java.lang.NullPointerException
at 
org.apache.fop.layoutmgr.PageBreaker.redoLayout(PageBreaker.java:420)
at 
org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:329)
at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:427)
at 
org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)

at
snip

If one block is removed as in the file 
two-columns-with-float-and-one-block-and-span.fo a pdf can be 
produced, however one block will not show up and the two-column block 
will be cut.


If the fo:float is removed as in two-columns-with-span.fo the 
resulting outcome is as expected.


Attached are minimal .fo files and pdfs.

Best regards,
Andreas Argirakis

Andreas Argirakis
Tel +46 31 15 04 90
Mob +46 733 41 44 26
Fax +46 31 15 04 09
andreas.argira...@maindialog.se

Main Dialog AB
Västra Hamngatan 12
SE-411 17 Göteborg
www.maindialog.s


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: page number, but only if more than one page exists

2015-03-22 Thread Luis Bernardo


Try using a mix of page masters with different page positions (see 
http://www.w3.org/TR/xsl/#page-position).


You will need a page master with page-position=only without the page 
number, and a page master with page numbers when there is more than one 
page (i.e. when page-position=only does not apply).


On 3/22/15 10:43 PM, Roberto Nunnari wrote:

On 22. 03. 15 17:30, Roberto Nunnari wrote:

Hi.

I need to change a servlet that generates a FO document and then
transforms it into a pdf document. Unfortunately I know almost nothing
about Formatting Objects. :-(

At present the FO adds the page number on every page.

I need to change it so that it adds the page number, but only if there
are more than one page.

fop version in use is very old.. 0.91beta and build-Id is from 20051223

Any help very appreciated.

Thank you and best regards.
Robi


Hi.

I got a slightly better result than having only the number using
page-number / / page-number-citation ref-id=last-page/

and adding an empty block at the end of the flow..
block id=last-page/

It works.. and it's already better than having just the page number 
because seeing also the total number of pages lets you know if you 
have in your hands the whole document or not.. but it's not exactly 
what I was asked to do..


Any hints on how to accomplish the original goal?
Thank you and best regards.
Robi


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Unable to copy Hyphen from PDF generated using FOP

2015-04-02 Thread Luis Bernardo


Please provide the FO file you used to generate the PDF and indicate 
what viewer, version and OS you used. Also, and this is important, 
indicate what font you used and how you configured it (in fop.xconf). I 
have seen different copy and paste behaviors from Adobe Reader with 
different fonts.


On 3/31/15 3:23 PM, smruthi wrote:

Hi,

I am facing a problem while trying to copy data from PDF into a text editor,
unable to understand the reason for this behaviour.

I am unable to copy 'Hyphen' charector present at the end of line from the
PDF file generated using FOP 1.1.
  
This happens only when the charector before the hyphen is an alphabet. It

works fine when numbers are present before hyphen.
Example : If data in PDF file is -
'This is test data with Hyphen at end-'  -- Not able
to copy Hyphen

'This is test data with Hyphen at end123-' -- Able

to copy Hyphen



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Unable-to-copy-Hyphen-from-PDF-generated-using-FOP-tp41920.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Apache FOP Absoulute Relative Position Issue

2015-04-22 Thread Luis Bernardo


You need to use block-container for absolute positioning. Are you trying 
that?


On 4/22/15 11:27 AM, Paul White wrote:

Hi,

Would you please tell me if there is a proper way to position some fo 
blocks absolutely and under them on the same page to position a table 
which should spawn over next page.


I read http://comments.gmane.org/gmane.text.xml.fop.user/33170 but 
still no clue about whether is possible or not.


Is there a way to position some vertical text blocks relatively on the 
same line?


Best wishes,
Paul White.



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: How to draw these arrow characters?

2015-05-13 Thread Luis Bernardo


Works for me (using Mac OS X) without using a configuration file since 
the any font is equivalent to the New Times Roman (may even be the 
same) font specified in the SVG.


Do not use auto-detect if you want to have better control of the fonts used.

Also, supplying a bare minimum FO file that shows the problem makes it 
easier for us to help you...


On 5/13/15 3:08 PM, markus.sticker.e...@zf.com wrote:


Hello FOP,

I just have a very simple question: How to setup FOP right that this 
arrows do not disappear?


Please have a look at the attached pdf.

There are two images. The first is a SVG and the second is a JPG.

The JPG is just that what I expected to get.

Also attached is the fo source and the svg. In my config fonts are 
auto-detected.


When I open the svg with Chrome there are only small differences 
comparing to the JPG.


Thanks for your help.

Best regards

Markus



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: FOP Headers Footers

2015-06-03 Thread Luis Bernardo


It would be easier to answer if you were to send an example of what you 
get and what you would like to get instead. But it looks like you should 
be able to handle that with table-markers.


On 6/3/15 9:44 PM, Fernando Israel wrote:

Hi All,

Here is the background to my question.

We have been using FOP for a few years to generate PDF output. The FOP 
stylesheet includes blocks with text and images, and a table. Every 
block above the table is always absolute positioned. Blocks beneath 
the table are relative positioned -i.e. space-before and start-indent 
so that they respect the distance from the bottom of the table.


The number of rows in the table varies, so when the table height is 
such that it needs to spill over a second page, it does it well, and 
all the blocks beneath it keep the original distance from the bottom 
of the table and are also in the second page.


Now we are trying to introduce headers and footers -i.e. region-before 
and region-after in the simple-page-master, and added corresponding 
margins top and bottom to the region-body. It works well !


The issue is in situations where the table height pushes the elements 
beneath (relative positioned) to the second page. In this case, this 
blocks can appear on the second page, and overlap with the second page 
header.


Is there an attribute/flag we are missing that will force the blocks 
spilling over to the second page to respect the header and will not 
overlap with it ?


Thank you very much in advance !

Fernando





Re: floats

2015-06-10 Thread Luis Bernardo


No, and since that does not seem part of the XSL 1.1 spec it is highly 
unlikely that it will be implemented. What is the purpose of mirror 
floats? Are the two floats the same (meaning same content) or do they 
have at least the same exact size?


On 6/10/15 3:54 PM, Michał Jaworski wrote:

Hi,

I tested FOP 2.0 comparing results generated earlier using version 
1.1. The content is an xml book having approx 300 B5 pages with lot of 
tables and complex structures. Results are surprisingly positive. 
Great work!  I want to touch one topic known for years. Is there any 
way (or are you planning in an upcoming future) to achieve somehow 
mirror floats (on outer margins of the book) thus something like 
fo:float float=outsideused in xep?


Michał Jaworski

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Apache Batik/FOP query about CVE-2015-0250

2015-06-26 Thread Luis Bernardo


See http://xmlgraphics.apache.org/security.html.

On 6/26/15 5:42 PM, Chris Bowditch wrote:

Hi Vincent,

Yes Batik 1.8 contains the fix for CVE-2015-0250

Thanks,

Chris

On 26/06/2015 14:44, Vincent Timoney wrote:

Hi,

Thanks for your reply; Just to double-check is the new version of
batik-all.jar(1.8) contained within the new version of FOP (2.0) 
contains

the fix for the CVE-2015-0250?

Regards,
Vinnie

Vincent Timoney
Security Engineer


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: floats

2015-06-10 Thread Luis Bernardo


Can you show an example? Do you have two floats with text flowing in 
between or just one float that is always on the outer side of the page?


On 6/10/15 4:36 PM, Michał Jaworski wrote:

Hi,

mirror floats appear always on the outer side of the book page. We are 
using FOP to print truth books :) on the paper. In the simplest 
version floats are equal size and contains growing numbers of 
neighbouring paragraphs. It is used later in citations.


Part of books templates have mirror floats simply and we have to 
handle it somehow. Today we are using Tex in such a cases but after 
very good experiences with FO we want to get rid of Tex and use truly 
xml approach everywhere.


Unfortunately XSL 1.1 spec forgotten about it :(

Michał Jaworski

W dniu 2015-06-10 o 16:14, Luis Bernardo pisze:


No, and since that does not seem part of the XSL 1.1 spec it is 
highly unlikely that it will be implemented. What is the purpose of 
mirror floats? Are the two floats the same (meaning same content) or 
do they have at least the same exact size?


On 6/10/15 3:54 PM, Michał Jaworski wrote:

Hi,

I tested FOP 2.0 comparing results generated earlier using version 
1.1. The content is an xml book having approx 300 B5 pages with lot 
of tables and complex structures. Results are surprisingly positive. 
Great work!  I want to touch one topic known for years. Is there any 
way (or are you planning in an upcoming future) to achieve somehow 
mirror floats (on outer margins of the book) thus something like 
fo:float float=outsideused in xep?


Michał Jaworski

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: floats

2015-06-11 Thread Luis Bernardo


That is not really a float in the sense that the text does not need to 
wrap around it. And that in fact makes the implementation of the feature 
a lot simpler.


On 6/10/15 5:41 PM, Michał Jaworski wrote:

Example attached, one float always on the outer side.


W dniu 2015-06-10 o 17:19, Luis Bernardo pisze:


Can you show an example? Do you have two floats with text flowing in 
between or just one float that is always on the outer side of the page?


On 6/10/15 4:36 PM, Michał Jaworski wrote:

Hi,

mirror floats appear always on the outer side of the book page. We 
are using FOP to print truth books :) on the paper. In the simplest 
version floats are equal size and contains growing numbers of 
neighbouring paragraphs. It is used later in citations.


Part of books templates have mirror floats simply and we have to 
handle it somehow. Today we are using Tex in such a cases but after 
very good experiences with FO we want to get rid of Tex and use 
truly xml approach everywhere.


Unfortunately XSL 1.1 spec forgotten about it :(

Michał Jaworski

W dniu 2015-06-10 o 16:14, Luis Bernardo pisze:


No, and since that does not seem part of the XSL 1.1 spec it is 
highly unlikely that it will be implemented. What is the purpose of 
mirror floats? Are the two floats the same (meaning same content) 
or do they have at least the same exact size?


On 6/10/15 3:54 PM, Michał Jaworski wrote:

Hi,

I tested FOP 2.0 comparing results generated earlier using version 
1.1. The content is an xml book having approx 300 B5 pages with 
lot of tables and complex structures. Results are surprisingly 
positive. Great work!  I want to touch one topic known for years. 
Is there any way (or are you planning in an upcoming future) to 
achieve somehow mirror floats (on outer margins of the book) thus 
something like fo:float float=outsideused in xep?


Michał Jaworski

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: 
fop-users-h...@xmlgraphics.apache.org





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org





-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org






-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Apache Batik/FOP query about CVE-2015-0250

2015-06-26 Thread Luis Bernardo


Yes, it is (you must be using FOP-1.1 or earlier if you have the 1.7 
jar). You can replace it by version 1.7.1 if you wish. Version 1.7.1 is 
the same as 1.7 but for the CVE-2015-0250 fix.


On 6/26/15 11:04 AM, Vincent Timoney wrote:


  Hi,

  In relation to CVE-2015-0250:  The Apache FOP project contains a version
of
  Batik called batik-all-1.7.jar. Is this affected that the above CVE?


  Regards,
  Vinnie

  Vincent Timoney
  Security Engineer


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Hyphenation Jar License Issues

2015-07-29 Thread Luis Bernardo
The licenses are the ones listed in http://tug.org/tex-hyphen/#languages.
It is for you to decide whether the licenses are OK for your project.



On Wed, Jul 29, 2015 at 2:21 PM, sripathi sripathi.rao...@gmail.com wrote:

 Hi All,

In Apache FOP site mentioning like,for hyphenation,we need to download
 the Hyphenation patterns from OFFO,and also mentioning like, the user is
 responsible to settle the license issues, to use the fop-hyph.jar, what
 type
 of licensing terms i need to set.Please help me on this..

 Many thanks in advance..

 Sripathi



 --
 View this message in context:
 http://apache-fop.1065347.n5.nabble.com/Hyphenation-Jar-License-Issues-tp42674.html
 Sent from the FOP - Users mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




Re: Fop2, Java8, Tomcat7 and Bouncy Castle

2015-11-06 Thread Luis Bernardo
You are using PDFBox, maybe because you are using the PDF Plugin, and that
is why you need BoucyCastle. FOP does not need it.

On Fri, Nov 6, 2015 at 10:01 AM, Dave Thorn  wrote:

> Hi,
>
> The page at
>
> https://xmlgraphics.apache.org/fop/2.0/pdfencryption.html
>
> says "The PDF encryption implemented in FOP does not need
> external libraries to perform encryption. A recent JDK (1.5+) is
> sufficient. "
>
> Yet I deployed my fop-using webapp to centos7, tomcat7,
> java8(Oracle jdk) and it complained:
>
> java.lang.NoClassDefFoundError:
> org/bouncycastle/jce/provider/BouncyCastleProvider
>
> org.apache.pdfbox.pdmodel.encryption.PDEncryption.(PDEncryption.java:96)
> org.apache.pdfbox.pdfparser.PDFParser.prepareDecryption(PDFParser.java:263)
> org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:196)
> org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:230)
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:972)
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:876)
>
>
> It's fixed easily enough with
>
>   
> org.bouncycastle
> bcprov-jdk15on
> 1.53
>   
>
> but I thought I'd enquire into the discrepancy.
>
> ta,
>
> --
> dave thorn
>
> Bad to the bone.
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Unable to Process Large Pragraph

2015-10-19 Thread Luis Bernardo
I assume you are putting a very large string inside a fo:block. Break the
string into pieces and put a  in between the pieces.

On Mon, Oct 19, 2015 at 4:22 PM, sripathi  wrote:

> Hi All,
>
>  My document having a large paragraph(nearly 100 pages), FOP2.0 is unable
> to
> process this document.I know, i shouldn't give this much large para, but it
> is user requirement. Fop throwing OOM(Out Of Memory Exception), when it is
> calculating the breaking points for this large paragraph. Is there any XSL
> option is there to resolve this.
>
> Regards,
> Sripathi
>
>
>
> --
> View this message in context:
> http://apache-fop.1065347.n5.nabble.com/Unable-to-Process-Large-Pragraph-tp42972.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


<    1   2