cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFXMLHandler.java
keiron 2002/12/09 03:18:58 Modified:src/org/apache/fop/render/pdf PDFXMLHandler.java Log: use more decimal places for scaling Revision ChangesPath 1.12 +5 -5 xml-fop/src/org/apache/fop/render/pdf/PDFXMLHandler.java Index: PDFXMLHandler.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFXMLHandler.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- PDFXMLHandler.java14 Nov 2002 15:22:30 - 1.11 +++ PDFXMLHandler.java9 Dec 2002 11:18:58 - 1.12 @@ -256,10 +256,10 @@ if (!at.isIdentity()) { double[] vals = new double[6]; at.getMatrix(vals); -pdfInfo.currentStream.add(PDFNumber.doubleOut(vals[0]) + -+ PDFNumber.doubleOut(vals[1]) + -+ PDFNumber.doubleOut(vals[2]) + -+ PDFNumber.doubleOut(vals[3]) + +pdfInfo.currentStream.add(PDFNumber.doubleOut(vals[0], 5) + ++ PDFNumber.doubleOut(vals[1], 5) + ++ PDFNumber.doubleOut(vals[2], 5) + ++ PDFNumber.doubleOut(vals[3], 5) + + PDFNumber.doubleOut(vals[4]) + + PDFNumber.doubleOut(vals[5]) + cm\n); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFXMLHandler.java
keiron 2002/11/14 07:22:30 Modified:src/org/apache/fop/render/pdf PDFXMLHandler.java Log: make sure it has valid pdf context Revision ChangesPath 1.11 +4 -1 xml-fop/src/org/apache/fop/render/pdf/PDFXMLHandler.java Index: PDFXMLHandler.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFXMLHandler.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- PDFXMLHandler.java11 Nov 2002 08:50:53 - 1.10 +++ PDFXMLHandler.java14 Nov 2002 15:22:30 - 1.11 @@ -264,6 +264,9 @@ + PDFNumber.doubleOut(vals[5]) + cm\n); } +if (pdfInfo.pdfContext == null) { +pdfInfo.pdfContext = pdfInfo.pdfPage; +} PDFGraphics2D graphics = new PDFGraphics2D(true, pdfInfo.fi, pdfInfo.pdfDoc, pdfInfo.pdfContext, pdfInfo.pdfPage.referencePDF(), pdfInfo.currentFontName, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFXMLHandler.java
keiron 02/03/21 01:37:15 Modified:src/org/apache/fop/fo FOText.java FOUserAgent.java FObjMixed.java src/org/apache/fop/fo/flow Block.java InstreamForeignObject.java src/org/apache/fop/image ImageLoader.java src/org/apache/fop/image/analyser SVGReader.java XMLReader.java src/org/apache/fop/layoutmgr AbstractLayoutManager.java BlockLayoutManager.java LayoutManager.java LineLayoutManager.java PageLayoutManager.java TextLayoutManager.java src/org/apache/fop/render RendererContext.java src/org/apache/fop/render/pdf PDFXMLHandler.java Added: src/org/apache/fop/fo TextInfo.java Log: a simple impl of getting ipd and line height some adjustments to user agent Revision ChangesPath 1.31 +1 -17 xml-fop/src/org/apache/fop/fo/FOText.java Index: FOText.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOText.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- FOText.java 8 Mar 2002 15:41:47 - 1.30 +++ FOText.java 21 Mar 2002 09:37:14 - 1.31 @@ -1,5 +1,5 @@ /* - * $Id: FOText.java,v 1.30 2002/03/08 15:41:47 keiron Exp $ + * $Id: FOText.java,v 1.31 2002/03/21 09:37:14 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. @@ -35,22 +35,6 @@ protected int start; protected int length; TextInfo textInfo; - -public static class TextInfo { -public FontState fs; -public float red; -public float green; -public float blue; -public int wrapOption; -public int whiteSpaceCollapse; -public int verticalAlign; - -// Textdecoration -public boolean underlined = false; -public boolean overlined = false; -public boolean lineThrough = false; -} - TextState ts; public FOText(char[] chars, int s, int e, TextInfo ti) { 1.7 +16 -4 xml-fop/src/org/apache/fop/fo/FOUserAgent.java Index: FOUserAgent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOUserAgent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- FOUserAgent.java 22 Feb 2002 09:18:47 - 1.6 +++ FOUserAgent.java 21 Mar 2002 09:37:14 - 1.7 @@ -1,5 +1,5 @@ /* - * $Id: FOUserAgent.java,v 1.6 2002/02/22 09:18:47 keiron Exp $ + * $Id: FOUserAgent.java,v 1.7 2002/03/21 09:37:14 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. @@ -44,14 +44,25 @@ return log; } -public void setBaseDirectory(String b) { +public void setBaseURL(String b) { base = b; } -public String getBaseDirectory() { +public String getBaseURL() { return base; } +public float getPixelToMM() { +return 0.3528f; +} + +/** + * If to create hot links to footnotes and before floats. + */ +public boolean linkToFootnotes() { +return true; +} + /** * Set the default xml handler for the given mime type. */ @@ -92,10 +103,11 @@ handler.handleXML(ctx, doc, namespace); } catch (Throwable t) { // could not handle document -ctx.getLogger().error(Could not render XML, t); +log.error(Could not render XML, t); } } else { // no handler found for document +log.debug(No handler defined for XML: + namespace); } } } 1.19 +4 -8 xml-fop/src/org/apache/fop/fo/FObjMixed.java Index: FObjMixed.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObjMixed.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- FObjMixed.java21 Nov 2001 22:13:36 - 1.18 +++ FObjMixed.java21 Mar 2002 09:37:14 - 1.19 @@ -1,5 +1,5 @@ /* - * $Id: FObjMixed.java,v 1.18 2001/11/21 22:13:36 klease Exp $ + * $Id: FObjMixed.java,v 1.19 2002/03/21 09:37:14 keiron Exp $ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. * For details on use and redistribution
cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFXMLHandler.java
keiron 02/03/18 04:30:46 Modified:src/org/apache/fop/apps Driver.java src/org/apache/fop/fo FOTreeBuilder.java src/org/apache/fop/render/pdf PDFXMLHandler.java Log: made it easier to add xml handlers Revision ChangesPath 1.44 +9 -4 xml-fop/src/org/apache/fop/apps/Driver.java Index: Driver.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Driver.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- Driver.java 5 Mar 2002 10:26:35 - 1.43 +++ Driver.java 18 Mar 2002 12:30:46 - 1.44 @@ -1,5 +1,5 @@ /* - * $Id: Driver.java,v 1.43 2002/03/05 10:26:35 keiron Exp $ + * $Id: Driver.java,v 1.44 2002/03/18 12:30:46 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. @@ -173,6 +173,7 @@ * the system resources that FOP will use */ private Logger log; +private FOUserAgent userAgent = null; public static final String getParserClassName() { String parserClassName = null; @@ -192,6 +193,7 @@ public Driver() { _stream = null; _treeBuilder = new FOTreeBuilder(); +_treeBuilder.setUserAgent(getUserAgent()); setupDefaultMappings(); } @@ -202,12 +204,15 @@ } public void setUserAgent(FOUserAgent agent) { +userAgent = agent; } private FOUserAgent getUserAgent() { -FOUserAgent ua = new FOUserAgent(); -ua.setLogger(log); -return ua; +if(userAgent == null) { +userAgent = new FOUserAgent(); +userAgent.setLogger(log); +} +return userAgent; } public void setLogger(Logger logger) { 1.35 +6 -1 xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java Index: FOTreeBuilder.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- FOTreeBuilder.java5 Mar 2002 10:26:36 - 1.34 +++ FOTreeBuilder.java18 Mar 2002 12:30:46 - 1.35 @@ -1,5 +1,5 @@ /* - * $Id: FOTreeBuilder.java,v 1.34 2002/03/05 10:26:36 keiron Exp $ + * $Id: FOTreeBuilder.java,v 1.35 2002/03/18 12:30:46 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. @@ -82,6 +82,11 @@ public void setUserAgent(FOUserAgent ua) { userAgent = ua; } + +public FOUserAgent getUserAgent() { +return userAgent; +} + public void setStreamRenderer(StreamRenderer streamRenderer) { this.streamRenderer = streamRenderer; 1.2 +19 -11xml-fop/src/org/apache/fop/render/pdf/PDFXMLHandler.java Index: PDFXMLHandler.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFXMLHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PDFXMLHandler.java8 Mar 2002 11:00:20 - 1.1 +++ PDFXMLHandler.java18 Mar 2002 12:30:46 - 1.2 @@ -1,5 +1,5 @@ /* - * $Id: PDFXMLHandler.java,v 1.1 2002/03/08 11:00:20 keiron Exp $ + * $Id: PDFXMLHandler.java,v 1.2 2002/03/18 12:30:46 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. @@ -59,7 +59,17 @@ public void handleXML(RendererContext context, Document doc, String ns) throws Exception { -PDFDocument pdfDoc = (PDFDocument) context.getProperty(PDF_DOCUMENT); +PDFInfo pdfi = getPDFInfo(context); + +String svg = http://www.w3.org/2000/svg;; +if (svg.equals(ns)) { +SVGHandler svghandler = new SVGHandler(); +svghandler.renderSVGDocument(context, doc, pdfi); +} else { +} +} + +public static PDFInfo getPDFInfo(RendererContext context) { PDFInfo pdfi = new PDFInfo(); pdfi.pdfDoc = (PDFDocument)context.getProperty(PDF_DOCUMENT); pdfi.currentStream = (PDFStream)context.getProperty(PDF_STREAM); @@ -70,18 +80,12 @@ pdfi.currentFontSize = ((Integer)context.getProperty(PDF_FONT_SIZE)).intValue(); pdfi.currentXPosition =