No space between characters
I have 2 almost identical Polish PDF documents created using FOP. The difference between them is one word (this word is repeated several times in different sections). These documents are created from a template and based on to whom they are directed (M/F), they have the word pana or pani inserted in blank spot (it's mister and miss in Polish). The trouble is that this rather slight change makes the characters mi (every occurence) glue together -- there's no space between them all over the document. I think it's because the ttfreader creates incorect metrics file for the font I use (Humanist). When I change font from Humanist to e.g. Arial everything is ok. Is there anything I could do besides changing the font? I'm using: - fop 0.20.5 - font Humanist (and metrics file created without -enc ansi, because I'm using iso8859-2 characters) - every file is encoded in UTF-8. - both win32 and linux - Adobe Reader 6/7 and GhostView Regards, nikos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No space between characters
Nikos napisa(a): I have 2 almost identical Polish PDF documents created using FOP. The difference between them is one word (this word is repeated several times in different sections). These documents are created from a template and based on to whom they are directed (M/F), they have the word pana or pani inserted in blank spot (it's mister and miss in Polish). The trouble is that this rather slight change makes the characters mi (every occurence) glue together -- there's no space between them all over the document. I think it's because the ttfreader creates incorect metrics file for the font I use (Humanist). When I change font from Humanist to e.g. Arial everything is ok. Is there anything I could do besides changing the font? I have the same problem but fop is sticking some words and does it randomly. I'm using Arial font created from TTF font. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No space between characters
On Jan 19, 2005, at 5:19 AM, Michal Postupalski wrote: Nikos napisa(a): I have 2 almost identical Polish PDF documents created using FOP. The difference between them is one word (this word is repeated several times in different sections). These documents are created from a template and based on to whom they are directed (M/F), they have the word pana or pani inserted in blank spot (it's mister and miss in Polish). The trouble is that this rather slight change makes the characters mi (every occurence) glue together -- there's no space between them all over the document. I think it's because the ttfreader creates incorect metrics file for the font I use (Humanist). When I change font from Humanist to e.g. Arial everything is ok. Is there anything I could do besides changing the font? I have the same problem but fop is sticking some words and does it randomly. I'm using Arial font created from TTF font. It often helps to know the platform, OS, Java version, Java vendor in these cases. In addition, a small snippet of code helps us determine whether or not kerning is on, etc. Could you both give us more information so we can help? Cheers! Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No space between characters
I have 2 almost identical Polish PDF documents created using FOP. The difference between them is one word (this word is repeated several times in different sections). These documents are created from a template and based on to whom they are directed (M/F), they have the word pana or pani inserted in blank spot (it's mister and miss in Polish). The trouble is that this rather slight change makes the characters mi (every occurence) glue together -- there's no space between them all over the document. I think it's because the ttfreader creates incorect metrics file for the font I use (Humanist). When I change font from Humanist to e.g. Arial everything is ok. Is there anything I could do besides changing the font? I have the same problem but fop is sticking some words and does it randomly. I'm using Arial font created from TTF font. It often helps to know the platform, OS, Java version, Java vendor in these cases. In addition, a small snippet of code helps us determine whether or not kerning is on, etc. Could you both give us more information so we can help? JAVA: j2sdk1.4.1_02 (SUN) OS: both Linux and WindowsXP I'm afraid I can't attached now any *.fo file because all documents are my firm's documents. I will try to generate some example file later - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
list in list
Hi all, I have to convert some XML in PDF using XSL-FO and FOP. I have a problem with some XML that have a structure like this: ... - ul lia/li - li - ul lib/li liccc/li lidd/li /ul /li /ul . I tried to consider it as simple lists but it doesn't work. This is the XSL I've tried: xsl:template match=ol|ul fo:list-block space-before=10pt xsl:apply-templates/ /fo:list-block /xsl:template xsl:template match=ul/li fo:list-item start-indent=.5in fo:list-item-label start-indent=.25in space-before=4pt fo:block font-size=10pt#x2022;/fo:block /fo:list-item-label fo:list-item-body fo:block font-size=10ptxsl:apply-templates//fo:block /fo:list-item-body /fo:list-item /xsl:template Any suggestion? Thank you Tommaso - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tidy error
Hello; If this is not an appropriate forum for this please let me know. I would like to use tidy to clean up some input before I render my document with FOP. I am getting the following error: org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:307) Anyone seen this before? Below is the code for anyone that is interested. Thanks, Luke private String htmlTidy(String html) { try { StringBufferInputStream sbis=new StringBufferInputStream(html); ByteArrayOutputStream baos=new ByteArrayOutputStream(); Tidy tidy = new Tidy(); Trace.ENTER(FOP PDF: Tidy object created.); //configure tidy tidy.setQuiet(true); tidy.setShowWarnings(false); tidy.setXmlOut(false); tidy.setXHTML(true); tidy.setMakeClean(false); tidy.setTidyMark(false); tidy.setUpperCaseTags(false); tidy.setUpperCaseAttrs(false); tidy.setQuoteAmpersand(false); tidy.setNumEntities(true); tidy.setCharEncoding(Configuration.UTF8); Trace.ENTER(FOP PDF: Tidy object configured.); tidy.parse(sbis,baos); Trace.ENTER(FOP PDF: Tidy parsing complete.); html = baos.toString(); } catch (Exception e) { Trace.ENTER(FOP PDF: TIDY ERROR! + e); } return html; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Whether this is corret email address where i need to put my queries
Title: list in list Hello, i m in doubt whether this is correct email address tu put my questions.. I had put my doubt on my previous emails and no one has replied or what... it seems to me that whether i am using the correct email address or not. Thanks rgds amit From: Tommaso Taglioni [mailto:[EMAIL PROTECTED]Sent: Wed 1/19/2005 9:37 PMTo: [EMAIL PROTECTED]Subject: list in list Hi all,I have to convert some XML in PDF using XSL-FO and FOP.I have a problem with some XML that have a structure like this:...- ul lia/li- li- ul lib/li liccc/li lidd/li /ul /li/ul.I tried to consider it as simple lists but it doesn't work.This is the XSL I've tried:xsl:template match="ol|ul" fo:list-block space-before="10pt" xsl:apply-templates/ /fo:list-block/xsl:templatexsl:template match="ul/li" fo:list-item start-indent=".5in" fo:list-item-label start-indent=".25in" space-before="4pt" fo:block font-size="10pt"#x2022;/fo:block /fo:list-item-label fo:list-item-body fo:block font-size="10pt"xsl:apply-templates//fo:block/fo:list-item-body/fo:list-item/xsl:templateAny suggestion?Thank youTommaso-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Query
Hi All, I am a newbie to FOP and XML... I need to ask you guys that how to generate XSL for the XML created at run time. and then to create XSL-FO at run time and then to pass it FOP and generate PDF.. If anybody could help me that will be gr8.. thanks in advance rgds amit
Re: Query
Hi Amit; I am also a newbie. I can tell you that a good place to start is the examples section that comes with the FOP download. Specifically the example ExampleXML2FO.java (fop-0.20.5\examples\embedding\java\embedding). Hope that helps, Luke - Original Message - From: Amit Chawla To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:01 PM Subject: Query Hi All, I am a newbie to FOP and XML... I need to ask you guys that how to generate XSL for the XML created at run time. and then to create XSL-FO at run time and then to pass it FOP and generate PDF.. If anybody could help me that will be gr8.. thanks in advance rgds amit
Re: Query
Amit, I agree with Luke. That is a good way to get started. Another great place to look is the FOP Resources page[1] . Hopefully you'll look at the resources FAQ[2] pages before you ask questions--cuts down on the chatter and lets the busy developers get FOP 1.0 out the door! ;-) You might find the answer you're looking for, and feel better about yourself at the same time! Web Maestro Clay [1] http://xml.apache.org/fop/resources.html [2] http://xml.apache.org/fop/faq.html p.s. Thanks for chiming in, Luke! I appreciate it very much and it's a good way to get involved. It's how I started to 'contribute' to FOP! On Jan 19, 2005, at 11:08 AM, Luke Shannon wrote: Hi Amit; I am also a newbie. I can tell you that a good place to start is the examples section that comes with the FOP download. Specifically the example ExampleXML2FO.java (fop-0.20.5\examples\embedding\java\embedding). Hope that helps, Luke - Original Message - From: Amit Chawla To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:01 PM Subject: Query Hi All, I am a newbie to FOP and XML... I need to ask you guys that how to generate XSL for the XML created at run time. and then to create XSL-FO at run time and then to pass it FOP and generate PDF.. If anybody could help me that will be gr8.. thanks in advance rgds amit Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Query
Hi Luke, Thanks for the email reply.. actually i have seen that and what i have understood from it i require XSL file which will transform the xml to XSL-FO... and what is happening in my requirement is that i have to generate HTML at run time and then convert this HTML doc using TIdy to XML/XHTML and then use this to generate PDF I was facing problem with ITEXT as they dont support all the HTML tags and for generating PDF i had to write HTMLparser which i have done and am successful to generate PDF .. ... but the problem is that i am using FCKeditor as my internet editor where i can do formatting of text just like word doc... and it returns me string of html elements .. I have used this string to generate HTML doc and then xml. FCKeditor generates tags and there attributes which are not supported in ITEXT and i have to handle them in my HTML parser. I will lose format of text in my PDF as i am not aware what all tags and attributes FCKeditor will generate at run time.. So i decided to shift to FOP . hoping that it would suffice my needs ... so my situation is i have to parse this xml document which is generated at run time and i feel/think i will require to generate XSL at run time and then using the example i can generate XSL-FO and then set up driver of fop to generate PDF using FOP... Here i m stuck as i am not getting a way to generate XSL at run time... all help appreciated thanks for reply again. regards amit From: Luke Shannon [mailto:[EMAIL PROTECTED] Sent: Thu 1/20/2005 12:38 AM To: [EMAIL PROTECTED] Subject: Re: Query Hi Amit; I am also a newbie. I can tell you that a good place to start is the examples section that comes with the FOP download. Specifically the example ExampleXML2FO.java (fop-0.20.5\examples\embedding\java\embedding). Hope that helps, Luke - Original Message - From: Amit Chawla mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:01 PM Subject: Query Hi All, I am a newbie to FOP and XML... I need to ask you guys that how to generate XSL for the XML created at run time. and then to create XSL-FO at run time and then to pass it FOP and generate PDF.. If anybody could help me that will be gr8.. thanks in advance rgds amit winmail.dat- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Query
I see. I am doing something similar. However, the XSL exists for me. I run this, getting an FO document in string form back. This string contains some HTML within the FO document, which needs to be further convert to FO objects (it is this department I am having my own trouble with). I tried to convert the HTML to FO in the XSL but was unsuccessful. I currently replace certain HTML tags with FO tags and strip the rest in java before I render with FOP. I would like to get Tidy involved at this point but I am getting some errors I have been unable to resolve. I suppose you could do something similar to me in which you looks for specific html tags and replace them with FO tags that perform the same function. Something like digester would allow you to parse the XML getting the contents of the nodes your are interested in. You could then sub out the tags and produce an FO document in memory that could be passed to FOP to generate your document. Honestly though, I'm not the best person to advise you since I have yet to get my own solution working and am not yet very strong in XSL. Luke - Original Message - From: Amit Chawla [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:19 PM Subject: RE: Query Hi Luke, Thanks for the email reply.. actually i have seen that and what i have understood from it i require XSL file which will transform the xml to XSL-FO... and what is happening in my requirement is that i have to generate HTML at run time and then convert this HTML doc using TIdy to XML/XHTML and then use this to generate PDF I was facing problem with ITEXT as they dont support all the HTML tags and for generating PDF i had to write HTMLparser which i have done and am successful to generate PDF .. ... but the problem is that i am using FCKeditor as my internet editor where i can do formatting of text just like word doc... and it returns me string of html elements .. I have used this string to generate HTML doc and then xml. FCKeditor generates tags and there attributes which are not supported in ITEXT and i have to handle them in my HTML parser. I will lose format of text in my PDF as i am not aware what all tags and attributes FCKeditor will generate at run time.. So i decided to shift to FOP . hoping that it would suffice my needs ... so my situation is i have to parse this xml document which is generated at run time and i feel/think i will require to generate XSL at run time and then using the example i can generate XSL-FO and then set up driver of fop to generate PDF using FOP... Here i m stuck as i am not getting a way to generate XSL at run time... all help appreciated thanks for reply again. regards amit _ From: Luke Shannon [mailto:[EMAIL PROTECTED] Sent: Thu 1/20/2005 12:38 AM To: [EMAIL PROTECTED] Subject: Re: Query Hi Amit; I am also a newbie. I can tell you that a good place to start is the examples section that comes with the FOP download. Specifically the example ExampleXML2FO.java (fop-0.20.5\examples\embedding\java\embedding). Hope that helps, Luke - Original Message - From: Amit Chawla mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:01 PM Subject: Query Hi All, I am a newbie to FOP and XML... I need to ask you guys that how to generate XSL for the XML created at run time. and then to create XSL-FO at run time and then to pass it FOP and generate PDF.. If anybody could help me that will be gr8.. thanks in advance rgds amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Query
I bet the dynamic XSL generation would be really a difficult thing if not impossible. Instead I would suggest to know all the HTML tags that FCKeditor generates. I am pretty sure it will be an almost equalent set of normal HTML tags. And once you know the those tags, write XSL templates to convert XML (call it XHTML or HTML in well formed XML format) generated by FCKeditor into FOs, and finally call FOP api to generate PDF. All the best Sai |-+- | | Amit Chawla | | | [EMAIL PROTECTED]| | | lasoft.com | | | | | | 01/19/2005 02:19 PM | | | Please respond to | | | fop-user | | | | |-+- --| | | |To: [EMAIL PROTECTED] | |cc: | |Subject: RE: Query | --| Hi Luke, Thanks for the email reply.. actually i have seen that and what i have understood from it i require XSL file which will transform the xml to XSL-FO... and what is happening in my requirement is that i have to generate HTML at run time and then convert this HTML doc using TIdy to XML/XHTML and then use this to generate PDF I was facing problem with ITEXT as they dont support all the HTML tags and for generating PDF i had to write HTMLparser which i have done and am successful to generate PDF .. ... but the problem is that i am using FCKeditor as my internet editor where i can do formatting of text just like word doc... and it returns me string of html elements .. I have used this string to generate HTML doc and then xml. FCKeditor generates tags and there attributes which are not supported in ITEXT and i have to handle them in my HTML parser. I will lose format of text in my PDF as i am not aware what all tags and attributes FCKeditor will generate at run time.. So i decided to shift to FOP . hoping that it would suffice my needs ... so my situation is i have to parse this xml document which is generated at run time and i feel/think i will require to generate XSL at run time and then using the example i can generate XSL-FO and then set up driver of fop to generate PDF using FOP... Here i m stuck as i am not getting a way to generate XSL at run time... all help appreciated thanks for reply again. regards amit From: Luke Shannon [mailto:[EMAIL PROTECTED] Sent: Thu 1/20/2005 12:38 AM To: [EMAIL PROTECTED] Subject: Re: Query Hi Amit; I am also a newbie. I can tell you that a good place to start is the examples section that comes with the FOP download. Specifically the example ExampleXML2FO.java (fop-0.20.5\examples\embedding\java\embedding). Hope that helps, Luke - Original Message - From: Amit Chawla mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:01 PM Subject: Query Hi All, I am a newbie to FOP and XML... I need to ask you guys that how to generate XSL for the XML created at run time. and then to create XSL-FO at run time and then to pass it FOP and generate PDF.. If anybody could help me that will be gr8.. thanks in advance rgds amit (See attached file: winmail.dat) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] attachment: winmail.dat- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Image Resolution
If I specify one of the dimensions of an external image should this not ensure that the resolution used in the PDF will be the same as the orginal? I am trying to use a hi rez image as my header, however it looks like it is being written as 72dpi in the document, even though I specify the width. Below is my code. The FAQ page contains the following quote: The explanation above describes only the basic default behavior. There are other attributes of the fo:external-graphic element that can affect the behavior described above. Is there more details on this somewhere? Thanks, Luke fo:block fo:external-graphic src=url(file:///usr/tomcat/ac/images/topbanner/nakheel_BL_pdf_panel.gif) width=1125px scaling=uniform/ /fo:block - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image Resolution
Luke, Resolution is a tough nut. You can find more info on the FOP Graphics page[1]. A couple of patient people have done tons of testing, which you can find in the archives from a year or two ago. The way I got high quality was to create a 300dpi logo image that was larger than I needed, then specified width height attributes that required the image shrink to fit. It's not an exact science, unfortunately. [1] http://xml.apache.org/fop/graphics.html On Jan 19, 2005, at 11:50 AM, Luke Shannon wrote: If I specify one of the dimensions of an external image should this not ensure that the resolution used in the PDF will be the same as the orginal? I am trying to use a hi rez image as my header, however it looks like it is being written as 72dpi in the document, even though I specify the width. Below is my code. The FAQ page contains the following quote: The explanation above describes only the basic default behavior. There are other attributes of the fo:external-graphic element that can affect the behavior described above. Is there more details on this somewhere? Thanks, Luke fo:block fo:external-graphic src=url(file:///usr/tomcat/ac/images/topbanner/ nakheel_BL_pdf_panel.gif) width=1125px scaling=uniform/ /fo:block - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image Resolution
The shrinking idea is a good one. I'll give that a try. Thanks, Luke - Original Message - From: The Web Maestro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:55 PM Subject: Re: Image Resolution Luke, Resolution is a tough nut. You can find more info on the FOP Graphics page[1]. A couple of patient people have done tons of testing, which you can find in the archives from a year or two ago. The way I got high quality was to create a 300dpi logo image that was larger than I needed, then specified width height attributes that required the image shrink to fit. It's not an exact science, unfortunately. [1] http://xml.apache.org/fop/graphics.html On Jan 19, 2005, at 11:50 AM, Luke Shannon wrote: If I specify one of the dimensions of an external image should this not ensure that the resolution used in the PDF will be the same as the orginal? I am trying to use a hi rez image as my header, however it looks like it is being written as 72dpi in the document, even though I specify the width. Below is my code. The FAQ page contains the following quote: The explanation above describes only the basic default behavior. There are other attributes of the fo:external-graphic element that can affect the behavior described above. Is there more details on this somewhere? Thanks, Luke fo:block fo:external-graphic src=url(file:///usr/tomcat/ac/images/topbanner/ nakheel_BL_pdf_panel.gif) width=1125px scaling=uniform/ /fo:block - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet - 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: Query
Dear Luke, hey buddy first of all let me convey that no one is best or bad .. everyone is gr8 and are good... so any help for anyone is helpful.. Tidy i feel is tool to clean up HTML and convert it into XML/XHTML and i feel it will not do that for FO ..or will does it... Secondly ur scenerio that u have re convert HTML elements in FO to FO... Why does FO has Html elements left over as ur XSL should convert it to all FO... why dont u modify the XSL u have to have full FO. Other wise in ur case u have to have new XSL which will handle ur FO objects also... and convert all into FO. Yes i saw Digester too and then i realised its good component if i have knowledge of format in advance as it will gives me events or what if it encountered some tag or something.. and accordingly generate PDF. But in my case i dont have advance knowledge and anythig can come at run time as FCK editor is javascript based editor and generates HTML strings.. if i had this information my 90% work is already done using ITEXT... i am successful in generating PDF and i believe if you have to do something on some event or what ITEXT is best as it gives you APIs to do sometghing as example if u encountered TD u can addcell in PDFTable or what. Thanks regards Amit From: Luke Shannon [mailto:[EMAIL PROTECTED] Sent: Thu 1/20/2005 1:06 AM To: [EMAIL PROTECTED] Subject: Re: Query I see. I am doing something similar. However, the XSL exists for me. I run this, getting an FO document in string form back. This string contains some HTML within the FO document, which needs to be further convert to FO objects (it is this department I am having my own trouble with). I tried to convert the HTML to FO in the XSL but was unsuccessful. I currently replace certain HTML tags with FO tags and strip the rest in java before I render with FOP. I would like to get Tidy involved at this point but I am getting some errors I have been unable to resolve. I suppose you could do something similar to me in which you looks for specific html tags and replace them with FO tags that perform the same function. Something like digester would allow you to parse the XML getting the contents of the nodes your are interested in. You could then sub out the tags and produce an FO document in memory that could be passed to FOP to generate your document. Honestly though, I'm not the best person to advise you since I have yet to get my own solution working and am not yet very strong in XSL. Luke - Original Message - From: Amit Chawla [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:19 PM Subject: RE: Query Hi Luke, Thanks for the email reply.. actually i have seen that and what i have understood from it i require XSL file which will transform the xml to XSL-FO... and what is happening in my requirement is that i have to generate HTML at run time and then convert this HTML doc using TIdy to XML/XHTML and then use this to generate PDF I was facing problem with ITEXT as they dont support all the HTML tags and for generating PDF i had to write HTMLparser which i have done and am successful to generate PDF .. ... but the problem is that i am using FCKeditor as my internet editor where i can do formatting of text just like word doc... and it returns me string of html elements .. I have used this string to generate HTML doc and then xml. FCKeditor generates tags and there attributes which are not supported in ITEXT and i have to handle them in my HTML parser. I will lose format of text in my PDF as i am not aware what all tags and attributes FCKeditor will generate at run time.. So i decided to shift to FOP . hoping that it would suffice my needs ... so my situation is i have to parse this xml document which is generated at run time and i feel/think i will require to generate XSL at run time and then using the example i can generate XSL-FO and then set up driver of fop to generate PDF using FOP... Here i m stuck as i am not getting a way to generate XSL at run time... all help appreciated thanks for reply again. regards amit _ From: Luke Shannon [mailto:[EMAIL PROTECTED] Sent: Thu 1/20/2005 12:38 AM To: [EMAIL PROTECTED] Subject: Re: Query Hi Amit; I am also a newbie. I can tell you that a good place to start is the examples section that comes with the FOP download. Specifically the example ExampleXML2FO.java (fop-0.20.5\examples\embedding\java\embedding). Hope that helps, Luke - Original Message - From: Amit Chawla mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:01 PM Subject: Query Hi All, I am a newbie to FOP and XML... I need to ask you guys that how to generate XSL for the XML created at run time. and then to create XSL-FO at run time and then to pass it FOP and generate PDF.. If anybody could help me that will be
Re: Image Resolution
It worked in a pinch (if you call 300,000 PDFs/month for a couple of years a 'pinch' ;-)). Keep in mind that content-width content-height are not implemented in FOP... At least not yet! On Jan 19, 2005, at 11:58 AM, Luke Shannon wrote: The shrinking idea is a good one. I'll give that a try. Thanks, Luke - Original Message - From: The Web Maestro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 2:55 PM Subject: Re: Image Resolution Luke, Resolution is a tough nut. You can find more info on the FOP Graphics page[1]. A couple of patient people have done tons of testing, which you can find in the archives from a year or two ago. The way I got high quality was to create a 300dpi logo image that was larger than I needed, then specified width height attributes that required the image shrink to fit. It's not an exact science, unfortunately. [1] http://xml.apache.org/fop/graphics.html On Jan 19, 2005, at 11:50 AM, Luke Shannon wrote: If I specify one of the dimensions of an external image should this not ensure that the resolution used in the PDF will be the same as the orginal? I am trying to use a hi rez image as my header, however it looks like it is being written as 72dpi in the document, even though I specify the width. Below is my code. The FAQ page contains the following quote: The explanation above describes only the basic default behavior. There are other attributes of the fo:external-graphic element that can affect the behavior described above. Is there more details on this somewhere? Thanks, Luke fo:block fo:external-graphic src=url(file:///usr/tomcat/ac/images/topbanner/ nakheel_BL_pdf_panel.gif) width=1125px scaling=uniform/ /fo:block - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet - 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] Web Maestro Clay -- [EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/ My religion is simple. My religion is kindness. - HH The 14th Dalai Lama of Tibet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Different Renderers...
My application currently renders a PDF document in the AWTRenderer. Often times, these documents are quite large and use more memory than is available to the clients machine. One feature we must provide is this ability to save a PDF. My question is this, is there anyway to quickly and efficiently pipe the PDF information that was already transformed to be displayed in the AWTRenderer to file, or do I have to do another transformation? Thanks! AR.
Re: Image callback for each page?
Irv Salisbury III wrote: I apologize if I came across as accusational. No problem, I just thought I should supply some background. I was trying to understand the code so I knew the ramifications of creating a REST style interface for my dynamically generated images. You have answered my question. There's more, see below. It seemed like most of the readers would read the image into memory. So, one thought on an enhancement might be to always read the bytes in from the URL and then just hand that off instead of opening the URL again. A simple solution which may run into ressource problems for high resolution bitmaps, where you have to keep both the raw data as well as the processed image object in memory. Of course, this doesn't allow for future enhancements where it doesn't need to read the whole thing into memory. If I implement somethign like this, I would happily donate it back. Thanks, There are further considerations regarding image data retrival, which have been left to implementors by the FO spec. The same URL for retrieving an image may be used in several external-graphic FOs, and the same external-graphic FO may be rendered multiple times (as a child of static content, or if pulled into static content by a marker reference). This begs the question of how often the URL is accessed, with three obvious general strategies: - exactly once per unique URL in the whole FO document - exactly once per external-graphic FO - each time an external-graphic FO is rendered Independent image caching complicates the issue: image data may be discarded from the cache and retrieved again later. Technical issues like layout backtracking and out-of-order rendering of pages add further complexity. A special case may be an output format which doesn't require retrieving content at all (think of SVG where the FO URLs are copied through to the XLinks). Have fun J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image Resolution
Luke Shannon wrote: If I specify one of the dimensions of an external image should this not ensure that the resolution used in the PDF will be the same as the orginal? I am trying to use a hi rez image as my header, however it looks like it is being written as 72dpi in the document, even though I specify the width. Any resolution metadata in a bitmapped image is ignored by FOP. The image code first gets hw in pixel, the computes hw in 1/1000 pt by assuming 72dpi. If this fits in the area, the image is shown exactly at this resolution. If the image would overflow the area, it is shrunk to fit while keeping the aspect ratio. If the area measurements are determined by an explicit height and/or width specification, and the image was smaller than the area, it is stretched to fit. If only one of height or width has been specified and the other dimension is determined by the parent area, the image is stretched to fit the area in the specified dimension while keeping the aspect ratio, which may overflow in the other dimension and cause all kind of havoc. If both height and width are specified, the image is scaled to fit without caring for the aspect ratio. If you specify the height and/or width and you know the image size in pixels, you can calculate the dimension (at least for non-bitmapped output formats). For example, a 1000x1000 image used in fo:external-graphics width=2in height=4in src=foo.img/ will be stretched and rendered at 500dpi in x direction and 250dpi in y direction. Note there are problems with images in static content. As a rule of thumb you will not hit them for the common case of images in the region-before and -after if you keep the extent of the body region larger than the extent of the other regions. Note that these rules apply to bitmap images only. The rules for SVG, either in fo:external-graphic and fo:instream-foreign-object, are different and quite a bit more obscure. As a rule of thumb, always specify *both* height and width on both the FO and the SVG document element, be sure to use identical height and width for the two specifications, and don't use pixels. For example fo:instream-foreign-object height=5cm width=8cm svg:svg height=5cm width=8cm ... should almost work as expected, while omitting or using different measurements on the elements is likely to produve unexpected results, in particular the SVG may be clipped (bitmap images are *never* clipped). J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]