RE: XMLParser error with unicode characters in XML file.
I had a similar problem. I am writing to a file using the following code: File outputDir = new File(outputPath); outputDir.mkdir(); String foFile = outputPath + "/image.fo"; log.debug("Writing to file " + foFile); FileOutputStream fileoutstream = new FileOutputStream(foFile); Writer writer = new OutputStreamWriter(fileoutstream, "utf8"); writer.write(foDoc.toString().trim()); writer.close(); The important part of the code is writing to the file using utf8 encoding. Vinuta Nagaraddi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 5:28 PM To: [EMAIL PROTECTED] Cc: fop-dev@xml.apache.org Subject: XMLParser error with unicode characters in XML file. I am getting a XML parsing error from weblogic.apache.xerces when I parse a XML document which contains accented characters. This is what I am doing 1) Some database columns have accented data for spanish,japanese etc languages like NÃmero de identificaÃÃo: and nÃmero de identificaciÃn. 2) I am reading this data and creating a XML file using some processing and then writing the file on the disc using weblogic.xml.stream.XMLOutputStream flush() method. 3) Then I am using FOP to render this XML in PDF. In the rendering process the weblogic.apache.xerces.XMLparser gets called to parse the XML. Here the parser throws a org.xml.sax.SAXParserException ( An invalid XML character (Unicode: 0xfa) was found in the element content of the document). I was under the impression that XMLParser should take care of the accented characters. When I open the XML file which I created in XML SPY I see "box" characters like "cliente nï de identificaciò". Please let me know how should i handle my code here. Thanks Manoj Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: instream-foreign-object vertical alignment
I was able to accomplish vertical alignment by using display-align in the table-cell. I didn’t specify the vertical-align attribute. Vinuta Nagaraddi -Original Message- From: Rea, Matthew [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 06, 2004 2:52 AM To: '[EMAIL PROTECTED]' Subject: instream-foreign-object vertical alignment Hello, I have a fo:instream-foreign-object that contains some SVG to draw a few lines. This is placed in a table cell inside a block and I want to horizontally align to the left side and vertically align to the bottom of the cell. The following XSL-FO "nearly" works: à The horizontal alignment works great but the vertical alignment only partially works or rather it doesn't work exactly the way I want it to. The problem is the vertical align does not align the SVG right to the bottom of the cell like I really need. The table row the cell is in is 16mm high and the svg is consistently vertically aligned to approximately 0.5mm from the bottom of the cell. The same thing happens if I try and vertically align to the top of the cell. I want the SVG to be sitting right against the table border which works fine horizontally, just not vertically. Any ideas on how to get this working? I using FOP 0.20.5 on WinXP. Thanks in advance, Matthew Rea Australia Post is committed to providing our customers with excellent service. If we can assist you in any way please telephone 13 13 18 or visit our website www.auspost.com.au. CAUTION This e-mail and any files transmitted with it are privileged and confidential information intended for the use of the addressee. The confidentiality and/or privilege in this e-mail is not waived, lost or destroyed if it has been transmitted to you in error. If you have received this e-mail in error you must (a) not disseminate, copy or take any action in reliance on it; (b) please notify Australia Post immediately by return e-mail to the sender; and (c) please delete the original e-mail.
RE: Vertical Centering
I also had the problem of display-align not working with the block container. I put the block of text inside a table and specified the display-align property on the table cell for vertical alignment. Vinuta Nagaraddi -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Friday, June 25, 2004 3:50 AM To: [EMAIL PROTECTED] Subject: Re: Vertical Centering Adam Augusta wrote: >>this should work. The only thing that strikes me as slightly unusual is that >>youve specified wrap-option="no-wrap". Try taking this off. > > > Didn't change anything. You are right, I cant get it working either. I wonder if this broke between 0.20.4 and 0.20.5 as I'm sure it used to work. I would be grateful if others could comment if this is working for them. If not then I will update the website to reflect this. >>If this fails, try >> getting rid of the nested blocks and just put the text directly below the >>block-container. > > > The text didn't even render. Won't work for my application anyways - I > need to specify spacing between individual lines. Yes, I got the same. This is a bug! > Even with the table workaround, I'm not getting vertically centered. > I've included the whole document this time in case I've missed something. Thats because you didnt specify height on table-row which is a requirement for display-align to work, and is described on the compliance page. Your example worked for me when I specified height on the table-row. 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: A question regarding image sizing
I was successful in getting fop to resize an image according content-width, content-height, width, and height that I specified. You need to specify all four properties. If you specify only one of the content-width/content-height, the other value is computed maintaining aspect ratio. I used exact values with "pt" unit. If this information is not enough, try Apache FOP FAQ's under Graphics. Vinuta Nagaraddi -Original Message- From: David Shevitz [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 5:00 PM To: [EMAIL PROTECTED] Subject: A question regarding image sizing Greetings, I am using XMLMind to generate DocBook XML, and then using XALAN and FOP to generate my PDF. I'm having some difficulty, however, getting my graphics to fit correctly. Currently, they seem to change size until the width of the graphic matches the available width on the page. What I'd like is to set the size somehow, for example, 60% of the original. I had thought I could use the width attribute to accomplish this, but it doesn't seem to have any affect. Does anyone have any suggestions? Thanks, Dave Shevitz - 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: Need text to flow outside the block
Thanks for your input. I have run out of ideas trying to get the text to fit and now looking into commercial formatters. I have an issue with images also. I am setting the content width and content height to fit images within a certain boundaries. This works great for images larger than the area. FOP shrinks it to the correct size. But, now the images smaller than the region are getting stretched. I am using eps image files. Any way to shrink large images (which I have achieved) but avoid smaller images from stretching? Vinuta Nagaraddi -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 9:28 AM To: Vinuta Nagaraddi Subject: Re: Need text to flow outside the block Vinuta Nagaraddi wrote: > Yes, I am using block container for absolute positioning. I am setting > left, top, width, and height attributes which can not be changed. There > are two situations: > 1. Text is too long and not all the text is being displayed. I have put > the text into a table because I wasn't able to use the display align > property on the block container. Ex: Huh? display-align should work on block-container according to compliance page: http://xml.apache.org/fop/compliance.html#fo-property-display-align > I need to make the text in both situations overflow the block container > boundaries. There is no easy way to get this working with FOP. The possible options as I see them: 1) redesign your document so that absolutely positioned text doesn thave variable height. 2) redesign your stylesheet/FO making use of an outer table with nested tables. This is difficult to explain in an e-mail, but I have had to do this myself for a customers rather complicated statement with lots of absolutely positioned items. 3) I hate to admit defeat, but you may have to consider a commercial XSL-FO formatter. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need text to flow outside the block
Yes, I am using block container for absolute positioning. I am setting left, top, width, and height attributes which can not be changed. There are two situations: 1. Text is too long and not all the text is being displayed. I have put the text into a table because I wasn't able to use the display align property on the block container. Ex: TEXT 2. I am using blocks inside the block container to have text on separate lines. In this situation, sometimes the 6th line does not show up because there is not enough space. Name Name address test@test.com I need to make the text in both situations overflow the block container boundaries. Thanks, Vinuta Nagaraddi -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Monday, June 14, 2004 7:03 AM To: [EMAIL PROTECTED] Subject: Re: Need text to flow outside the block Vinuta Nagaraddi wrote: > I need text within a block to be visible even if the text needs more > space that the amount specified by the block container which contains > the block. Is there a way to do this using fop 0.20.5? It seems like I > can achieve this by using overflow and clip attributes for the block > container. I found that overflow has not been implemented. It seems > like overflow needs to be set to use the clip attribute. I don't have > the option of changing the height of the block container and the full > text needs to be visible even if it requires space outside the > boundaries of the block container. Anyone have a solution? You are right in saying that clip and overflow properties are what you need to solve this problem. However they are not implemented at this time. Are you using block-containers because you need to absolutely position text? Nested tables can be used to achieve the same layout effect. Please indicate what effect you are trying to achieve, and we will try to suggest alternative approaches. 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]
Need text to flow outside the block
I need text within a block to be visible even if the text needs more space that the amount specified by the block container which contains the block. Is there a way to do this using fop 0.20.5? It seems like I can achieve this by using overflow and clip attributes for the block container. I found that overflow has not been implemented. It seems like overflow needs to be set to use the clip attribute. I don't have the option of changing the height of the block container and the full text needs to be visible even if it requires space outside the boundaries of the block container. Anyone have a solution? Code Ex: Text which may require an area with height greater than 22.5 Any help will be greatly appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]