Re: Changing logging behavior in an embedded application.
Apache FOP uses Apache Jakarta Commons Logging as a logging abstraction kit. [1] should give you the basics and has links to further information on configuring logging the way you want it to behave. I hope that helps. [1] http://xmlgraphics.apache.org/fop/0.91/embedding.html#basic-logging On 04.03.2006 20:44:55 Tracey Zellmann wrote: I have dug through what documentation I can find, but it hasn't helped me, so maybe the list can give me some guidance. I have my application running successfully. I am using fop 0.91beta-bin-jdk1.4 It publishes a PDF using FOP within another java application, not from the command line, so I believe you would call it embedded. I need to change the way logging messages are handled. Currently, I am getting a large number of warning messages printed to the console. With Jeremias Maerki's help, I can see they are caused my some namespace issues with some imported svg images I am using from MS Visio. Essentially, they can be ignored, and that is what I have been doing. However, next week, I have to turn this over to the first wave of normal users, so I don't want to overwhelm them with these messages. I would like all messages to go to a log file, not the console. I would prefer that warning level messages go to a file that is typically overwritten, so they don't accumulate. Anything higher than warning should go to another file which does append and accumulates the message history. I am pretty sure I could handle this using Java's java.util.logging API. However, I am not sure how to get hold of and change the current behavior of FOP logging. Can someone illuminate this for me? Thanks. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Keeping tables together.
Hi all, Is there a way of keeping two tables together on the same page? The two tables are different in column sizes, the first table has for example 2 columns and the second table has 5 or 6 columns. Thanx, Confidentiality Caution and Disclaimer This message and/or any attachment thereto ("the message")contains privileged and confidential information intendedonly for the recipient. If you are not the intended recipient of this message,please erase it permanently once you have notified thesender, per return e-mail, that you have received themessage in error.Unless the sender is duly authorised by either the TelesureGroup, or any of its subsidiary or affiliated companies or I.S Services("the Group") to send this message and unless the contentof this message is also duly authorised by the Group, anyviews expressed in this message are those of the individualsender and the Group will not accept liability therefore,nor for any consequential damage arising there from.Any recipient of an unacceptable communication, a chainletter or offensive material of any nature is requestedto be reported to [EMAIL PROTECTED].
Re: NPE
Andreas L Delmelle wrote: On Mar 6, 2006, at 01:25, Florent Georges wrote: Andreas L Delmelle wrote: The problem is an empty fo:instream-foreign-object. Thanks for the solution (mmh, this file passed my validator, I'll have to check that). Well, AFAICT, it's not really empty from a SAX parser's point of view. It does contain a text-node, but this is completely ignored by FOP. The SAX characters() events are only handled for FOs that can contain #PCDATA. Mmh, I'm not sure to understand. The document contains some: fo:instream-foreign-object/ as well as some: fo:instream-foreign-object.../fo:instream-foreign-object I guess you only saw the later. Furthemore, if I understand right §6.6.6 (mmh, ok, born to be a problematic paragraph :-p): Contents: The fo:instream-foreign-object flow object has a child from a non-XSL namespace. The permitted structure of this child is that defined for that namespace. So it is required to an IFO to have a child element, isn't it? And to don't have non-whitespace #PCDATA. Right? So an FO validator would have to report an error for both the above IFOs, isn't it? PS: I based my validator on the RNC grammar provided by RenderX at URL:http://www.renderx.com/tools/validators.html. Regards, --drkm ___ Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Keeping tables together.
THe way I know to keep two differents elements (tables, images, etc...) is to put them into a table and use the keep-with-next attribute on the "main" table cells... - create a main table with 1 column and 2 rows - put your first table into the first cell of the main table - put your second table into the second cell of the main table - use the keep-with-next or keep with previous attribute on the main cells De: Andre Groeneveld [mailto:[EMAIL PROTECTED] Envoyé: lundi 6 mars 2006 10:03À: fop-users@xmlgraphics.apache.orgObjet: Keeping tables together. Hi all, Is there a way of keeping two tables together on the same page? The two tables are different in column sizes, the first table has for example 2 columns and the second table has 5 or 6 columns. Thanx, Confidentiality Caution and Disclaimer This message and/or any attachment thereto ("the message")contains privileged and confidential information intendedonly for the recipient. If you are not the intended recipient of this message,please erase it permanently once you have notified thesender, per return e-mail, that you have received themessage in error.Unless the sender is duly authorised by either the TelesureGroup, or any of its subsidiary or affiliated companies or I.S Services("the Group") to send this message and unless the contentof this message is also duly authorised by the Group, anyviews expressed in this message are those of the individualsender and the Group will not accept liability therefore,nor for any consequential damage arising there from.Any recipient of an unacceptable communication, a chainletter or offensive material of any nature is requestedto be reported to [EMAIL PROTECTED].
getting veradana font to work
I am not able to get Verdana to work. I have tried to follow the documentation. I have also read the recent emails about embedded font problems, but I can't quite follow the details. I am getting this error. SEVERE: svg graphic could not be rendered: null java.lang.NullPointerException at org.apache.fop.fonts.LazyFont.mapChar(LazyFont.java:97) at org.apache.fop.fonts.Font.mapChar(Font.java:144) at org.apache.fop.svg.PDFTextPainter.getStringWidth(PDFTextPainter.java:266) at org.apache.fop.svg.PDFTextPainter.paint(PDFTextPainter.java:219) at org.apache.batik.gvt.TextNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source), and many more... Here are the steps I have taken Create font metrics from the local Verdana.ttf file in C:\WINDOWS\FONTS using TTFReader the command window messages indicates it was successful, and the file is ttfcm.xml I did use the -enc ansi otpion. My target customers are using Windows and will have the same Verdana font available locally. Register Fonts with FOP. I took the configuration file that comes with the distribution fop.xconf, and added these elements in the fonts element. fo:inline font-family=Verdana font-weight=normal font-style=normal Verdana-normal-normal font /fo:inline font metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml font-triplet name=Verdana style=normal weight=normal/ /font Tell FOP about the configuration Fop fop = new Fop(MimeConstants.MIME_PDF); DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder(); Configuration cfg = cfgBuilder.buildFromFile( C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/conf/fop.xconf); FOUserAgent userAgent = fop.getUserAgent(); userAgent.setUserConfig(cfg); For completeness, here is how I am trying to invoke the font within the svg element. g style=font-family: Verdana, sans-serif; font-size: 10pt; stroke: none; fill: black; Any help would be appreciated. Is there a worked example that touches all the aspects? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getting veradana font to work
Have you seen the typo error ?: font metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml --- font-triplet name=Verdana style=normal weight=normal/ /font Dirk Tracey Zellmann wrote: I am not able to get Verdana to work. I have tried to follow the documentation. I have also read the recent emails about embedded font problems, but I can't quite follow the details. I am getting this error. SEVERE: svg graphic could not be rendered: null java.lang.NullPointerException at org.apache.fop.fonts.LazyFont.mapChar(LazyFont.java:97) at org.apache.fop.fonts.Font.mapChar(Font.java:144) at org.apache.fop.svg.PDFTextPainter.getStringWidth(PDFTextPainter.java:266) at org.apache.fop.svg.PDFTextPainter.paint(PDFTextPainter.java:219) at org.apache.batik.gvt.TextNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source), and many more... Here are the steps I have taken Create font metrics from the local Verdana.ttf file in C:\WINDOWS\FONTS using TTFReader the command window messages indicates it was successful, and the file is ttfcm.xml I did use the -enc ansi otpion. My target customers are using Windows and will have the same Verdana font available locally. Register Fonts with FOP. I took the configuration file that comes with the distribution fop.xconf, and added these elements in the fonts element. fo:inline font-family=Verdana font-weight=normal font-style=normal Verdana-normal-normal font /fo:inline font metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml font-triplet name=Verdana style=normal weight=normal/ /font Tell FOP about the configuration Fop fop = new Fop(MimeConstants.MIME_PDF); DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder(); Configuration cfg = cfgBuilder.buildFromFile( C:/unzipped/fop-0.91beta-bin-jdk1.4/fop- 0.91beta/conf/fop.xconf); FOUserAgent userAgent = fop.getUserAgent(); userAgent.setUserConfig(cfg); For completeness, here is how I am trying to invoke the font within the svg element. g style=font-family: Verdana, sans-serif; font-size: 10pt; stroke: none; fill: black; Any help would be appreciated. Is there a worked example that touches all the aspects? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getting veradana font to work
HOORAY! You are exactly right. That was it. I was tearing out my hair. Sorry to take your time with a typo, but I just couldn't find it without another pair of eyes. - Original Message - From: Dirk Bromberg [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, March 06, 2006 7:57 AM Subject: Re: getting veradana font to work Have you seen the typo error ?: font metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml --- font-triplet name=Verdana style=normal weight=normal/ /font Dirk Tracey Zellmann wrote: I am not able to get Verdana to work. I have tried to follow the documentation. I have also read the recent emails about embedded font problems, but I can't quite follow the details. I am getting this error. SEVERE: svg graphic could not be rendered: null java.lang.NullPointerException at org.apache.fop.fonts.LazyFont.mapChar(LazyFont.java:97) at org.apache.fop.fonts.Font.mapChar(Font.java:144) at org.apache.fop.svg.PDFTextPainter.getStringWidth(PDFTextPainter.java:266) at org.apache.fop.svg.PDFTextPainter.paint(PDFTextPainter.java:219) at org.apache.batik.gvt.TextNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source) at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source), and many more... Here are the steps I have taken Create font metrics from the local Verdana.ttf file in C:\WINDOWS\FONTS using TTFReader the command window messages indicates it was successful, and the file is ttfcm.xml I did use the -enc ansi otpion. My target customers are using Windows and will have the same Verdana font available locally. Register Fonts with FOP. I took the configuration file that comes with the distribution fop.xconf, and added these elements in the fonts element. fo:inline font-family=Verdana font-weight=normal font-style=normal Verdana-normal-normal font /fo:inline font metrics-url=fle:///C:/unzipped/fop-0.91beta-bin-jdk1.4/fop-0.91beta/ttfcm.xml font-triplet name=Verdana style=normal weight=normal/ /font Tell FOP about the configuration Fop fop = new Fop(MimeConstants.MIME_PDF); DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder(); Configuration cfg = cfgBuilder.buildFromFile( C:/unzipped/fop-0.91beta-bin-jdk1.4/fop- 0.91beta/conf/fop.xconf); FOUserAgent userAgent = fop.getUserAgent(); userAgent.setUserConfig(cfg); For completeness, here is how I am trying to invoke the font within the svg element. g style=font-family: Verdana, sans-serif; font-size: 10pt; stroke: none; fill: black; Any help would be appreciated. Is there a worked example that touches all the aspects? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with multiple font-family values
Title: Problem with multiple font-family values I have a block of text which contains English and Japanese (kanji) characters. I'd like the kanji to be displayed in Arial Unicode with the English characters using Arial Narrow. Using FOP 0.20.5. I've tried various options along the lines of fo:block font-family=ArialNarrow, ArialUni font-selection-strategy=character-by-character English is Arial Narrow. 日本語はゴシックになります /fo:block The first listed font appears to get used. In the above example the English is OK and the kanji glyphs display as squares in the output pdf. With font-family=ArialUni, ArialNarrow the kanji displays OK but the English is also using ArialUni glyphs. I've tried with and without font-selection-strategy. What am I doing wrong? Thanks, Lee Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
Re: Problem with multiple font-family values
[EMAIL PROTECTED] wrote: snip/ The first listed font appears to get used. In the above example the English is OK and the kanji glyphs display as squares in the output pdf. With font-family=ArialUni, ArialNarrow the kanji displays OK but the English is also using ArialUni glyphs. I've tried with and without font-selection-strategy. What am I doing wrong? Font selection strategy simply isn't implemented either in FOP 0.20.5 or FOP 0.91beta. Help is welcome :) Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hello, about fop
Hi, I've been around the installation of trunk's version of FOP, which I've ended up by not being able to use beacuse of my system is too old (libc-2.2, gcc 2.95.3), and the java version you've lately updated to, doesn't run here. Actually, very likely, the only version I'd able to use, would be 0.20.5. The thing is this version doesn't respect my custom footers (the body overrides it), body text doesn't start neither at the same possition when using this footers, etc. So I'm just wondering whether could anyone please tell about other resources? I'd like to be able to generate nice-looking documents, I mean with svg or anyother scalable imaging format, etc. For this time, I'll be publishing in C5 (paper size), don't know whether this would a problem or not. I understand dockbook/XML-XSLT/SGML-DSSSL and it's customization layers as a good way of working, although I'd like an expert to advise me. I'd be working on a pdf output basis or any other format that would be better for a press to work with. I'm within a linux system, and have no troubles at all when starting to learn all over again, tex or any other format any one could advise me as the most proffesional one when dealing with presses (is that how you call those places that actually print out your book, isn't it?), sorry my english anyway. I've been for a while away from any of this, but I do remember there are formats such as dvi, postscript, I know one can have pdf from sgml + jadetex, that one can use it even with dsssl or xslt style-sheets (IIRC). I'd really appreciate, though, if someone could advise when getting into something that's gonna be stable, robust, and is not gonna break any of my work beacuse of thirdy-party dependencies (don't want to bother off anyone, I just mean and independent doc-system), whilst being able to generate good-looking documents as well as dealing with presses, or printing-presses at a highest level, probably a backend for postscript whatever it is, don't really know how it works nowadays. Kind Regards, ___ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.90.1 Servlet
Hello I'm a newbie to FOP. Has anyone used the last FOP 0.90.1 in a servlet... I have found a version of the servlet on the internet but that was for FOP 0.2X days. Many thanks
xslt using fop 0.90.1 to convert xml to rtf
Hello Have servlet to use FOP 0.90.1 to render from fo to pdf from the examples to work. Would anyone with example of how to render xml to rtf using xslt... Would one need to render from xml to fo first and then to rtf. If so is there any standard xslt to render xml to fo? All suggestions much appreciated. Many thanks.
Re: Chinese hyphenation particularity
There's not much else you can do other than to try to handle/work-around everything in XSLT. FOP does not have special code to handle languages like Chinese. We lack the knowledge set in the project team. Every now and then we talk about implementing UAX#14 line breaking but so far nobody had the resources to dive into this. Any help is welcome. On 06.03.2006 10:48:24 Nicolas Lalevee wrote: Hi everybody, I have succeeded in producing a chinese PDF from an XML document via a XSL transformation. There is a last problem. The professional chinese document should not let a chinese character alone on a line. For instance, I have the sentense AZERTYUIO. to render in PDF. FOP (with the patch of the bug 36977 for the trunk version), generate a PDF with : AZERTYUI O. And, for chinese people, that's not a well rendered document. The prefered layout is : AZERTYUIO. (the characters have to be compressed) or AZERTYU (the characters have to be expanded) IO. The only way I found to do so is to force the last three characters of a text to be no-wrap. Here is my XSL template : xsl:template match=text() xsl:variable name=txt xsl:call-template name=string.subst xsl:with-param name=string xsl:call-template name=string.subst xsl:with-param name=string xsl:call-template name=string.subst xsl:with-param name=string select=. / xsl:with-param name=target select='.' / xsl:with-param name=replacement select='.#x200B;' / /xsl:call-template /xsl:with-param xsl:with-param name=target select='\' / xsl:with-param name=replacement select='\#x200B;' / /xsl:call-template /xsl:with-param xsl:with-param name=target select='/' / xsl:with-param name=replacement select='/#x200B;' / /xsl:call-template /xsl:variable xsl:choose xsl:when test=string-length($txt) 3 xsl:value-of select=substring($txt, 1, string-length($txt)-3) / fo:inline wrap-option=no-wrap hyphenate=false keep-together.within-line=always xsl:value-of select=substring($txt, string-length($txt)-2, string-length($txt)) / /fo:inline /xsl:when xsl:otherwise xsl:value-of select=$txt / /xsl:otherwise /xsl:choose /xsl:template And that's a not good solution because some ends of line can be missed. In my XML source document, I can have inline formatting properties, like bold or italic, that makes the text sequence shorter than 3, even if the complete sentense contains more than 3 characters. Is there any other way to handle this hyphenation particularity ? Thanks in advance Nicolas Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: page sequencing for parallel print
Hmm, I don't think that will help Christiane. This doesn't allow you to alternate between two flows. XSL 1.0 only supports one flow per page-sequence. Maybe the flow maps in the upcoming XSL 1.1 might help. But these are not supported by FOP, yet. My suggestion is to render the two editions after each other in two separate page-sequences and then using a PDF post-processor [1] to rearrange the page order inside the document. [1] http://xmlgraphics.apache.org/fop/resources.html#products-pdf On 07.03.2006 00:54:27 Karl Roberts wrote: Check out http://xmlgraphics.apache.org/fop/fo.html#fo-oddeven It'll show you how (basically you set up a fo:page-sequence-master master-name=parallel/ that contains fo:repeatable-page-master-alternatives's for your left and right hand fo:simple-page-master then make your fo:page-sequence master-reference=parallel Cheers Karl -Original Message- From: Christiane Fritze [mailto:[EMAIL PROTECTED] Sent: Tuesday, 7 March 2006 3:54 AM To: fop-users@xmlgraphics.apache.org Subject: page sequencing for parallel print Hi all, for a parallel printed edition I need two different transformations of the same xml-document, which is easily made by means of the 'mode' attribute. Parallel printed means that one version of the text has to be on all odd pages, the other version on all even pages (if you need see below). If two fo:flows in fo:page-sequences were allowed, I could have somthing like this: fo:page-sequence master-reference=allPages force-page-count=auto format=1 ... fo:flow flow-name=bodyPageRight xsl:apply-templates mode=right /fo flow fo:flow flow-name=bodyPageLeft xsl:apply-templates mode=left /fo flow /fo:page-sequence So I need two fo:page-sequences (for the complete strucure of my fo.xsl see below). But how do I have to handle the fo:page-sequence-masters to get an page-alternately rendered text? | page 1 |page 2 | || | | text version one text | same text version two sa | version one text | vers | me text version two same | | ion one text version | text version two same te | | one text version one | xt version two same text | | text version one text | version two same text ve | | page 3 |page 4 | || | | version one text vers | rsion two same text vers | | ion one text version | ion two same text versio | | one text version one | n two same text version | | text version one text | two same text version tw | version one text | vers | o same text version two | and so on... I use FOP 0.91 beta. Thank you in advance for any help. snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Re: Changing logging behavior in an embedded application.
FOP does have a few System.out.println calls in its source code but these are only in places where those are ok, i.e. in command-line handling code IMHO this is not the case with the TTFReader. It tells you about each file it reads and writes. If you convert a couple of files at once this is a little inconvenient. Maybe it should have a silent mode? BTW if you embed the TTF Reader i would prefer getting exceptions when something goes wrong rather than geting null return (and a stack trace in stdout) Eckard Jeremias Maerki [EMAIL PROTECTED] 07.03.2006 08:05 Bitte antworten an fop-users@xmlgraphics.apache.org An fop-users@xmlgraphics.apache.org Kopie Thema Re: Changing logging behavior in an embedded application. Hmm, FOP does not do anything special with warning messages as opposed to debug- or info-level messages. If you managed you reroute all logging to java.util.logger it's a matter of configuring that thing correctly. FOP does have a few System.out.println calls in its source code but these are only in places where those are ok, i.e. in command-line handling code. Your other post about the Verdana font showed that you're not calling FOP's command-line so everything does go through the logging abstraction. Did you specify a logging config file using -Djava.util.logging.config.file= and properly set up the handlers? On 06.03.2006 13:07:23 Tracey Zellmann wrote: Thanks. I had been to that page. I have got a basic solution. I can get everything logged to a java.util.Logger, behaving the way I want. However, I am still getting all the FOP WARNING messages coming to the console. I was able to get a workable solution to that using redirection from the main command that starts my Swing application, 2fopMessages.txt sends all the command warning messages to that file and overwrites each session. However, I would like to find a cleaner approach. Is there a simple way to turn off the logging to the console? - Original Message - From: Jeremias Maerki [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, March 06, 2006 3:52 AM Subject: Re: Changing logging behavior in an embedded application. Apache FOP uses Apache Jakarta Commons Logging as a logging abstraction kit. [1] should give you the basics and has links to further information on configuring logging the way you want it to behave. I hope that helps. [1] http://xmlgraphics.apache.org/fop/0.91/embedding.html#basic-logging On 04.03.2006 20:44:55 Tracey Zellmann wrote: I have dug through what documentation I can find, but it hasn't helped me, so maybe the list can give me some guidance. I have my application running successfully. I am using fop 0.91beta-bin-jdk1.4 It publishes a PDF using FOP within another java application, not from the command line, so I believe you would call it embedded. I need to change the way logging messages are handled. Currently, I am getting a large number of warning messages printed to the console. With Jeremias Maerki's help, I can see they are caused my some namespace issues with some imported svg images I am using from MS Visio. Essentially, they can be ignored, and that is what I have been doing. However, next week, I have to turn this over to the first wave of normal users, so I don't want to overwhelm them with these messages. I would like all messages to go to a log file, not the console. I would prefer that warning level messages go to a file that is typically overwritten, so they don't accumulate. Anything higher than warning should go to another file which does append and accumulates the message history. I am pretty sure I could handle this using Java's java.util.logging API. However, I am not sure how to get hold of and change the current behavior of FOP logging. Can someone illuminate this for me? Thanks. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hello, about fop
So, you can't install at least a JDK 1.3.1? That would seem very odd. Many people work with DocBook and FOP 0.20.5 or FOP 0.91beta and seem to be relatively happy. There are some issues, yes, but the problems you describe are, to my knowledge, not among them. I'm not sure how to help you any further here. On 06.03.2006 23:39:29 chinlu chinawa wrote: Hi, I've been around the installation of trunk's version of FOP, which I've ended up by not being able to use beacuse of my system is too old (libc-2.2, gcc 2.95.3), and the java version you've lately updated to, doesn't run here. Actually, very likely, the only version I'd able to use, would be 0.20.5. The thing is this version doesn't respect my custom footers (the body overrides it), body text doesn't start neither at the same possition when using this footers, etc. So I'm just wondering whether could anyone please tell about other resources? I'd like to be able to generate nice-looking documents, I mean with svg or anyother scalable imaging format, etc. For this time, I'll be publishing in C5 (paper size), don't know whether this would a problem or not. I understand dockbook/XML-XSLT/SGML-DSSSL and it's customization layers as a good way of working, although I'd like an expert to advise me. I'd be working on a pdf output basis or any other format that would be better for a press to work with. I'm within a linux system, and have no troubles at all when starting to learn all over again, tex or any other format any one could advise me as the most proffesional one when dealing with presses (is that how you call those places that actually print out your book, isn't it?), sorry my english anyway. I've been for a while away from any of this, but I do remember there are formats such as dvi, postscript, I know one can have pdf from sgml + jadetex, that one can use it even with dsssl or xslt style-sheets (IIRC). I'd really appreciate, though, if someone could advise when getting into something that's gonna be stable, robust, and is not gonna break any of my work beacuse of thirdy-party dependencies (don't want to bother off anyone, I just mean and independent doc-system), whilst being able to generate good-looking documents as well as dealing with presses, or printing-presses at a highest level, probably a backend for postscript whatever it is, don't really know how it works nowadays. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto align tables to fill width
What you describe is actually something that FOP is supposed to do automatically but so far hasn't learned to do. This is described in [1] for the fixed table layout. At the moment, you probably need to do some calculation in XSLT and add to the column widths yourself. [1] http://www.w3.org/TR/REC-CSS2/tables.html#width-layout On 07.03.2006 00:28:05 Karl Roberts wrote: Hi all, I have some XML that defines TabularData elements, which represent tabular data. In some cases the data can includes information on the column widths in order to guarentee that the data fit's in it. Eg TabularData MetaData !-- mandatory fields from schema -- TableIDfreshmoney/TableID TableTitleFresh Money IDEAs/TableTitle NumColumns5/NumColumns NumRows20/NumRows ColumnTitleRowNum0/ColumnTitleRowNum !-- optional fields from schema -- !-- nb the width should be calculated from fontmetrics, use (num of chars * 0.6 for now) -- Column num=1 width=7.8 text-justify=left/ Column num=2 width=2.6 text-justify=left/ Column num=3 width=3.6 text-justify=right/ Column num=4 width=4.2 text-justify=right/ Column num=5 width=2.4 text-justify=right/ /MetaData Cell xpos=0 ypos=0ColHeader1/Cell Cell xpos=1 ypos=0CH2/Cell Cell xpos=2 ypos=0Col3 Price/Cell Cell xpos=3 ypos=0Header4/Cell Cell xpos=4 ypos=0Head 5/Cell Cell xpos=0 ypos=1Chartered Semiconductor/Cell Cell xpos=1 ypos=1OP/Cell Cell xpos=2 ypos=11.5/Cell Cell xpos=3 ypos=11.29/Cell Cell xpos=4 ypos=116/Cell ... ... /TabularData I have an xsl template that can turn all this into a nice table and if the data contains Column elements I use xsl like this ... fo:table table-layout=fixed width=100% xsl:for-each select=MetaData/Column xsl:sort select=self::node()/@num data-type=number/ fo:table-column column-number={self::node()/@num} column-width={self::node()/@width-in-em}em/ /xsl:for-each fo:table-body ... /fo:table-body ... /fo:table I works fine. However when the table width is greater than the sum of the widths I'd like to widen the columns (or just the first one) to fill the available space. Given that the xsl to produce a table is in a call and hence the table width is given as 100% (of space available to the fo:block/ that it is enclosed inanyone have a clue how to do this? If it helps I'll post the schema and xsl-fo template for the table. Cheers Karl Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xslt using fop 0.90.1 to convert xml to rtf
You're mixing things. You're using XSLT exclusively to convert any XML to XSL-FO. FOP will then intepret the XSL-FO and convert it to the desired target format (PDF, PS, RTF etc.) depending on the parameters you pass in. You should have a look at the embedding examples which is a step-by-step guide how to work with FOP: http://xmlgraphics.apache.org/fop/0.91/embedding.html#examples Note that there cannot be a standard XSLT to convert any XML to XSL-FO. That's simply not possible. Every XSLT is written strictly for one XML format to produce another XML (or text or HTML) format. On 07.03.2006 07:02:48 Cam T wrote: Hello Have servlet to use FOP 0.90.1 to render from fo to pdf from the examples to work. Would anyone with example of how to render xml to rtf using xslt... Would one need to render from xml to fo first and then to rtf. If so is there any standard xslt to render xml to fo? All suggestions much appreciated. Many thanks. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: Changing logging behavior in an embedded application.
You're welcome to improve TTFReader in FOP Trunk if it doesn't do exactly what you want it to do. TTFReader was never designed to be used as anything else than a command-line tool which is called once for each font. If people have additional needs we're gladly accepting patches against FOP Trunk. On 07.03.2006 08:23:56 Eckard_Buchner wrote: FOP does have a few System.out.println calls in its source code but these are only in places where those are ok, i.e. in command-line handling code IMHO this is not the case with the TTFReader. It tells you about each file it reads and writes. If you convert a couple of files at once this is a little inconvenient. Maybe it should have a silent mode? BTW if you embed the TTF Reader i would prefer getting exceptions when something goes wrong rather than geting null return (and a stack trace in stdout) snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]