> J.Pietschmann wrote > I think we have a few slightly more pressing problems: > - improving the API to ease embedding (including Java2D embedding)
What has to be embedded? > Adding multiple output streams is certainly fun but I suspect the > bulk of the current users would be more interested in one of the > points above. And somehow I have the feeling that your approach could > easily get in the way, in particular I wouldn't like if it would > *increase* memory usage in general. Multiple output streams are here with FOP 0.x.x The AWT viewer uses the area tree as page cache and it's print function again. I'm experimenting with a new Graphics2D renderer. The attached description gives some hints to configuration/parametrization requirements. Directions, orientations, i18n will be the next topics. All I know at the time is that present renderers need heavy upgrades. Hansuli AndereggTitle: JPS Renderer/Viewer
FOP Renderer/Viewer based on Java Printing System, Graphics2D
Project: JPS Renderer/Viewer
Author: J.U. Anderegg
E-Mail: [EMAIL PROTECTED]
The Java Printing System enables applications to:
Print Java 2D™ graphics, text and images.
Control document-composition functions such as soft collating, reverse order printing, and booklet printing.
Invoke printer-specific functions such as duplex (two-sided) printing and stapling.
Print on all platforms, including Windows and Solaris.
Data stream generation by platform printer drivers.
Highlights
- Silent/interactive operation (page/printer/file dialogs)
- Output to printer or file
- Supported printers, data streams: PCL, AFP, Postscript, Text, PDF (PDFWriter required)
- Accurate output control by setting page/printer properties of drivers
- Several renderings per run
- Image Formats: JPEG, PNG, GIF (with JAI Image I/O Tools 1.0-rc also BMP, TIFF)
- SVG Support
- Embed HTML, RTF and TXT documents
- Orientation switch portrait/landscape within document
- Controls per print job
- Destination file
- Media sizes, bins, trays
- Page orientation
- Sides: simplex/duplex handling
- Print quality
- Chromaticity: color/monochrom
- Copies
- Finishings
- NumberUp, Imposition
Environment
Tested with
Win2K, FOP 0.20.5rc2, Java 1.4.2, JAI Image I/O Tools 1.0-rc, Batik-1.5
Compatibility
Images are handled by Image I/O, FOP's image handling is overridden.
Installation
- install FOP, Java 1.4, Batik-1.5 and optionally JAI Image I/O Tools
- copy file FOPjps.zip to disk
- install printers
- select national language versions so that font names match
- set properties according to your needs
- edit renderer configuration file
- see description below
- sample: rendercfg00.txt
- edit printer configuration files
- copy the printer names correctly from your list of printers
- lookup attribute codes in Java source Print2DAttr.java
- see description below
- samples: prtcfgxx.txt
- platform fonts other than "Helvetica", "Times", "Courier", "serif", "sans-serif", "monospace":
- generate font metrics
- modify the FOP user configuration
run procedure
- replace path names with your path names
- set the national language option for your JVM so that font names match
- sample: execSingle.bat, execMulti.bat
program: org.apache.fop.render.jps.Run2D
Use URL's: e.g. file:///C:...
arguments
- argument 0: user configuration file
- 'single file formatting' or 'batch formatting'
single file formatting
preview: interactive mode
- argument 1: xsl-fo input file
- argument 2: renderer configuration file
- argument 3: 'view' - viewer is launched
silent mode
- arguments 3, 4, ...: An arguments for each output.
Tokens are separated by commas.
- token 0: printer configuration file
- optional token 1: [,destination = print file]
multiple FO files formatting
- argument 1: 'controlfile', URL
- URL: file containing lines same as 'formatting a single FO file' above
Renderer Configuration Files
// in colunm 1-2 | comment |
debug | display platform printer and font info, trace processing |
SVGimageResolution=resolution | resolution: requested image resolution |
adjustPrinterResolution | If specified, the lowest resolution from (1200, 600, 300, 150, 72) fitting into the area is selected. Otherwise the image is scaled to fit the area. |
HelveticaMap=Arial
TimesMap=Times New Roman CourierMap=Courier New SymbolMap=Symbol ZapfDingbatsMap=ZapfDingbats | Font maps, substitution for standard fonts. This applies also to
sans-serif --> Helvetica serif --> Times monospace --> Courier |
Printer Configuration Files
// in colunm 1-2 | comment |
copies=n | n: numbers of copies |
printer=printerName | printerName: printer name, your platform knows |
attributes=n1 n2 n3 .... | n.: attribute code as specified in Java source Print2DAttr.java |
Embedding RTF, HTML and TXT Documents
- HTML 3.2 is supported. RTF about at the level of WordPad.
- Additional pages are inserted: specify block break-before="page"
- Document specification: external-graphic src=""SVGimageResolution". The viewbox is scaled proportionally.
- SVG instream-foreign-objects need the width and height attributes.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]