RE: Footer placement...
Thanks Chris. Will try out your suggestion and get back to the list of the outcome. Anil. -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 8:46 PM To: [EMAIL PROTECTED] Subject: Re: Footer placement... Anil R. Pinto wrote: snip/ But with the marker approach I noticed that the footer area has to be allocated to the other pages (using the layout and region-after values applicable to the pages) irrespective. So, untimately although no footer is printed on the middle pages, the area is consumed by a blank portion and so paper will not really be saved (the main intention of this exercise :-) ) Sounds to me like you can fulfill your requirement using a footnote. A footnote only takes up space if present. So just put a footnote in your last paragraph and it should appear at the bottom of the last page. No need to define a region-after. The only problem with footnotes is that they are a bit buggy in current version of FOP. Certain scenarios may produce strange effects, e.g. if last paragraph in document happens to be at bottom of page, then there will be room for footnote. What should happen is FOP should move last paragraph to next page along with footnote, but I dont think this works. Chris - 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]
Footer placement...
Hi all, I have a requirement to print the footer only within the LAST page (along with body continued from previous pages) as shown below ---Page 1 -- Body details ---Page 1 -- ---Middle Page 1 --- Body details continued . ---Middle Page 1 --- .. subsequent pages .. ---Middle Page N Body details continued . ---Middle Page N ---Last Page Body details continued . FOOTER Information ---Last Page - Generally this functionality would need the use of the following fo:repeatable-page-master-alternatives fo:conditional-page-master-reference page-position=first master-reference=first/ fo:conditional-page-master-reference page-position=rest master-reference=rest/ fo:conditional-page-master-reference page-position=last master-reference=last/ /fo:repeatable-page-master-alternatives But it seems that the [page-position=last] feature has not yet been implemented, and I need a way to do the above in the absence of this feature. Any help in this direction is greatly appreciated. thanks for your time, Anil. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MICR font in FOP as an embedded application..
Thanks guys, As the userconfig xml within the jar s not being used, I guess I'll stick to the approach mentioned by Saptarshi, which hapens to also be the one suggested on the Apache FOP website, except one thing, in the embedded mode we need to use the org.apache.fop.apps.Options class that represents the '-c' switch used for the command line option. If anyone has any other approach I'll be more than happy to hear from them. Thanks everyone. Anil -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 7:35 PM To: [EMAIL PROTECTED] Subject: Re: MICR font in FOP as an embedded application.. Anil R. Pinto wrote: snip/ But, the main requirement is to use this behavior with FOp running as an embeded application (using fop.jar). Can someone please guide me to a thread that covers this ? How to use a config file in an embedded environment is described on the website: http://xml.apache.org/fop/embedding.html#config-external I am lost as to where should the custom font-metrics xml and userconfig.xml file reside when using the standard fop.jar (as the userconfig.xml already exists in the jar) Yes, there is indeed a userconfig.xml in FOP.jar, but its not used! snip/ Chris - 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: MICR font in FOP as an embedded application..
Hi Saptarshi, Hmmm... yes your application need uses the CommanLineOptions class that's why u mentioned the -c switch. Well, in my case the process of PDF generation is simple - XML + XSL = PDF, in which I have to introduce MICR fonts and I guess the org.apache.fop.apps.Options will work for me. But good to know about the CommandLineOptions class, never know when I may need it. thanks, Anil. -Original Message- From: Saptarshi Sen [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 12:12 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: MICR font in FOP as an embedded application.. Hi Anil, We are using FOP to convert SVG images - FO - PDF. After forming the FO file, we issue a command to FOP to convert it to a PDF. The call to FOP goes somewhat like this: String[] args = new String[]{-c, userConfigFile, -fo, inputFile, -pdf, outputFile}; try { CommandLineOptions options = new CommandLineOptions(args); Starter starter = options.getStarter(); starter.run(); } catch (FOPException fopEx) { } catch (FileNotFoundException fnfEx) { } Here, userConfigFile, inputFile and outputFile are the paths of the respective files. If you check the Fop.java source code, it does a similar thing in it's main() method. Regards, Saptarshi. -Original Message- From: Anil R. Pinto [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 10:29 AM To: [EMAIL PROTECTED] Subject: RE: MICR font in FOP as an embedded application.. Thanks guys, As the userconfig xml within the jar s not being used, I guess I'll stick to the approach mentioned by Saptarshi, which hapens to also be the one suggested on the Apache FOP website, except one thing, in the embedded mode we need to use the org.apache.fop.apps.Options class that represents the '-c' switch used for the command line option. If anyone has any other approach I'll be more than happy to hear from them. Thanks everyone. Anil -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 7:35 PM To: [EMAIL PROTECTED] Subject: Re: MICR font in FOP as an embedded application.. Anil R. Pinto wrote: snip/ But, the main requirement is to use this behavior with FOp running as an embeded application (using fop.jar). Can someone please guide me to a thread that covers this ? How to use a config file in an embedded environment is described on the website: http://xml.apache.org/fop/embedding.html#config-external I am lost as to where should the custom font-metrics xml and userconfig.xml file reside when using the standard fop.jar (as the userconfig.xml already exists in the jar) Yes, there is indeed a userconfig.xml in FOP.jar, but its not used! snip/ Chris - 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]
MICR font in FOP as an embedded application..
Hi, I have a need to create MICR type fonts within PDF document produced by FOP (0.20.3). I was able to do that using FOP through the command line. Following all the steps as mentioned in http://xml.apache.org/fop/fonts.html I ran the FOP command to create the font-metrics xml file and referenced it within the conf/userconfig.xml and FOP successfully integrated the font in the PDF output. But, the main requirement is to use this behavior with FOp running as an embeded application (using fop.jar). Can someone please guide me to a thread that covers this ? I am lost as to where should the custom font-metrics xml and userconfig.xml file reside when using the standard fop.jar (as the userconfig.xml already exists in the jar) If anyone can help in his regard I'll really appreciate it. thanks for your time. Anil. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: MICR font in FOP as an embedded application..
-Original Message- From: Anil R. Pinto [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 6:35 PM To: Saptarshi Sen Subject: RE: MICR font in FOP as an embedded application.. Saptarshi, Thanks a bunch for the quick reply. I had a few doubts though. Do the font-metrics xml and userconfig xml files have to be external to the fop.jar ? Is it possible that the fop.jar itself already contains the required files (font metrics xml and modified userconfig.xml) and those can be picked up implicitly by the FOP classes ? Can anyone in the FOP development team throw some light on the above requirement ? I want to avoid having any external dependencies (in this case a separate folder containing the font metrics and userconfig xmls). Once again Saptarashi thanks for the quick response :-) Anil. -Original Message- From: Saptarshi Sen [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 6:02 PM To: [EMAIL PROTECTED] Subject: RE: MICR font in FOP as an embedded application.. Hi Anil, We're using custom fonts in our application which uses FOP ver 0.20.5 embedded within it. 1. We store the font files (xml and ttf) in some directory (say c:\myFonts). 2. The userconfig.xml file has a key called fontBaseDir. Specify the value for this key as c:\myFonts. 3. Also register your custom fonts by making entries in userconfig.xml (similar to what exists for the standard fonts). 4. In your application, issue the command to FOP specifying the location of this userconfig.xml file (using the -c switch). Hope this helps. Regards, Saptarshi. -Original Message- From: Anil R. Pinto [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 5:49 PM To: [EMAIL PROTECTED] Subject: MICR font in FOP as an embedded application.. Hi, I have a need to create MICR type fonts within PDF document produced by FOP (0.20.3). I was able to do that using FOP through the command line. Following all the steps as mentioned in http://xml.apache.org/fop/fonts.html I ran the FOP command to create the font-metrics xml file and referenced it within the conf/userconfig.xml and FOP successfully integrated the font in the PDF output. But, the main requirement is to use this behavior with FOp running as an embeded application (using fop.jar). Can someone please guide me to a thread that covers this ? I am lost as to where should the custom font-metrics xml and userconfig.xml file reside when using the standard fop.jar (as the userconfig.xml already exists in the jar) If anyone can help in his regard I'll really appreciate it. thanks for your time. Anil. - 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: Using Xalan Transformer with FOP Driver problem
Thanks Ryan, it works now !!! In fact when you said that this problem was not there in FOP 0.20.3 I tried that first :-) and it worked. Once I knew it did I went ahead to experiment with FOP 0.20.1 And the fix you suggested worked. So the code, just for reference (to others who may need it at a later time) is import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; import javax.xml.transform.sax.*; import org.apache.fop.apps.Driver; import org.apache.fop.apps.StreamRenderer; import org.apache.fop.fo.FOTreeBuilder; public class TestXml { public static void main(String[] args) { try { // XML Will eventually be a Java String or Stream from another source. StreamSource xmlsource = new StreamSource(new FileReader(simple.xml)); Driver driver =new Driver(); FileOutputStream fos = new FileOutputStream(simple.pdf); driver.setOutputStream(fos); driver.setRenderer(Driver.RENDER_PDF); // Fix : ADDED this code as suggested by Ryan to work with FOP 0.20.1 (yeah, not required by FOP 0.20.3) StreamRenderer x = new StreamRenderer(fos, driver.getRenderer()); ((FOTreeBuilder) driver.getContentHandler()).setStreamRenderer(x); // Fix ends Transformer transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(new FileReader(simple.xsl))); // Previously threw error without above 2 line Fix transformer.transform(xmlsource, new SAXResult(driver.getContentHandler())); //For test purposes only //transformer.transform(xmlsource, new StreamResult(System.out)); } catch (Exception e) { e.printStackTrace(); } } } Ryan, Mehmood I really appreciate your help guys. It did help. Anil. -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] Sent: Friday, June 21, 2002 2:56 PM To: [EMAIL PROTECTED] Subject:Re: Using Xalan Transformer with FOP Driver problem I use 0.20.1 also with SAX events. I had to add this to get rid of the null pointer: //Hack fix for FOP bug. Might be unnecessary in FOP 0.20.3. StreamRenderer x = new StreamRenderer(outputStream, pdfDriver.getRenderer()); ((FOTreeBuilder)pdfDriver.getContentHandler ()).setStreamRenderer(x); Hope this helps, -Ryan
RE: Re: Acrobat pictograms and document summary
Does this tool actually allow changes to the PDF after it has been created ? You mentioned postprocess the PDF generated by FOP, so I was just curious. If it does that is great. But, does FOP not allow (or rather will it not support these) document summary features even in the future realeases. thanks, Anil. -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] Sent: Wednesday, May 15, 2002 2:04 AM To: [EMAIL PROTECTED] Subject:Re: Re: Acrobat pictograms and document summary Thanks a lot! We'll try it. J.Pietschmann [EMAIL PROTECTED] schrieb am 14.05.2002, 21:06:02: [EMAIL PROTECTED] wrote: Another problem is the document summary of the Acrobat Reader. How can I fill in these fields? You can postprocess the PDF generated by FOP with another tool, like iText http://www.lowagie.com/iText/ J.Pietschmann