RE: external-graphic problem
Title: RE: external-graphic problem I had the same problem before, I passed in image root as a parameter to XSLT page, and add that to the path of images. The limitation is: you have to assume all images are using same root path. Tiffany -Original Message- From: vivek gupta [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 24, 2004 9:08 PM To: [EMAIL PROTECTED] Subject: fo:external-graphic problem Hi All, I am having problem to use image in my web-application fop file. I am using XSLT and XML to generate fo file. But when I am deploying app on my app server. It could not find image file unless I hard code image path. Please help me how to set up path so that fo file dynamically finds image file Thanks in advance -V __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP 1.0 Dev.
Title: RE: FOP 1.0 Dev. Chris, Thanks for your reply. Is there a planned release date for FOP-1.0? The software I'm working on will be in Production early next year, guess I'll have to do all my modifications based on FOP-0.20.5. -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 19, 2004 4:18 AM To: [EMAIL PROTECTED] Subject: Re: FOP 1.0 Dev. Sun, Tiffany (Tong) wrote: Hi, I'm currently using FOP 0.20.5, but when I downloaded FOP1.0 Dev from CVS in hope it will fix some of my problems, I ran into more problems: Yes, you will. The 1.0 Dev branch isnt ready yet. First, I have to change most of the method calls for it to compile, then I found that some of the old EPS files are not working using the newly built FOP, it just hangs there and the generated PS file size keeps growing into a few MB, before it's around 30KB; The block-container position also doesn't work, I defined left, top, width and height, position=absolute, which worked in 0.20.5. block-containers is on the FOP 1.0 TODO list before we can do a release. See: http://xml.apache.org/fop/design/layout.html#status-todo At this point I'm confused: if I want to modify some features, should I start to work on the released version or the newest 1.0dev? Please advise. Any patches you submit to 0.20.5 are unlikely to be committed to the code base. Any work you do on FOP 1.0 dev will be highly welcome. However, as you've already noticed the development branch is not yet up to 0.20.5 so we need to do a lot more work on core features before it is ready for tweaking The reason for this situation is that FOP 1.0 dev is not just an evolution of FOP 0.20.5, but was a ground up re-write. This was necessary because the structure of the code in 0.20.5 did not allow for key features such as keep-* properties. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 1.0 Dev.
Title: FOP 1.0 Dev. Hi, I'm currently using FOP 0.20.5, but when I downloaded FOP1.0 Dev from CVS in hope it will fix some of my problems, I ran into more problems: First, I have to change most of the method calls for it to compile, then I found that some of the old EPS files are not working using the newly built FOP, it just hangs there and the generated PS file size keeps growing into a few MB, before it's around 30KB; The block-container position also doesn't work, I defined left, top, width and height, position=absolute, which worked in 0.20.5. At this point I'm confused: if I want to modify some features, should I start to work on the released version or the newest 1.0dev? Please advise. Thanks.
RE: Line feed character
Title: RE: Line feed character Hi, I'm having trouble with line feed characters: I defined text-align=justify text-align-last=start in fo:block, hoping the generated text will act justified if it's a full line, and align left if it's half line. But even there are a few words in a line, they'll align justified, spread across the whole line. I tried to get the system line feed character using System.getProperty(line.separator) and substitute them with line feed #xA; for input string, but it doesn't work at all. I checked the FOP definition, if it's U+000A, that line should align left by using text-align-last=start. Any idea about this issue? Tiffany
How to use CMYK colors as font color?
Title: How to use CMYK colors as font color? Hi, I need to use a font with color in CMYK color space, is there a way to tell FOP that I'm using CMYK color as font color? And how to define CMYK color 0 0 0 1? Currently I'm using fo:block font-size={$textSize} font-family={text/font-family} color=0001 But the generated PS file has RGB color space instead of CMYK. Thanks. Tiffany
RE: urgent help needed using FOP
Title: RE: urgent help needed using FOP Jerry, It seems like your FOP driver never have any reaction with inputSource. If you use Driver driver = new Driver(); you must set driver.setOutputStream(out) and driver.setInputSource(theInputSrc). Or you can change the initial part: Driver driver = new Driver(inputSource, ByteArrayOutputStream). I used this one to do the transformation. Tiffany -Original Message- From: Jerry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 06, 2004 5:00 PM To: [EMAIL PROTECTED] Subject: Re: urgent help needed using FOP John and folks, First of all, thank you for your help. I am still struggling with my PDF conversion. I am a little headache with this. We have a lot of FOP/JAXP professional here and hopefully I can get your suggestion. From what you suggested me, I read a lot of reference and resources. Now I tryed to use JAXP and FOP to convert the binary tiff data into PDF format and I got an error Error 500:java.io.ByteArrayInputStream. I know something wrong with my code. I just couldn't figure out how to fix it. Below is the partcial codes I wrote. Can you please take a look at my code and give me your recommandation? I know I already bothered you too much. You are not supposed to spend time on this for me. If you don't have time, I totally understand that. If you could help me, I will greatly appreciate it. I use * to mark the part which I have problem with. I also enclosed my XSL file here for your reference. My servlet: public class ImageDownload extends HttpServlet { ... public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { ... //get binary tiff data from database and put it in an byte array byte[] bt=(byte[]) v.elementAt(0); DisplayToPdf(bt, resp); } public void DisplayToPdf(byte[] bt, HttpServletResponse response) throws ServletException { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); response.setContentType(application/pdf); Driver driver = new Driver(); driver.setLogger(log); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); ByteArrayInputStream bais=new ByteArrayInputStream(bt); File xslfile = new File(C:/workspace/MaxTradDownload/Web Content/html/Tiff2Pdf.xsl); try { driver.setOutputStream(out); //Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xslfile)); //*assign ByteArrayInputStream bais to image variable in xsltfile, seems like it is not working. transformer.setParameter(image, bais); //Setup input for XSLT transformation //*Here, I need to do something to convert ByteArrayInputStream into Source type. I haven't figure out how to do or if it is possible //Source src =""> team.getSourceForProjectTeam(); //Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(driver.getContentHandler()); //Start XSLT transformation and FOP processing //* I need to work on the first parameter transformer.transform((Source)bais, res); byte[] content = out.toByteArray(); response.setContentLength(content.length); response.getOutputStream().write(content); response.getOutputStream().flush(); } finally { out.close(); } } catch (Exception ex) { throw new ServletException(ex); } } } * My XSL(Tiff2pdf.xsl) file for your reference: ?xml version=1.0 encoding=utf-8? xsl:stylesheet version=1.1 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:fo=http://www.w3.org/1999/XSL/Format exclude-result-prefixes=fo fo:root font-family=Times Roman font-size=12pt text-align=center xmlns:fo=http://www.w3.org/1999/XSL/Format fo:layout-master-set fo:simple-page-master margin-right=1.5cm margin-left=1.5cm margin-bottom=2cm margin-top=1cm page-width=21cm page-height=29.7cm master-name=left fo:region-before extent=1cm/ fo:region-body margin-top=1cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence id=N2528 master-reference=left fo:static-content flow-name=xsl-region-after fo:block text-align-last=center font-size=10pt fo:page-number/ /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block font-size=18pt font-weight=boldCopy Only/fo:block fo:block fo:block font-size=16pt font-weight=bold space-before.minimum=1em space-before.optimum=1.5em space-before.maximum=2emAlign in Smaller Viewport/fo:block fo:block !-- fo:external-graphic width=50pt height=50pt overflow=hidden src=""> fo:external-graphic width=50pt height=50pt overflow=hidden src="" PROTECTED]/ /fo:block fo:block font-size=16pt font-weight=bold space-before.minimum=1em space-before.optimum=1.5em space-before.maximum=2em/ This document is just Copy only, Non Negotiable /fo:block /fo:flow /fo:page-sequence /fo:root /xsl:stylesheet --- John Austin [EMAIL PROTECTED] wrote: You
Create Legal sized PDF file
Title: Create Legal sized PDF file I'm trying to create a PDF file bigger than 8.5X11, I defined page-width=8.5in and page-height=14in, but the generated PDF file just cut off the extra height and still display 8.5X11, anything beyond is lost. Any solutions? Thanks
RE: Image with transparent background covers the page with backgr ound image
Title: RE: Image with transparent background covers the page with background image I have many EPS files inside the FOP file, all using external-graphic except the one that needs rotate. I need to transform the FOP file to PS file, then use ImageMagick to transform to a JPEG file, send back to browser. Now when I try to use svg:svg to do the rotate, it won't show up on the screen. Does anyone know a freeware that can transform EPS to SVG or PNG file? Thanks. Tiffany -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 16, 2004 5:06 PM To: [EMAIL PROTECTED] Subject: Re: Image with transparent background covers the page with backgr ound image Acrobat Reader doesn't show EPS graphics, but the data is still there. Try printing it on a PostScript printer, the graphics should show up, even if printed from Acrobat. Fro screen display, try GhostScript http://www.cs.wisc.edu/~ghost/ J.Pietschmann
Image with transparent background covers the page with background image
I have a gif file with transparent background, but when I put it into a page with a background image, the transparent part became white and covered up the background image, anybody encountered this before? Tiffany
RE: Image with transparent background covers the page with backgr ound image
Title: RE: Image with transparent background covers the page with background image I tried to embed gif file into SVG, same thing happened, lost transparency. My original file is EPS file, and it can't be embedded into SVG (doesn't show anything). Any other solutions? My goal is to rotate EPS image by 10 degrees. Thanks. Tiffany