RE: xml to pdf (generic)
-Original Message- From: Rick Roen [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 8:19 PM To convert xml to pdf you need to have an xml file (the one below I assume) PLUS an xslt file that will convert to XSL-FO and then you can use FOP to convert the FO file into pdf. You can also do this in one step with FOP - xml + xslt - xsl-fo = pdf output. Now we still need your xslt file that you intend to use to convert your xml. If you are by chance looking for someone to write an xslt transformation for you - you've got the wrong guy here, but maybe someone else will help. If you already have the xslt, send it so we can look at it. Rick -Original Message- From: vijay [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 12:06 PM sorry rick , sorry rick , i sended you worng xml file .again i am sending my xml file . (...) In previous mail accidentally ?xml-stylesheet type=text/xsl href=coun.xslt? tag was included. i wrote a xsl file for generating the pdf .but that is not in proper way I am generating pdf file from command prompt using fop -xml pdf.xml -xsl pdf.xsl -pdf pdf1.pdf command I am uploading my pdf.xsl(what i wrote for some other xml ) file. could you see it once please. Rick Roen wrote: Vijay, You will have to post a copy of your coun.xslt also. With just the xml we cannot tell what you are trying to do to convert to XSL-FO Rick -Original Message- From: vijay [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 7:38 AM Hi.. Im hereby attaching a sample XML which im using for coversion to PDF and the desired PDF. here is my xml file :- (...) Iam attaching the snapshot of the desired PDF. Rick Roen wrote: Vijay, This seems more like a question about XML - XSLT conversion. A better group for that would be [EMAIL PROTECTED] Perhaps if you posted your XSLT and brief example of your XML we, or xsl-lists could be of more help, or if I misunderstand a more complete explanation of your problem since I don't understand specifically what it is. The general process is XML + XSLT - XSL-FO - PDF. The XSL-FO - PDF is quite easy and described in detail on the FOP web site. Rick -Original Message- From: vijay [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 7:11 AM Hi all. This is a problem related to the conversion from XML to PDF. I have a system generated dynamic XML(where the child nodes may vary accordingly) that i need to convert to a PDF format file using xsl-fo. In the required PDF the node values in the system XML should appear in proper row n column format. for example if the XML contains 2 childs under the root node n the child nodes further contain 4 childs so the table will b of the size: 2*4( i.e. 2 rows n 4 cols) Vijav, As Rick said, xml to pdf conversion need 2 steps: 1/ transform XML to XSL-FO, 2/ render XSL-FO as PDF Step 1/: You have to provide a XSLT to the transformation engine. You can find some tutorials about XSL-FO here at [1] or [2], or googleize if needed. Fortunately, FOP distribution embed XALAN, witch is a XSLT engine. Step 2/: this is the job of FOP. [1] http://www.w3schools.com/xsl/ [2] http://nwalsh.com/docs/tutorials/xsl/xsl/frames.html HTH, Pascal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Font names...
snip/ Mayhappen the reasons for changing the font names when working with full/partial embed fonts aren't relevant anymore... Would like to take the oportunity to suggest that a switch like -fullembed (or something like that) be used instead of the -ansi, as a clarification of what the switch do. Suggestion noted but someone actually has to implement it. Not sure who that will be. This issue will soon disappear. The current font library will be replaced with another one (FOrayFont), which handles that completely differently. P.S.- get rid of the font metrics would just be perfect. Also perfect would There will also be no intermediate XML file anymore, the font file will be directly used. be to note in the config file how one wants the font to be placed on the pdf (partial embed, full embed or reference only). This possibility will be available. That's in the works. Date? Unknown. Chances rising in the near future. I have some insider info about someone who'll have more time to work on FOP (not me). ;-) Mmmh, I wonder who you're talking about?? Ok, this won't appear in the next release (Fop 0.93) because this is to big of a change. Probably the release after. Luis, would you mind summarizing your problems in a Bugzilla entry? So that we can more easily track them, and ensure they will actually be corrected in the new font library. Thanks! Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Font names...
Vincent Hennebert-3 wrote: Luis, would you mind summarizing your problems in a Bugzilla entry? So that we can more easily track them, and ensure they will actually be corrected in the new font library. Thanks! Will do... I think it's about time i create a bugzilla login in FOP as it seams that i will be working more and more with it ;) And gratz on all the feedback from you all... Cheers, LF -- View this message in context: http://www.nabble.com/Font-names...-tf2287650.html#a6404011 Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiff file with black background
Hi, I have generated Tiff file using Tiffrenderer with FOP . But it is having black background with white text. In which way we can make it white background and black text. Thanks in advance. Cheers Ram This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit us at http://www.polaris.co.in - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiff file with black background
[EMAIL PROTECTED] wrote: Hi, I have generated Tiff file using Tiffrenderer with FOP . But it is having black background with white text. What version of FOP are you using? In which way we can make it white background and black text. Thanks in advance. And what Program are you using to view the generated Tiff File? Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Embedding MathML with JEuclid.
I have been working with very recent SVN/CVS versions of FOP, Batik and JEuclid. I have embedded a small fragment of MathML in an XSL-FO document (actually output from Docbook source by xsltproc): fo:instream-foreign-object mml:math xmlns:mml=http://www.w3.org/1998/Math/MathML; overflow=scroll mml:mrow mml:mo∑/mml:mo mml:mn4/mml:mn mml:mo+/mml:mo mml:mix/mml:mi /mml:mrow /mml:math /fo:instream-foreign-object I needed two patches to the examples/mathml directory to get this to work: First, the constructor for MathBase and DOMMathBuilder have changed in recent JEuclid (fop-svn-jeuclid-svn.patch). Secondly, the scaling of the image is completely wrong, because of the extreme complexity of the dimension handling. I have found great difficulty in understanding this because of the levels of nesting, the interaction of JEuclid, Batik and FOP, and the fact that attributes such as height and width are copied so frequently from one object to another. Width and height seem to come from two different sources which are inconsistent. The size of the viewport seems to come from InstreamForeignObject.prepareIntrinsicSize(), which calls MathMLElement.getDimension(), which calls MathMLElement.convertToSVG() which calls MathBase.getWidth() and MathBase.getHeight(). This seems to be the actual extent of the rendered text. However, later in Batik's SVGSVGElementBridge.createGraphicsNode(), the width and height attributes are read from the SVG document: float w = se.getWidth().getAnimVal().getValue() etc. I found that while the actual size of the math text was 48x10 points, the w and h here were 100x100 - this seems to be a default value. As a result the math was squashed by a factor of 0.48x0.1 - not what I want. It appears that this happens because the MathMLElement class in FOP's examples/mathml directory does not place the generated svg element at the root of the SVG document, but places it as a child of ANOTHER svg element. Therefore the width/height attributes are not processed by Batik. There is a comment in MathMLElement.java to the effect that this should be done in a better way. This patch puts the generated node at the root where it should be, and makes the text the right size (fop-svn-mathml-root.patch). I hope that my analysis may be of interest to anyone working on the FOP/JEuclid integration. Peter diff -u -r fop-svn-old/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java fop-svn/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java --- fop-svn-old/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java 2006-09-20 20:12:33.0 +0100 +++ fop-svn/examples/mathml/src/org/apache/fop/mathml/MathMLElement.java 2006-09-20 20:14:28.0 +0100 @@ -20,9 +20,12 @@ package org.apache.fop.mathml; import java.awt.Color; +import java.awt.Font; import java.awt.Dimension; import java.awt.geom.Point2D; +import org.apache.avalon.framework.logger.ConsoleLogger; + import org.apache.fop.apps.FOPException; import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropertyList; @@ -81,10 +84,9 @@ int displayfontsize = 12; int inlinefontsize = 12; -MathBase base = new MathBase( - (new DOMMathBuilder(doc)).getMathRootElement(), - fontname, fontstyle, inlinefontsize, - displayfontsize); +MathBase base = new MathBase(new Font(fontname, fontstyle, inlinefontsize)); + + new DOMMathBuilder(doc, new ConsoleLogger(), base); base.setDebug(false); diff -u -r fop-svn-old/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java fop-svn/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java --- fop-svn-old/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java 2006-09-20 20:12:33.0 +0100 +++ fop-svn/examples/mathml/src/org/apache/fop/mathml/MathMLElementMapping.java 2006-09-20 20:14:20.0 +0100 @@ -19,6 +19,10 @@ package org.apache.fop.mathml; +import java.awt.Font; + +import org.apache.avalon.framework.logger.ConsoleLogger; + import org.apache.fop.fo.FONode; import org.apache.fop.fo.ElementMapping; import org.apache.fop.image.analyser.XMLReader; @@ -82,10 +86,9 @@ int inlinefontsize = 12; int displayfontsize = 12; -MathBase base = new MathBase( - (new DOMMathBuilder(doc)).getMathRootElement(), - fontname, fontstyle, inlinefontsize, - displayfontsize); +MathBase base = new MathBase(new Font(fontname, fontstyle, inlinefontsize)); + + new DOMMathBuilder(doc, new ConsoleLogger(), base); base.setDebug(false); diff -u -r
RE: Font names...
Hi Vincent, This issue will soon disappear. The current font library will be replaced with another one (FOrayFont), which handles that completely differently. Do you know how soon the FOrayFont stuff will be in the trunk? I'm waiting on it to fix the Bug where you can't copy and paste characters from the PDF document. I presume there'll be a big splash when it happens so we'll all know how to configure it? Cheers Karl Roberts NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple SVG files to create multipage PDF files using PDFTranscoder
Hi, I was wondering if it was possible to create a multi-page PDF document from multiple SVG documents using the PDFTranscoder (each SVG document represents a page in the PDF document)? I have looked around google, and searched on the mailling lists, but there is no mention about it... or am I looking in the wrong place? If this is possible, how would I go about doing this? If this is not possible... how hard would it be to implement? :) (any pointers on where to start?) Thanks Antonio Broughton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]