AW: Setting configuration of fonts in java code?
Hello, I'm working my way through the src code of FOP in order to find a way to configure the font setup in the java code. But this seems rather difficult. The org.apache.fop.configuration.FontInfo object gives me the possibility to insert the font names and stuff but I cannot insert the metric file directly because only the path is taken there. Is there a way to do this ? URL url = new URL(http://localhost:90/nbw06/xml/ttfcm.xml;); conn = url.openConnection(); metricFile = conn.getInputStream(); URL url2 = new URL2(http://localhost:90/nbw06/xml/verdana.ttf;); Conn2 = url.openConnection(); embedFile= conn2.getInputStream(); FontTriplet fontTrip1 = new FontTriplet(Verdana,normal,bold); FontTriplet fontTrip2 = new FontTriplet(Verdana,normal,normal); LinkedList l = new LinkedList(); l.add(fontTrip1); l.add(fontTrip2); FontInfo fontInf = new FontInfo(Verdana, metricFile ,false,l, embedFile); //And Notify FOP of additional font ?? Cheers, Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Setting configuration of fonts in java code?
On Sep 1, 2006, at 10:49, Peter Neu wrote: Hi, I'm working my way through the src code of FOP in order to find a way to configure the font setup in the java code. But this seems rather difficult. The org.apache.fop.configuration.FontInfo object gives me the possibility to insert the font names and stuff but I cannot insert the metric file directly because only the path is taken there. Re-reading your original problem: wouldn't the solution be to use relative URIs? If you can make sure the relative locations are the same on both platforms, then only the fontBaseDir would have to be defined separately --which seems much easier... HTH! Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: Setting configuration of fonts in java code?
Hm, is this possible? When fop reads the userconfig.xml, where is the base directory? The application runs in tomcat so I don't know where to put the base dir. File system looks like this ROOT |WEB-INF ||classes | |XML |--- userconfig.xml |--- verdana.ttf |--- ttfcm.xml -Ursprüngliche Nachricht- Von: Andreas L Delmelle [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 1. September 2006 10:57 An: fop-users@xmlgraphics.apache.org Betreff: Re: AW: Setting configuration of fonts in java code? On Sep 1, 2006, at 10:49, Peter Neu wrote: Hi, I'm working my way through the src code of FOP in order to find a way to configure the font setup in the java code. But this seems rather difficult. The org.apache.fop.configuration.FontInfo object gives me the possibility to insert the font names and stuff but I cannot insert the metric file directly because only the path is taken there. Re-reading your original problem: wouldn't the solution be to use relative URIs? If you can make sure the relative locations are the same on both platforms, then only the fontBaseDir would have to be defined separately --which seems much easier... HTH! Andreas - 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]
number-page-citation math...
I've an id on a block in the document. I've a page-number-citation... and it works. Now, i just need to adjust the page that the reference gives to one page less... something like fo:page-number-citation id-ref='sum(reference,-1)' / Or something like that... is there a way to do this? Thanx in advance, Luis Ferro -- View this message in context: http://www.nabble.com/number-page-citation-math...-tf2202096.html#a6097149 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: number-page-citation math...
XSL-FO doesn't provide anything that would let you do that. I wonder why you want a different page number than the one you are referring to. On 01.09.2006 13:44:46 Luis Ferro wrote: I've an id on a block in the document. I've a page-number-citation... and it works. Now, i just need to adjust the page that the reference gives to one page less... something like fo:page-number-citation id-ref='sum(reference,-1)' / Or something like that... is there a way to do this? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: number-page-citation math...
-Original Message- From: Luis Ferro [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 1:45 PM I've an id on a block in the document. I've a page-number-citation... and it works. Now, i just need to adjust the page that the reference gives to one page less... something like fo:page-number-citation id-ref='sum(reference,-1)' / Or something like that... is there a way to do this? Hi Luis, sum() is not a xsl-fo function, but a xpath function. Therefore, you cannot use it in a fo tag. IMHO, you should have a 2 pass approach to do that. Fortunately, Jeremias just described howto in this list yesterday: see [1]. [1] http://marc.theaimsgroup.com/?l=fop-userm=11570323077w=2 HTH, Pascal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ant task
It must have something to do with a file that is not found since it only happens in the one path to FOP. This path has only the files I need for my batch file to run and is missing several jar files that the other more complete path has. If I get some extra time I will try to add jar files one by one to the folder and see when it starts working. Thanks, Rick -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 5:24 AM To: fop-users@xmlgraphics.apache.org Subject: Re: ant task That's weird. Looking at the code, this NullPointerException should not happen. There are guards against it. Or maybe I missed something. Anyway, I can't reproduce it. Shrug. On 31.08.2006 23:04:33 Rick Roen wrote: Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: number-page-citation math...
Just my $0.02, but I dislike usage of the deprecated XSL-FO. The difference between XSL and XSLT are pretty well-understood today. Glen Jeremias Maerki wrote: XSL-FO doesn't provide anything that would let you do that. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tables or no tables
On Sep 1, 2006, at 16:12, Niek van Elck wrote: I’m quite new to the xsl-fo subject, allthough i have build a couple of pdf reports using xsl-fo. I have encountered some limitations on fo:table The book xsl-fo from o’reilly says there are so many other ways to represent data than the use of tables. The only thing missing is what the other ways are.. Absolute-positioned block-containers, inline-containers(*), list- blocks... Really depends on what the precise requirements are. What limitations are bugging you exactly? (*) inline-containers are currently not yet implemented in FOP Is there anyone who can push me in the right direction? Well, did I? If not, it would help us if you could be more precise about the intended result. I'm sure there are a lot of people around here who would gladly offer you examples. HTH! Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tables or no tables
Niek, I have been using FOP for about six months and I have not found a way better than tables yet. With HTML I could specify a width of a span element and make if right or left aligned, however I dont know of a way to do this with FOP so I am left with tables. With FOP I dont think there is the admonition against using tables that there is with CSS. I dont really understand if from CSS anyway since the fact that tables are still widely used for layout demonstrates that they are a practical way of achieving a layout goal. Ill be interested to see if some other user has some practical alternative. Regards, Rick From: Niek van Elck [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 7:13 AM To: fop-users@xmlgraphics.apache.org Subject: tables or no tables Dear FOP users, Im quite new to the xsl-fo subject, allthough i have build a couple of pdf reports using xsl-fo. I have encountered some limitations on fo:table The book xsl-fo from oreilly says there are so many other ways to represent data than the use of tables. The only thing missing is what the other ways are.. Is there anyone who can push me in the right direction? Many thanks in advance. Niek van Elck
Re: tables or no tables
On Sep 1, 2006, at 16:27, Rick Roen wrote: Hi, Just FYI: With HTML I could specify a width of a span element and make if right or left aligned, however I don’t know of a way to do this with FOP In principle, all you'd need is an inline-container... but as indicated, these are unfortunately NYI in FOP. :( Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.20.5
Hello! I am new to XSL and FOP. I am working on upgrading an existing web application to use JDK 5.0 instead of JDK 1.3.1. One of the modules is using FOP. So, I upgraded this to FOP 0.20.5. Basically, this module renders a Printer Friendly version of a report as a PDF on the website by taking in an XML and converting it to a PDF using an XSL:FO document. It is working currently but when I upgrade to FOP 0.20.5 (including JDK 5.0, Resin 3.0), Acrobat throws an error saying that the document is damaged and cannot be repaired. What could be causing this? I verified that running FOP from the command line works fine and the generated PDF is valid. It is only when I try to render it from the web application that Acrobat throws this error. I have Acrobat 6.0 on my machine and I am able to open the PDF that is generated by running FOP from the command line. Thanks in advance! coderiyer -- View this message in context: http://www.nabble.com/FOP-0.20.5-tf2203526.html#a6101867 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.20.5
Not sure. Check out the following links for clues and ideas to identify the problem: http://marc.theaimsgroup.com/?t=11326786833r=1w=2 http://marc.theaimsgroup.com/?t=11271484394r=1w=2 Good luck! Let us know when you find out. On 01.09.2006 18:21:14 coderiyer wrote: Hello! I am new to XSL and FOP. I am working on upgrading an existing web application to use JDK 5.0 instead of JDK 1.3.1. One of the modules is using FOP. So, I upgraded this to FOP 0.20.5. Basically, this module renders a Printer Friendly version of a report as a PDF on the website by taking in an XML and converting it to a PDF using an XSL:FO document. It is working currently but when I upgrade to FOP 0.20.5 (including JDK 5.0, Resin 3.0), Acrobat throws an error saying that the document is damaged and cannot be repaired. What could be causing this? I verified that running FOP from the command line works fine and the generated PDF is valid. It is only when I try to render it from the web application that Acrobat throws this error. I have Acrobat 6.0 on my machine and I am able to open the PDF that is generated by running FOP from the command line. Thanks in advance! coderiyer -- View this message in context: http://www.nabble.com/FOP-0.20.5-tf2203526.html#a6101867 Sent from the FOP - Users forum at Nabble.com. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: number-page-citation math...
sum() is not a xsl-fo function, but a xpath function. I was thinking of something in the line of the rgb-icc function but that would allow some simple math be applied to all items that return values... be it a page number, a border thickness, a font size or anything like that. IMHO, you should have a 2 pass approach to do that. Possibly the best... but alas... no time for it now... for time is up and later on i will be delivering whatever i can reference directly... LF -- View this message in context: http://www.nabble.com/number-page-citation-math...-tf2202096.html#a6108384 Sent from the FOP - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]