[Understanding] Area Tree [8]
Area Tree - The Area Tree is an internal representation of the result document. This is a set of java classes that can put together a set of objects that represent the pages and their contents. This information is created by the layout managers and is rendered to the output using a renderer. The Area Tree follows the description of the area tree in the XSL:FO specification. The Area Tree consists of a set of pages, the actual implemenation places these in a set of page sequences. Pages - A page consists of a page+viewport pair. The PageViewPort and Page with the regions is created by the LayoutMasterSet. The contents are then placed by the layout managers. Once the layout of a page is complete then it is added to the Area Tree. Inside the page is a set of RegionViewport+Region pairs for each region on the page. Blocks -- Block level areas contain either other blocks or line areas (which is a special block area). A block is either positoned or stacked with other block areas. Inline Areas Inline areas are stacked in a line area. Inline areas are objects such as character, viewport, inline-container, leader and space. A special inline area Word is also used for a group of consecutive characters. The image and instream foreign object areas are placed inside a viewport. The leader (with use content) and unresolved page number areas are resolved to other inline areas. Once a LineArea is filled with inline areas then the inline areas need to be aligned and adjusted to fill the line properly. Traits -- A trait is information associated with an area. This could be information such as text colour or is-first. Traits provide information about an area. The traits are derived from properties on the formatting object or are generated during the layout process. Many of the layout traits do not have actual values but can be derived from the Area Tree. Other traits that apply when rendering the areas are set on the area. Since setting the same value on every area would use a lot of memory then the traits are derived from default or parent values. A dominant trait on a block area is set, for example font colour, so that every line area with the same dominant value can derive it. The text inline areas then get the font colour set on the inline area or from the line area or from the block area. Forward References -- The Area Tree maintains a set of mappings from the reference to pages. The PageViewPort holds the list of forward references that need resolving so that if a references is resolved during layout the page can be easily found and then fixed. Once all the forward references are resolved then the page is ready to be rendered. To layout a page any areas that cannot be resolved need to reserve space. Once the inline area is resolved then the complete line should be adjusted to accomodate any change in space used by the area. Caching --- We may need to cache pages due to forward references or when keeping all pages. This is done by serializing the Page. The PageViewport is retained to be used as a key for page references and backward references. The Page is serialized to an object stream and then all of the page contents are released. The Page is then recoved by reading from the object stream. The PageViewport retains information about id areas for easy access. Extensions -- The Area Tree holds the Output Document extensions. This is information such as pdf bookmarks or other output document specific information that is not handled by XSL:FO. It is also possible to create custom areas that extend a normal area. The actual data that is rendered could be set in a different way or depend on resolving a forward reference. Area Tree Handlers -- To handle different situations the handler for the Area Tree handles each page as it is added. The RenderPagesModel sends the page directly to the renderer if the page is ready to be rendered. Once a page is rendered it is discarded. The StorePagesModel stores all the pages so that any page can be later accessed. The Area Tree retains the concept of page sequences (this is not in the area tree in the spec) so that this information can be passed to the renderer. This is useful for setting the title and organising the groups of page sequences. Associated Tasks Sort out extensions concept, access to AreaTree. Sort out trait handling. Caching implementation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Extended Fonts
Hi all, I have another question about using extended fonts. I've got a font called HKSCS.tte (This is developed by Hong Kong Government which supplement with another fonts mingliu.ttc). I've got no problem if I only display the big5 characters using mingliu.ttc. However, if some fonts are using HKSCS standard, these characters will disappear in pdf file. Does FOP support this type of supplementary fonts now? For more details about HKSCS standard, please go to visit : http://www.info.gov.hk/digital21/eng/hkscs/introduction.html . Thanks you very much! Best Regards, Polly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Fop Hanging in Cocoon
Hi folks, Sorry for asking this here and not just on the Cocoon list but... I have a simple website in xml which is getting converted to html by cocoon 2.0rc2. Cocoon also generates fo (in memory) and uses a slightly old version of FOP to generate the PDF. At least that is the idea. The PDF seems to sometimes work the first time, and then takes minutes to work if ever. There is no evidence of a busy computer - the CPU is quiet at 2% activity. (whatever that means - I'm using NT4). If on the other hand I just generate the fo files (which takes under a second each) I can then use FOP on the command line to generate all the PDFs in seconds.. (Using FOP 20.2 - unfortunately slightly later than the one in Cocoon). Does anyone have any further ideas on what may be going wrong? I realise this may not be a fault directly with Fop but please bear with me. Cheers Alex Mc (I'm using Tomcat 4.0.1 as the servlet container) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[Understanding] Renderers [9]
Renderers - A renderer is used to convert the Area Tree into the output document. The renderer is given the tree one page at a time. All pages are supplied in the order they appear in the document. In order to save memory it is possble to render the pages out of order. Any page that is not reeady to be rendered is setup by the renderer first so that it can reserve a space or reference for when the page is ready to be rendered. The AbstractRenderer does most of the work to iterate through the area tree parts. This means that the most renderers simply need to implement the specific parts with inserting text, images and lines. The methods can easily be overridden to handle things in a different way or do some extra processing. Fonts - The fonts are setup by the renderer being used. The font metrics are used during the layout process to determine the size of characters. Render Context -- The render context is used by handlers. It contains information about the current state of the renderer. Such as the page, the position and any other miscellanous objects that are required to draw into the page. XML Handling A document may contain information in the form of XML for an image or instream foreign object. This XML is handled through the user agent. A standard extension for PDF is the SVG handler. If there is XML in the SVG namespace it is given to the handler which renders the SVG into the pdf document at the given location. This separation means that other XML handlers can easily be added. Extensions -- Document level extensions are handled with an extension handler. This handles the information from the AreaTree and adds renders it to the document. An example is the pdf bookmarks. This information first needs to have all references resolved. Then the extension handler is ready to put the information into the pdf document. Types - PDF This uses the PDFDocument classes to create a PDF document. This supports out of order rendering as it is possible to reserve a pdf page object that can be later filled. Most of the work is to insert text or create lines. SVG is handled by the XML handler that uses the PDFGraphics2D and batik to draw the svg into the pdf page. This also allows for font embedding. SVG This creates a single svg document that contains all the pages rendered with page sequences horizontally and pages vertically. This also adds links between the pages so that it can be viewed by clicking on the page to go to the next page. TXT This simply outputs to a text document. AWT This draws the pages into an AWT graphic. PS PCL Similar to PDF. XML Creates an XML file that represents the AreaTree. Print This prints the document using the java printing facitlities. The AWT rendering is used to draw the pages onto the printjob. RTF MIF These formats do not use this rendering mechanism. Adding a Renderer - It is also possible to add other renderers. The renderer simply needs to implement the Renderer interface. The AbstractRenderer does most of what is needed so it is better to extend this. This means that you only need to implement the basic functionality such as text and lines. Multiple Renderers -- The layout of the document depends mainly on the font being used. If two renderers have the same font metrics then it is possible to render the Area Tree in each renderer. This can be handled by the AreaTree Handler. Associated Tasks Sort out multiple renderers concept. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
distribute the PDF file
Hello. Is it possible to distribute the PDF file made from FOP for the commercial purpose? Description of a license was not able to be found even if referred to Web.. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
volunteer - Image Handling
Hi All, Now that there is a minimal implemenation that inserts images into the pdf document. Also batik is no longer required on the classpath. I am hoping someone could volunteer to do some work on the image handling. You will probably need access to Photoshop or some other tool. We need an fo document with all common types of images (eg. jpg, png, gif, svg, eps, tiff). So that we can demonstrate which image formats are supported. Other simple tests such as invalid or corrupt images, different dpi values. Also we need to check the code to make sure it is thread safe and handles all the streams properly. If you are feeling adventurous you could try to implement the image area in terms of size, alignment etc. This is a self contained part that does not usually depend on the layout. Thanks for any help. Keiron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: distribute the PDF file
The license is the ASF license. It is at the top-level of the FOP distribution. Not only can you commercially distribute the PDFs, you can commercially distribute FOP if you wish. Or build a product around it and commercially distribute that. Just keep the license handy. Regards, Arved Sandstrom -Original Message- From: Yuko Nakayama [mailto:[EMAIL PROTECTED]] Sent: March 11, 2002 7:20 AM To: [EMAIL PROTECTED] Subject: distribute the PDF file Hello. Is it possible to distribute the PDF file made from FOP for the commercial purpose? Description of a license was not able to be found even if referred to Web.. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/svg PDFTranscoder.java SVGUserAgent.java
keiron 02/03/11 04:57:18 Modified:src/org/apache/fop/svg PDFTranscoder.java SVGUserAgent.java Log: extends adapter instead of implementing useragent Revision ChangesPath 1.16 +4 -60 xml-fop/src/org/apache/fop/svg/PDFTranscoder.java Index: PDFTranscoder.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFTranscoder.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- PDFTranscoder.java19 Feb 2002 13:03:14 - 1.15 +++ PDFTranscoder.java11 Mar 2002 12:57:18 - 1.16 @@ -1,5 +1,5 @@ /* - * $Id: PDFTranscoder.java,v 1.15 2002/02/19 13:03:14 keiron Exp $ + * $Id: PDFTranscoder.java,v 1.16 2002/03/11 12:57:18 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -38,6 +38,7 @@ import org.apache.batik.bridge.BridgeException; import org.apache.batik.bridge.GVTBuilder; import org.apache.batik.bridge.UserAgent; +import org.apache.batik.bridge.UserAgentAdapter; import org.apache.batik.bridge.ViewBox; import org.apache.batik.dom.svg.DefaultSVGContext; @@ -120,7 +121,7 @@ * millimeter conversion factor. * * @author a href=mailto:[EMAIL PROTECTED];Keiron Liddle/a - * @version $Id: PDFTranscoder.java,v 1.15 2002/02/19 13:03:14 keiron Exp $ + * @version $Id: PDFTranscoder.java,v 1.16 2002/03/11 12:57:18 keiron Exp $ */ public class PDFTranscoder extends XMLAbstractTranscoder { @@ -310,7 +311,7 @@ /** * A user agent implementation for ttImageTranscoder/tt. */ -protected class ImageTranscoderUserAgent implements UserAgent { +protected class ImageTranscoderUserAgent extends UserAgentAdapter { /** * Returns the default size of this user agent (400x400). @@ -407,65 +408,8 @@ /** * Unsupported operation. */ -public EventDispatcher getEventDispatcher() { -return null; -} - -/** - * Unsupported operation. - */ -public void openLink(SVGAElement elt) {} - -/** - * Unsupported operation. - */ -public void setSVGCursor(Cursor cursor) {} - -/** - * Unsupported operation. - */ -public void runThread(Thread t) {} - -/** - * Unsupported operation. - */ public AffineTransform getTransform() { return null; } - -/** - * Unsupported operation. - */ -public Point getClientAreaLocationOnScreen() { -return new Point(); -} - -/** - * Tells whether the given feature is supported by this - * user agent. - */ -public boolean hasFeature(String s) { -return FEATURES.contains(s); -} - -/** - * Tells whether the given extension is supported by this - * user agent. - */ -public boolean supportExtension(String s) { -return false; -} - -public void registerExtension(BridgeExtension be) {} - -public void handleElement(Element elt, Object data) {} - -} - -protected final static Set FEATURES = new HashSet(); -static { -FEATURES.add(SVGConstants.SVG_ORG_W3C_SVG_FEATURE); -FEATURES.add(SVGConstants.SVG_ORG_W3C_SVG_LANG_FEATURE); -FEATURES.add(SVGConstants.SVG_ORG_W3C_SVG_STATIC_FEATURE); } } 1.7 +9 -32 xml-fop/src/org/apache/fop/svg/SVGUserAgent.java Index: SVGUserAgent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGUserAgent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SVGUserAgent.java 15 Nov 2001 08:12:37 - 1.6 +++ SVGUserAgent.java 11 Mar 2002 12:57:18 - 1.7 @@ -1,5 +1,5 @@ /* - * $Id: SVGUserAgent.java,v 1.6 2001/11/15 08:12:37 keiron Exp $ + * $Id: SVGUserAgent.java,v 1.7 2002/03/11 12:57:18 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -31,7 +31,7 @@ import java.awt.RenderingHints; import java.awt.Dimension; -public class SVGUserAgent implements UserAgent { +public class SVGUserAgent extends UserAgentAdapter { AffineTransform currentTransform = null; Logger log; @@ -69,6 +69,13 @@ } /** + * Shows an alert dialog box. + */ +
cvs commit: xml-fop/src/org/apache/fop/image/analyser ImageReader.java
keiron 02/03/11 05:01:24 Modified:src/org/apache/fop/image/analyser ImageReader.java Log: comment about reader behaviour Revision ChangesPath 1.6 +7 -1 xml-fop/src/org/apache/fop/image/analyser/ImageReader.java Index: ImageReader.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/analyser/ImageReader.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ImageReader.java 25 Feb 2002 09:31:03 - 1.5 +++ ImageReader.java 11 Mar 2002 13:01:24 - 1.6 @@ -1,5 +1,5 @@ /* - * $Id: ImageReader.java,v 1.5 2002/02/25 09:31:03 keiron Exp $ + * $Id: ImageReader.java,v 1.6 2002/03/11 13:01:24 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. @@ -23,6 +23,12 @@ /** * Verify image type. + * If the stream does not contain image data expected by + * the reader it must reset the stream to the start. This + * is so that the next reader can start reading from the start. + * The reader must not close the stream unless it can handle + * the image and it has read the information. + * * @param bis Image buffered input stream * @return true if image type is the handled one * @exception IOException io error - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HowTo Render PDF from XML string and XSL file
I posted this about a week ago, but here you go again... Jim public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException { ... your code try { String xmlString = new String(); // your xml TransformerFactory tFactory = TransformerFactory.newInstance(); File foFile= new File(foXslFile.xsl); Source foXslSource = new StreamSource(foFile); Transformer pdfTransformer = tFactory.newTransformer(foXslSource); Writer out = new StringWriter(); Source xmlSource = new StreamSource(new StringReader(xmlString)); pdfTransformer.transform(xmlSource, new StreamResult(out)); out.close(); String fopstring = out.toString(); InputSource foSource = new InputSource(new StringReader(fopstring)); ByteArrayOutputStream baout = new ByteArrayOutputStream(); Driver driver = new Driver(foSource , baout); res.setContentType(application/pdf); driver.setRenderer(Driver.RENDER_PDF); driver.run(); byte[] content = baout.toByteArray(); res.setContentLength(content.length); // This keeps IE happy res.getOutputStream().write(content); res.getOutputStream().flush(); res.flushBuffer(); } catch (Exception e) { System.err.println(Exception in init: + e.toString()); e.printStackTrace(); } ... more code } -Original Message- From: David B. Bitton [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 11:27 PM To: fop-dev Subject: HowTo Render PDF from XML string and XSL file I have spent some time looking at the embedding sample, and I have some questions. I have successfully implemented FOP as a WebService having the XSL-FO data posted to the service and the service rendering the file onto the local machine. Now I want to do the XML/XSL to XSL-FO transform in the WebService. I noticed that the transform occurs in the XSLInputHandler. This then allows for an InputSource and XMLReader to be available to the Driver.render() overloaded method. The unfortunate part is the XSLInputHandler constructor only takes File object, no stream. I'd like to avoid bouncing the XML data off the disk just to statisfy this requirement for using XSLInputHandler. So, my question is this, how can I arrive at the same results, an InputSource and an XMLReader interfaced object for Driver.render()? Or better yet, what I'm asking is what is going on inside XSLInputHandler that I can slurp out into my code. Tx :) -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
JAVA_HOME
Hi, First of all, sorry for my english, because is not very well. My problem is this, when I want execute the archive runtest.bat, the error is this : Fop Test ERROR: JAVA_HOME not found in your environment. Please, set the JAVA_HOME variable in your environment to match the location of the Java Virtual Machine you want to use. Can you explain me how to resolve this problem. thks jaime - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: JAVA_HOME
You have to run the following commands: under Linux: export JAVA_HOME=(path to your JDK directory)(f.e. export JAVA_HOME=/usr/java/jdk131) under Windows: (at the command line) set JAVA_HOME=(path to your JDK directory) (f.e. set JAVA_HOME=c:/java/jdk131) -Ursprungliche Nachricht- Von: Jaime Jimenez [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 11. Marz 2002 12:33 An: [EMAIL PROTECTED] Betreff: JAVA_HOME Hi, First of all, sorry for my english, because is not very well. My problem is this, when I want execute the archive runtest.bat, the error is this : Fop Test ERROR: JAVA_HOME not found in your environment. Please, set the JAVA_HOME variable in your environment to match the location of the Java Virtual Machine you want to use. Can you explain me how to resolve this problem. thks jaime - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Vertical align
Hi, Is it possible to set the vertical-align to a specific value? I tried this: fo:block font-size=12pt font-family=sans-serif line-height=5pt space-after.optimum=3pt text-align=start Das ist ein fo:inline vertical-align=sub font-size=4ptTEST/fo:inline /fo:block But the text TEST is displayed too low, nearly intersects with the next line. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
including SVG in HTML
I want to include SVG graphics in HTML. Is there a way in which svg tags be included inside HTML, the way we do in xsl:fo. I wish to create SVG graphics dynamically and include in HTML. Thanks in Advance. Bhawana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP Print Option
I figured out how to tell FOP to print to a specified printer. On Windoze, depending on if you have a postscript printer or PCL printer you can simply do: fop ... -ps \\computername\printer or fop ... -pcl \\computername\printer. Jim -Original Message- From: Ralph LaChance [mailto:[EMAIL PROTECTED]] Sent: Friday, March 08, 2002 3:34 PM To: [EMAIL PROTECTED] Subject: Re: FOP Print Option At 03:53 PM 3/8/02, you wrote: I need to use the FOP print option (-print) to print a FO directly to a printer. The problem is, I need to tell FOP which printer (by name, port or UNC name) to print to. Displaying the preview window (-awt) or printer dialog is not an option. I will be embedding this code in an application which will run unattended. The application will wake up, check for FOs to print and print them automatically without any user intervention and then go back to sleep. The print out must go to a specified printer containing a special paper which will most likely NOT be the default printer. Any ideas how to do this? This was answered previously, please check the archives. The short answer is that you cannot in any straightforward fashion programmatically assign a printjob to a specific printer pre-Java 1.4. There new JavaPrintService facility in 1.4 is promising, but I think you might have trouble trying to run fop in 1.4 yet. If someone wishes to refine this answer, please jump in; Alex -- another topic for the faq? ' Best, -Ralph LaChance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP Print Option
At 10:38 AM 3/11/02, you wrote: I figured out how to tell FOP to print to a specified printer. On Windoze, depending on if you have a postscript printer or PCL printer you can simply do: fop ... -ps \\computername\printer or fop ... -pcl \\computername\printer. Jim but remember that -pcl doesn't do color (at least it didn't) ' Best, -Ralph LaChance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
basic-links, bug??
Hello, experimenting with FOP 0.20.3 I realize that basic-links are formatted far of. IE. the clickable-area is tranlated from the actual linked characters by such a large margin, that it is impossible to make a single character a working link (cause the clickable area is probably shifted in the surrounding whitespace and the whitespace is not clickable at all). Am I doing something wrong or is it a know problem. And when, when comes the fix?? With best regards, -- Dr. Frank Sven Nestel INA-Schaeffler KG, Information Services Communication (ISC) Industriestr. 1-3, D-91074 Herzogenaurach, Germany Phone:+49 (0) 91 32 / 82 - 46 11, Mailto:[EMAIL PROTECTED] Internet: http://www.ina.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Acrobat 5.0 Error
Do your documents employ any encryption? Also, why aren't you opening the new window with the url to the servlet in the first place? Also, I'm confused as to the use of the cookie (personnaly, i'm fond of cookie monster myself). I can see that you are "serving" the pdf from within the servlet. Try, just for kicks, saving it to disk, and then sending down that Jscript. If anything, I'd be curious to see what happens. I code web for a living, so, any questions, feel free... -- David B. Bitton[EMAIL PROTECTED]www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: Rachael Blank To: '[EMAIL PROTECTED]' Sent: Monday, March 11, 2002 5:22 PM Subject: RE: Acrobat 5.0 Error David, Thank you for the advice. We are handling thePDFsa little differently, however, and are running on Apache. In the JSP file that displayscontent in the browser, we have the following link withina form nameddocumentmanagementsearchnavigation: a href="#" img src="javascript:void(0);" width="29" height="60" border="0" alt="Print Unprinted Approved Documents in the list."/a Here is the batchPrintDocument functionin thejavascript file: function batchPrintDocument( form ) { var option = "HEIGHT=400,WIDTH=700,scrollbars=1,status=1,menubar=1"; newWindow = window.open("BatchPrint.html", "BatchPrintDocumentWindow", option); result = getCookieData(); if (result == "") { result = 0; document.cookie = "app=" + result; } else { result = parseInt(result) + 1; document.cookie = "app=" + result; } var source = "Servlet?actiontotake=batchprintdocument.pdfcookie="+result; newWindow.location = source; newWindow.focus(); return false; } We define the batchprintdocument.pdf action in the Servlet. The batch function in the servletactually builds one large document that consists of many smaller documents. For instance, a user can print one individual report or click on the batch print icon to print all of the reports. She is able to print one doc OK, but receives the error when printing batch printing all documents even when there is only 1 or 2 docs to be batch printed. This featureis working well, except onher computer. We suspect it is her configuration. Thanks again!! Rachael -Original Message-From: David B. Bitton [mailto:[EMAIL PROTECTED]]Sent: Monday, March 11, 2002 4:22 PMTo: [EMAIL PROTECTED]Subject: Re: Acrobat 5.0 Error How is the PDF being served to the user? Is it coming from an ASP page and being Response.BinaryWrite'ed? The best work around that I'm using for this problem is this: I persist the file on the server, then send this to the browser: htmlhead script language="javascript" !-- window.location.href='%=path%' //-- /script /headbody/body/html This way, IE will go fetch the file itself. If you are using IIS, save the docs in their own folder, then go into the IIS setting, and enable content expiration (it's on the HTTP Headers tab) just for that folder and set it to expire immediately. If you don't do this, IE will keep pulling the PDF from it's cache if you re-use filenames. :) -- David B. Bitton[EMAIL PROTECTED]www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: Rachael Blank To: '[EMAIL PROTECTED]' Sent: Monday, March 11, 2002 3:28 PM Subject: Acrobat 5.0 Error Hello! Thanks in advance for your time and help. I know this is not exactly an FOP issue, but will be very helpfulto the folks who are already in a production environment. I have a user running WIN NT and views FOP-generated PDFs in Acrobat 5.0 within Internet Explorer. When she opens the PDF, she receives the error: File does not begin with :%PDF... She receives a dialog box then clicks OK and gets a blank screen. In our offices, we are able to view the same documents in Acrobat 5.0 with no problem. At this time, I think it is a problem on the user'sPC. I am hoping someone has seen this type of problem before. I am able to see that, on my computer, the PDF starts with :%PDF. Why is her Acrobat interpreting it differently? Thanks! Rachael P.S. I also had her try the option toNOT view it in the browser. I had no success with this either.
Re: [ANNOUNCEMENT] Fop 0.20.3 released
I notice the timestamp on the files is 3/4. Is that right, because that means I already have code made fresh daily. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: Christian Geisert [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 11, 2002 6:02 PM Subject: [ANNOUNCEMENT] Fop 0.20.3 released Doh, sorry for the previous mail (don't know what happened..) Hi all, just in case someone hasn't noticed yet ;-) FOP 0.20.3 is finally available at http://xml.apache.org/dist/fop for downloading. The main reason for this release is the conformance to the XSL-FO Version 1.0 W3C Recommendation. Other changes include: - support for CMYK and embedded ICC profiles in jpeg images - support for EPS images - improved font encodings for native (Acrobat) fonts - i18n improvments for AWT viewer - support for letter-spacing - Polish, Greek, and Hungarian hyphenation - and of course a lot of bugfixes... Changes from previous Release Candidate (rc2): - added missing japanese resource for AWT viewer - fixed Markers - updated logkit from 1.0b4 to 1.0 Enjoy, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Acrobat 5.0 Error
I can't really tell from this example, but I know I ran into an issue where I was trying to use a JSP page to generate either PDF or HTML. I finally realized I was getting an error when the output was PDF which was due to whitespace between the %% tags. The JSP engine compiles whitespace as System.out.println( ), which naturally doesn't agree with the byte array output stream Acrobat is expecting. I quickly switched back to a servlet. -Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Using Avalon/Logkit
Guys, I've just encountered this issue, so apologies for barging in late.. Jeremias Maerki wrote: Joerg Pietschmann wrote: In order to clarify issues: I have to use FOP in an environment which already provides logging, configuration management and life cycle management. I don't want to look into another log file. I don't want to write more config files. I'm in the exact same boat here. We'd like to embed FOP but the configuration, management and logging environment we already have is more than sufficient without using another on top. It is a requirement of the project I'm on that all configuration is done via the central configuration mechanism, and all logging is to the project's logger. There's zero chance of using Avalon instead, and if we need to write translation layers between Avalon and what we already have, then embedding FOP will fall into the too hard basket, and we'll need to use somthing else. I'd dearly like to avoid having this happen. I don't want to prevent anyone from providing a FOP embedding using logkit and avalon. I *want* however access to a core which doesn't rely on yet another toolkit for common functionality Ditto. Ok, I think that can be done, even when using Avalon in FOP. You propose (I think) that we could provide an Avalon-Wrapper around FOP, but it could also be the other way around. I'm sure that Avalon will not stand in the way if we provide a simple interface similar to what you proposed. I'm not sure what you mean here, when you say it could be the other way around. Personally, I'd suggest having core FOP logging services taken care of by something akin to org.xml.sax.ErrorHandler. This mechanism works quite nicely. FOP could provide a default implementation which uses Logkit/Avalon and embedders could provide their own. Also, I'm prepared to put my money where my mouth is, so to speak. If people are happy with this approach, I'll gladly implement it over the next few days. I hope this conveys how important I think this issue is. What does everyone say? Mike. -- Michael Gratton [EMAIL PROTECTED] Recall Design http://www.recalldesign.com/ s: 53 Gilbert Street Adelaide SA 5000 Australia t: +61 8 8217 0500 f: +61 8 8217 0555 smime.p7s Description: S/MIME Cryptographic Signature
AW: PDF - FO (slightly off topic)
Apologies for the slightly off-topic mail - but does anyone know of an easy way to convert PDF docs to XSL-FO ? I don't think there is any way to do this, especialy no easy way! PDF does not contain any structural information, like XSL-FO does. So that would have to be constructed. But the output would not be very good, I think. Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]