AW: Regression tests was: Re: Output from NIST test suite

2003-12-26 Thread J.U. Anderegg
 Peter Kullmann wrote:

 As an alternative approach for c) one could create tests along
 the following lines: Suppose you want to test left margin
 properties of a block. For this a simple fo file is rendered as
 a bitmap. The bitmap will not be compared to a reference bitmap
 but some elementary assertions are calculated. For instance one
 such assertion could be: The rectangle of width 1 inch of the
 left edge is blank. I don't know of a tool that can do this
 but it should be pretty straight forward to implement.


There are 2 test points: renderer input and renderer output:

- Renderer input: establish the SVG renderer as reference and use an 'XML
file compare' program. The XSL Committee will hopefully prepare samples to
demonstrate and validate concepts and rules.

- Renderer output: Acrobat has a 'PDF document compare' function. This type
of the tool validates the PDF renderer. The AWT renderer can be validated
too by having the Java Printing System generate a PDF document with a PDF
printer driver. The Java Printing System can generate PCL files as well, if
better suited.

There will always be problems, because equivalent, valid results may be
achieved by different graphic objects or different sequences of graphic
calls. Therefore there will always be automated and manual/visual methods.

Hansuli Anderegg




AW: AW: What should I be doing ?

2003-12-20 Thread J.U. Anderegg
Christian Ziesemer wrote:

 Do you know other projects dealing with high quality typesetting with
 Java or if Java 1.5 will bring improvements? I'm thinking about writing
 my diploma thesis about how to extend the current/implement a
 typesetting API for Java.

Batik extends text attributes with kerning, word and character spacing. The
beauty of pure Java2D text is : you do not have to preprocess fonts files
and to deal with glyph metrics. If you want I will send you my font test
program. There will be a Java2D text rework in Java 1.5 to eliminate bugs
and improve some internals.

What is your idea of a typesetting API? Something like a FOP renderer
interface, storing a document as graphics objects in memory, a formatter?

Hansuli Anderegg




AW: What should I be doing ?

2003-12-17 Thread J.U. Anderegg
It might be helpful to take the renderer programmer's view:

- A meaningful renderer interface has to be specified now, i.e. the
representation of pages either in memory or serialized. More supported XSL
properties lead to bigger storage requirements.

- Renderers take over pages consisting from some graphic objects with
absolute sizes and positions. Anything between FO input and these graphics
is completely irrelevant to renderers.

- Layouters and area tree builders may produce fantastic documents on an
extremely efficient way, conforming to specifications etc.: but what, if
renderers are not able to render graphic objects, to handle orientations and
directions - as it's the case with the PCL renderer nowadays?

- Testing, validation is another topic. Java2D is the reliable rendering
system unless you want to use the Adobe product as benchmark.

When it comes to a Java2D renderer (former AWT renderer), there are these
facts regarding text rendering, font support:

o Java supports TrueType, OPI and Type1 fonts
o XSL properties : Java TextAttribute's = 1:1
- TextAttribute maps give a binary object representation for XSL font
properties in Java (more Float's than int's)
- Java2D 1.4 does not process stretch and weight properly (hopefully fixed
in Java 1.5), variant is not supported
- font face picking by Java 1.4 is funny: a static font mapping is required
to get predictable results
o Java2D supports font metrics, i18n, bidi and Unicode well
o Java2D does not support
- word and character spacing: may be programmed by inserting white space
- kerning: info not available in font metrics

Similar observations apply to Java2D strokes, rectangles and images.

Hansuli Anderegg




A Java2D Renderer/Viewer Prototype

2003-07-10 Thread J.U. Anderegg
Orientations, writing directions, bidi, Asian languages, precise
coordinates, drawing priorities, page caching, paragraph formatting: this
renderer/viewer handles it. With low memory usage.

See: http://mypage.bluewin.ch/huanderegg

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



AW: Alternative API proposal (was: startup refactoring)

2003-06-26 Thread J.U. Anderegg
 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 Anderegg
Title: 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
debugdisplay platform printer and font info, trace processing
SVGimageResolution=resolutionresolution: requested image resolution
adjustPrinterResolutionIf 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-2comment
copies=nn: numbers of copies
printer=printerNameprinterName: 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 viewb

AW: Structure renderers area trees (Re: startup refactoring)

2003-06-23 Thread J.U. Anderegg
 Bertrand Delacretaz wrote
 The whole point of the StructureHandler interface is to be able to 
 reuse FOP's frontend for structure-based renderers.
 The impact of StructureHandler on the standard FOP output formats 
 (PDF mostly) is minor, but it allows the FOP pipeline to branch 
 cleanly, after the parsing and attributes resolution, to generate 
 either structure-based or page-based formats.
 

How do you plan to handle RTF styles?

Is it difficult to transform tables and lists?

Hansuli Anderegg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



AW: AW: Structure renderers area trees (Re: startup refactoring)

2003-06-23 Thread J.U. Anderegg
 Bertrand Delacretaz wrote:
 ...
  How do you plan to handle RTF styles?

 In jfor we defined an extension to XSL-FO (the jfor-style attribute)
 to control RTF styles.

 I think some form of extension is needed as (AFAIK) the concept of
 styles does not exist in XSL-FO, as it is meant for printed output.


(1) This is not a FOP extension, but rather a fundamental change of the
XSL-FO language, which does not know stlye sheets.

 Another way would be to recognize sets of attribute values in the input
 XSL-FO and map them to RTF styles.


(2) I wrote a few weeks ago this and it is still my idea, how FOP should
store properties:

Apply the principles of relational databases to eliminate redundancies: set
up tables of unique/used fonts, strokes, colors, ...  and have the objects
reference table entries. This will cost table lookups, CPU. However, it will
also ease state processing. The program does not have to keep track of
inherited properties set 300 FO elements earlier. The nuisance is that style
sheets have acceptable redundancy (see DocBook), XSLT replicates properties
innumerable times and FOP has to recollect and normalize all this stuff.

My opinion:

(1) is off FOP territory
(2) to be considered, if FOP is implemented on this way

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



AW: startup refactoring

2003-06-21 Thread J.U. Anderegg
A FOP renderer cannot support fonts. Physical devices, output systems do
this. But a FOP renderer may allow to map fonts and translate Unicode
characters to bytes using codepages. The user has to take care that font
metrics and it's character sets are accurate enough for all target devices
and better does not try to print Helvetica on a matrix printer or paint
color on a black/white laser printer.

Current FOP uses a mix of Adobe and Java font systems: less would be more.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



AW: startup refactoring

2003-06-20 Thread J.U. Anderegg
The current FOP is not fit for i18n, directions, area orientations and does
not even support a dotted line. Renderes too. Design correct data objects in
the first place instead of fancy control mechanisms.
- what do pipelines look like?
- are there really pipelines or are partial document fragments passed on?
What's in memory at any time?

main
o initialize
o parse XSL
o layout pages
o render x times

initialize
o process config
output: global config objects
o get platform info
output: global platform objects

parse XSL
o process layout-master-sets, page-sequences
output: internal page description objects

o process flows
- standardize properties (measurements, property synonyms)
- resolve XSL inheritance to avoid tricky states, switches
- calculate FO dimensions as far as possible and transform
output content: to a suitable representation (my favorite: Graphics2D)
  output document stucture, areas: into FOTree with pointers to content
output unique property/attribute maps: memory savers

layout pages
o apply page descriptions to flows
o paginate: fill pages sequentially, split content objects
o resolve references
output: content objects supplemented with page coordinates on a
device-independent way
o baptize the result Area Tree

render
o process renderer configuration
o output content objects in a device-dependent format

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



AW: hack to avoid memory overflow with tables

2003-05-30 Thread J.U. Anderegg
 Glen Mazza wrote:
 FOP's goals should be (1) to be compliant/accurate with the spec

The Area Tree is an implementation specification: either the XSL editors
remove it from the specs or they specify it precisely as a portable,
device-independent print file format. I ran Chuck Paussa's FO schema thru
Castor. Anything goes and is formally valid.

 (2) be able to generate the largest numbers of huge files in the smallest
amount of time.

Is the design optimized for big DocBooks, accounting reports 15'000 uniform
pages long, many small business documents?

Reminder on renderer requirements:

o Data: basic draw objects (current FOP uses nothing else from the area
tree).
o Physical printers: pages in a sequential data stream
o AWT viewer: random access to pages
o PDF: finished pages may be shipped to the renderer, accepted page
references don't cause page break changes.

 To me, multiple layout strategies is
 really like saying multiple applications.  (After all,
 the layout handler and renderers *form* an XSL FO
 formatter.)

Is there a common agreement on FOP components, processing modes (push/pull),
intermediate data storage and the suitable interfaces?

An overall design given, plugins and multiple layout strategies can be
defined and evaluated. Most likely the findings will be: there is one layout
strategy. Playing with spacing and balancing, hyphenation is switched off on
demand. Plus some performance tips like: do not use forward page references,
auto-sized big tables, text columns ...

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



AW: AW: Thoughts on design - FO property expressions

2003-05-28 Thread J.U. Anderegg
 Peter B. West wrote:

 You seem to be familiar with some of the
 swing.javax.text classes.

Yes, as a user of these classes: no need to know internals.


 Can you sketch the approach out in a bit more
 detail?  Have you looked at percentages?


See a description javax.swing.text: Interface Document. There is HTML
support. Perhaps an evaluation of an XSL adaption makes sense.

Asap I will try to embed HTML into FOP documents and test your percentages.
If it works, find out how. If not, find out what HTML specifies on
percentages.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



A FOP Renderer based on Java Printing System and Grapics2D

2003-04-05 Thread J.U. Anderegg
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.

My renderer, based on the Java Printing System and Graphics2D: pure Java
does a perfect job. I will send sources, classes, documentation on request
to my e-mail address.
__

Highlights

- Operation: silent or page/printer dialog
- direct printing or output to file
- Supported printers, data streams: PCL, AFP, Postscript, Text, PDF
(PDFWriter required)
- Precise 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,
TIF)
- SVG Support
- Controls per print job
o Destination file
o Media sizes, bins, trays
o Page orientation
o Sides: simplex/duplex handling
o Print quality
o Chromaticity: color/monochrom
o Copies
o Finishings
o NumberUp, Imposition
__

Test Environment

- Win2K
- FOP 0.20.5rc2
- Java 1.4.1
- JAI Image I/O Tools 1.0-rc
- Batik-1.5
__

Sample Printer Configuration:

// double-slash is comment

// debug: lists system printer and and fontinfo
debug

// silent: dont prompt page/printer dialog
silent

// destination: print to file
destination=file:///C:/fop-0.20.4rc/AnyExtensions/print2D.txt

//copies=1

// printer: select an installed printer
printer=hp psc 700 series
//printer=HP LaserJet 5M
//printer=HP LaserJet 4/4M PS
//printer=Generic / Text Only
//printer=Acrobat PDFWriter

// attributes: specify JPS attributes
// PORTRAIT=102 ISO_A4=414
attributes=102 414

// SVGimageResolution: the renderer has SVG rasterized to the available area
size at this resolution
SVGimageResolution=300

// adjustPrinterResolution: scale at resolutions 72 or 150 or 300 or 600 to
fit the available area most closely
adjustPrinterResolution

// map standard fonts to platform fonts
HelveticaMap=Arial
TimesMap=Times New Roman
CourierMap=Courier New



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



AW: PDF transforms (was: Re: File prefix again)

2002-12-23 Thread J.U. Anderegg
Hi Keiron,

 On Sun, 2002-12-22 at 02:18, Kevin O'Neill wrote:
  Is the paged XML a new or existing format?

 A new format for now at least.

 It is possible there will be a w3c defined format.

Please give some pointer to w3c activities in this area. What is this thing
exactly supposed to do? What have externals to look like? etc...

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Sun XSL Formatter

2002-12-18 Thread J.U. Anderegg
Whatever the motivation of Sun was, FOP has to be postitioned in the IT
world.

What runs in which environment? Which output types are supported?

- Adobe announced PDF support (in a Windows environment?)
- IBM announced AFP support in a Java environment
- Sun's XSL:FO supports PDF (in a UNIX or Windows environment?)
- FOP supports SEVERAL output types in a Java environment

Operation

- FOP: standalone batch, servlet

Extensibility = features not defined by XSL:FO, e.g. renderers, bookmarks,
barcodes, SVG

Optimized document types: big books vs. business forms/outputs

Only when the design and details of the Sun XSL Formatter will be known,
consequences for FOP may be discussed on a productive way.


Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Disable save button in acrobat reader

2002-12-12 Thread J.U. Anderegg
 Gorka Echevarría wrote:

   Anybody knows how can I disable the save button on Acrobat Reader?

Ask this question in a PDF forum!

The next question will be: is FOP able to output PDF documents with the
required properties? I guess AcroScripts will do the job.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




New: AFP Renderer / Batch Assembler for FOP

2002-12-07 Thread J.U. Anderegg
For details see:

see http://mypage.bluewin.ch/huanderegg

Topics of general interest:

- use of Jeremias Maerki's extension sample: for PDF bookmarks, JavaScripts,
barcodes?
- Java Image I/O
- decoupling the renderer

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Form XObject (was: Re: Avalonization?)

2002-11-12 Thread J.U. Anderegg
 On Tue, 2002-11-12 at 12:00, Kevin O'Neill wrote:
   I just added a Form XObject but it needs some work (eg. bounds).
 
  How do you intend to pass xobject hits from the fo processor. I had
  thought about a fop specific attribute that was a hint on block level
  objects.

What does your xsl:fo input look like? Standard xsl:fo according to specs?

 Von: Keiron Liddle [mailto:keiron;aftexsw.com]
I'm not sure what situation you might be talking about. So to speculate:
 If it is to use xobject when there are things repeated across pages
 (static areas, table header, svg) then it could be done through the
 layout managers. If the content may be repeated and does not depend on
 the page then it could set a value on the area tree saying that the area
 (and contents) should be placed in a xobject. When the same area occurs
 again, indicated by a key or something, then it will render the xobject
 again.


What do PDF XObjects, Bookmarks, form fields have to do in the area tree?
How about device independence? How will the PCL and AWT renderers process
XObjects?

A layered distiction between the jobs of a (device independent) fo formatter
and the renderers (generation of device dependent graphic streams, caching,
ressource management) will keep the system maintainable. This can be
achieved by instream-foreign-objects: the fo proscessor calculates page
numbers/positions, reserves presentation spaces and passes foreign-object
contents/control unchanged and unchecked to renderers.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: [RT] Proprietary extension to fo:external-graphic

2002-11-08 Thread J.U. Anderegg
Considering PDF only, I see prefabricated image XObjects as a very powerful
feature.

Extracting image XObjects from PDF files and storing them for use by the
renderer brings two advantages:

a) saves CPU and memory at a maximum

b) the user controls image representation/handling in PDFs.

Writing an extract program and progamming the renderer is straightforward,
caching is solved for PDF. Remains to tell FOP how to handle these
external-graphics.

Hansuli Anderegg

Sample image XObject to be inserted into PDF file by PDF renderer

21 0 obj === adjust PDF object ID
/Type /XObject
/Subtype /Image
/Name /Im6
/Length 89957 === original PNG file is 56KB
/Width 256  === in pixels
/Height 256 === in pixels
/BitsPerComponent 8
/ColorSpace /DeviceRGB
/Filter [ /ASCII85Decode /FlateDecode ]

stream
GarT@BuGTQ2\N




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




fo:external-graphic in PDF

2002-11-06 Thread J.U. Anderegg
This is how it used to work:

o anywhere in FOP formatting

- load image, if same URL was not loaded before and find out the space
needed for the image.
- keep list of processed files.

o PDF Renderer:

- generate XObject, if XObject of same URL was not generated before. Delete
image buffer: partial image cleanup only?
- keep list of generated XObjects.
- reference/reuse the XObject as often as required in content streams,
scaled to different sizes

A simple design:

o FOP formatting determines space needed = partial reading of image files
o Renderers control image processing according to their needs. The PDF
renderer does not need any caching: maximum 1 image in memory at a time.
- additional attributes for external-graphic might be helpful, e.g.
resolution, color model
- Isolation image processing in renderers will solve SVG caching more
easily.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: storing metadata

2002-10-28 Thread J.U. Anderegg
Hi Paul,

this is how Acrobat embeds files. Follow the indirect PDF object references:

5 0 obj

/Pages 2 0 R
/Type /Catalog
/Metadata 19 0 R
/Names 17 0 R --- add this entry

endobj

17 0 obj --- add this object

/EmbeddedFiles 18 0 R

endobj

18 0 obj --- add this object

/Names [ (?y M y D a t a)14 0 R ] --- relate internal name to file object

endobj

14 0 obj --- add this file object

/F (eink03.txt)
/Type /F
/EF  /F 15 0 R   --- file content reference

endobj

15 0 obj --- add file content
 /Filter [ /FlateDecode ] /Length 1913 /Type /EmbeddedFile /Params 
/CheckSum 0a9b1bb2b166ecefaaf4a9e028e70567/Size 9296 /CreationDate
(D:20020326101325)
/ModDate (D:20020326101330)
/Subtype /text#2Fplain 
stream
H??WM?$5??4y!/}a???8O
...
endstream
endobj

Question: why storing XSL:FO instead of XML + XSL - having the user edit XML
data and FOP reformat, repaginate the document?

Hansuli Anderegg
__

Metadata look like this:


19 0 obj
 /Type /Metadata /Subtype /XML /Length 1311 
stream
?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d' bytes='1311'?

rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
 xmlns:iX='http://ns.adobe.com/iX/1.0/'

 rdf:Description about=''
  xmlns='http://ns.adobe.com/pdf/1.3/'
  xmlns:pdf='http://ns.adobe.com/pdf/1.3/'
  pdf:CreatorDokument - WordPad/pdf:Creator
  pdf:CreationDate2002-10-28T14:03:58Z/pdf:CreationDate
  pdf:TitleDokument/pdf:Title
  pdf:AuthorAdministrator/pdf:Author
  pdf:ProducerAcrobat PDFWriter 5.0 for Windows NT/pdf:Producer
  pdf:ModDate2002-10-28T14:08:28+01:00/pdf:ModDate
 /rdf:Description

 rdf:Description about=''
  xmlns='http://ns.adobe.com/xap/1.0/'
  xmlns:xap='http://ns.adobe.com/xap/1.0/'
  xap:CreateDate2002-10-28T14:03:58Z/xap:CreateDate
  xap:Title
   rdf:Alt
rdf:li xml:lang='x-default'Dokument/rdf:li
   /rdf:Alt
  /xap:Title
  xap:AuthorAdministrator/xap:Author
  xap:ModifyDate2002-10-28T14:08:28+01:00/xap:ModifyDate
  xap:MetadataDate2002-10-28T14:08:28+01:00/xap:MetadataDate
 /rdf:Description

 rdf:Description about=''
  xmlns='http://purl.org/dc/elements/1.1/'
  xmlns:dc='http://purl.org/dc/elements/1.1/'
  dc:titleDokument/dc:title
  dc:creatorAdministrator/dc:creator
 /rdf:Description

/rdf:RDF
?xpacket end='r'?
endstream
endobj



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: storing metadata

2002-10-24 Thread J.U. Anderegg
Hi Paul,

Do you want to embed the XSL:FO input in the PDF document?

If this is so:
o embedding files in PDF is the thing to do, but quite a challenge to
build into the PDF renderer.
o out of pure curiosity: why?

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: BARCODE

2002-10-09 Thread J.U. Anderegg

Why not a fast, flexible and reliable solution? 3 things are needed:

o Java routines to calculate barcode rectangles and label areas depending
from barcode type and its parameters. Possibly such routines are freely
available. Otherwise: give me the specs, I will write the code (the nowadays
popular datamatrix will be harder) and somebody has to run scan tests.

o Java code to render the rectangles: very easy in PDF

o Handy XSL:FO Input. My experimental hack below is functionally OK allowing
barcode type selection with appropriate parameters. The renderer extensions
is quite easy and elegant.


Hansuli Anderegg
__

Barcode Input

fo:block width=0pt height=0pt
fo:instream-foreign-object width=0pt height=0pt
svg:svg width=0 height=0
svg:desccontent: bar3of9, D014679, 60.0, 600.0, 18.0, 1.44,
2.25/svg:desc
 ||| |  | | |
 ||| |  | | + 
ration narrow/wide
 ||| |  | + module 
width
 ||| |  + height
 ||| + y position
 ||+ x position
 |+ barcode data
 + barcode type
/svg:svg
/fo:instream-foreign-object
/fo:block




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Adding Arial font support

2002-08-01 Thread J.U. Anderegg

from PDF Reference p.319

Standard Type 1 Fonts

The PostScript names of 14 Type 1 fonts, known as the standard fonts, are as
follows:

1  HelveticaSans-Serif
2  Helvetica?Bold
3  Helvetica?Oblique
4  Helvetica?BoldOblique
5  Times?Roman  Serif
6  Times?Bold
7  Times?Italic
8  Times?BoldItalic
9  Courier  MonoSpaced
10 Courier?Bold
11 Courier?Oblique
12 Courier?BoldOblique
Symbol
13 Symbol
14 ZapfDingbats

These fonts, or their font metrics and suitable substitution fonts, are
guaranteed
to be available to the viewer application.

+-+-+--+
-+
| Postscript Fonts  |  XSL:FO properties
|| |
+-+-+--+
-+
| F1  |Helvetica|  Helvetica | sans-serif, normal,
normal|
| F2  |HelveticaOblique |  Helvetica | sans-serif, oblique,
normal   |
| | |  Helvetica | sans-serif, italic,
normal|
| F3  |HelveticaBold|  Helvetica | sans-serif, normal,
bold  |
| F4  |HelveticaBoldOblique |  Helvetica | sans-serif, oblique,
bold |
| | |  Helvetica | sans-serif, italic,
bold  |
| F5  |TimesRoman   |  Times | serif, normal, normal
|
| F6  |TimesItalic  |  Times | serif, oblique,
normal|
| | |  Times | serif, italic, normal
|
| F7  |TimesBold|  Times | serif, normal, bold
|
| F8  |TimesBoldItalic  |  Times | serif, oblique, bold
|
| | |  Times | serif, italic, bold
|
| F9  |Courier  |  Courier| monospace, normal,
normal |
| F10 |CourierOblique   |  Courier| monospace, oblique,
normal|
| | |  Courier| monospace, italic,
normal |
| F11 |CourierBold  |  Courier| monospace, normal,
bold   |
| F12 |CourierBoldOblique   |  Courier| monospace, oblique,
bold  |
| | |  Courier| monospace, italic,
bold   |
| F13 |Symbol   |  Symbol|
|
| F14 |ZapfDingbats |  ZapfDingbats  |
|
+-+-+--+
-+


__


from PDF Reference p.319


Table H.3 shows the complete list of font names that are accepted as the
names of standard fonts. In each group, the ?rst name (for example,
Helvetica) is the proper one; the others (Arial, ArialMT) are alternatives.

TABLE H.3 Names of standard fonts

Times?Roman Helvetica   Courier
TimesNewRoman   Arial   CourierNew
TimesNewRomanPS ArialMT CourierNewPSMT
TimesNewRomanPSMT

Times?Bold  Helvetica?Bold  Courier?Bold
TimesNewRoman?Bold  Helvetica,Bold  Courier,Bold
TimesNewRoman,Bold  Arial?Bold  CourierNew?Bold
TimesNewRomanPS?BoldArial,Bold  CourierNew,Bold
TimesNewRomanPS?BoldMT  Arial?BoldMTCourierNewPS?BoldMT

Times?ItalicHelvetica?Oblique   Courier?Oblique
TimesNewRoman?ItalicHelvetica?ItalicCourier,Italic
TimesNewRoman,ItalicHelvetica,ItalicCourierNew?Italic
TimesNewRomanPS?Italic  Arial?ItalicCourierNew,Italic
TimesNewRomanPS?ItalicMTArial,ItalicCourierNewPS?ItalicMT
Arial?ItalicMT

Times?BoldItalicHelvetica?BoldOblique   Courier?BoldOblique
TimesNewRoman?BoldItalicHelvetica?BoldItalicCourier,BoldItalic
TimesNewRoman,BoldItalicHelvetica,BoldItalicCourierNew?BoldItalic
TimesNewRomanPS?BoldItalic  Arial?BoldItalicCourierNew,BoldItalic
TimesNewRomanPS?BoldItalicMTArial,BoldItalic
CourierNewPS?BoldItalicMT
Arial?BoldItalicMT

Symbol  ZapfDingbats


__

Conclusion: just use standard fonts unless you are going for a beauty
contest.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: OutofMemoryException

2002-07-25 Thread J.U. Anderegg

To attack the problem:

o split the job into 2 steps:
- XSL transformation writes XSL:FO to a file
- FOP formats the file

o use another renderer: text e.g.

o vary the input
- reduce the volume: when does it blow up?
- eliminate distinct elements

You will pretty soon see the source of the troubles.  


Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: FO to RTF

2002-07-24 Thread J.U. Anderegg

Rendering RTF from the FOP area tree will produce a document edited without
template (.dot).

RTF is a revisable format - not a formatted document format. XSL:FO is an
extensive formatting language without any kind document elements (like
Adobe's e-Book), macros or stylesheets in the original meaning. Have a look
at Microsoft's Office XML and you will  see incompatible concepts. RTF
generation has to happen at the XSLT layer.

Hansuli Anderegg, Zurich





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: PDF output driver

2002-07-24 Thread J.U. Anderegg

Let's talk component software (or blame monolithic MicrosSoft)!

- Formatting has to be separated strictly from rendering
o A clean and stable interface has to be defined (why not by data
representations of powerful PDF?)
o The renderer has to control the processing sequence.

- FOP does what the XSL:FO specs say - no more and no less:
o external-graphics are not really specified in XSL:FO, so let additional
attributes pass and let the renderer do the job.
o foreign-object is by chance SVG: let foreign be foreign and pass
foreign-object's without checks thru to the renderer.

The area of contributors and hackers is renderers and foreign-objects, so
that the FOP core can be kept clean and preserved from release dependencies
(Batik, JAI etc.)

Hansuli Anderegg, Zurich





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: AW: [REDESIGN] pdf changes

2002-07-03 Thread J.U. Anderegg

XREF

PDF objects have to be written PHYSICALLY in ascending sequence of the PDF
object ID's. This is a requirement of the present XREF handling. If tis
condition is fulfilled and PDF syntax is correct, there is most likely a
length in error.


Page viewport in PDF is the /Cropbox

Cropbox:
x = left page marging
y = bottom page margin
width = page size - left margin - right margin
height = page height - top margin - bottom margin

o The page margins have to be passed to the renderer.
o Coordinates are relative to the crop box (to be checked): the renderer has
to adjust.

Hansuli Anderegg, Zurich



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: [REDESIGN] pdf changes

2002-07-02 Thread J.U. Anderegg

Keiron wrote:

- added transparency for shapes and alpha mask for images

well, what has to be transparent? Background images or overlaying text?
- 82 pages: Transparency in PDF, Technical Note #5407, Adobe Developer
Technologies

- Outputs pdf objects immediately
Unortunately I have broken the xref table and I can't figure out what is
wrong.

The XREF is built incrementally in parallel to file writing. So your PDF
object has to wait, until it is it's turn to output to the file.

Example: image xObject on page in PDFRenderer

- create xObject: say PDF object ID 27
- add xObject to page objects
- output page objects: method toPDF of objects say 20-30 is invoked
. object 27: do the data/processing intensive things at this time

If you send me the code, I can figure out what the problem is.

Hansuli Anderegg, Zurich



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: image support (was: RE: Fop and JDK1.2 (using ant copy tasks toselect implementations))

2002-06-13 Thread J.U. Anderegg

The good library is here: Java Advanced Imaging. In a few days I will have a
sample PDF renderer using it.

o BMP, GIF, TIF, JPG, FPX, PNM and SVG are processed.
o Immediate file operations: 1 image in memory at a time
o caching, reuse by PDF features


Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Antw: AW: printing the correct document

2002-06-10 Thread J.U. Anderegg

Copy from Adobe Knowledge Base:


PDF File Prints Off-Center to HP 1120c, Epson Stylus 860, and Epson Stylus
656

Issue
When you print a PDF file from an Adobe Acrobat 4.0 or later product (such
as Acrobat or Acrobat Reader) to a Hewlett-Packard (HP) 1120c printer, an
Epson Stylus 860 printer, or an Epson Stylus 656 printer, the resulting page
is off-center by 1/8 to 1/4.


Solution

Print to a PostScript printer.


Additional Information

Acrobat products may not print correctly to HP DeskJet 1120c, Epson Stylus
860, and Epson Stylus 656 printers.


_


Copy from HP PSC 750 help: HP printers have unprintable margins.


Papier
ObenUnten   LinksRechts
US Letter   1,8 mm  11,7 mm 6,4 mm  6,4 mm
US Legal1,8 mm  11,7 mm 6,4 mm  6,4 mm
US Executive1,8 mm  11,7 mm 6,4 mm  6,4 mm
ISO A4  1,8 mm  11,7 mm 3,4 mm  3,4 mm
ISO A5  1,8 mm  11,7 mm 3,4 mm  3,4 mm
JIS B5  1,8 mm  11,7 mm 3,4 mm  3,4 mm
Briefumschläge

US Nr. 10   3,2 mm  11,7 mm 3,2 mm  3,2 mm
A2 (5,5 quadratisch)3,2 mm  11,7 mm 3,2 mm  3,2 mm
Intnl. DL   3,2 mm  11,7 mm 3,2 mm  3,2 mm
Intnl. C6   3,2 mm  11,7 mm 3,2 mm  3,2 mm
Karten

US 3 x 8   1,8 mm  11,7 mm 3,2 mm  3,2 mm
US 4 x 6   1,8 mm  11,7 mm 3,2 mm  3,2 mm
US 5 x 8   1,8 mm  11,7 mm 3,2 mm  3,2 mm
ISO und JIS A6  1,8 mm  11,7 mm 3,2 mm  3,2 mm
Hagaki  1,8 mm  11,7 mm 3,2 mm  3,2 mm


_

That's the way it is. Try to define a page size reduced by the unprintable
margins and use the remaining space fully:

fo:simple-page-master margin-left=0mm margin-right=0mm margin-top=3mm
master-name=page page-height=286mm page-width=203mm

Who knows what happens if you use endless paper?

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Renderer Analysis

2002-06-08 Thread J.U. Anderegg

In order to learn the page geometry I built a trace into the PDFRenderer.
Then I found that SVG can be written easily at the trace points. An analysis
of the results follows.



Coordinates (o) received by the renderer: PDF with origin left/bottom

PDF
Rectangle
|||
|||
||+---
|o
+-

Line
+---
o-
+-

Coordinates used by SVG with origin left/top

Rectangle
o-
|+
||+---
|||
|||

Line
o---
|-
+-

_

Text Block

o There is a hidden overpainting priority: last one in time sequence wins

   The blue background rectangle

descFilledRect/desc
rect x=70 y=115 width=453 height=-22 fill=rgb(0.0,0.0,255.0)/

o FOP sends a negative height with corresponding reference coordinates: not
suppported by SVG

   Borders

descFilledRect/desc
rect x=70 y=113 width=453 height=2 fill=rgb(255.0,0.0,0.0)/
descFilledRect/desc
-- rect x=68 y=113 width=2 height=26 fill=rgb(255.0,0.0,0.0)/
descFilledRect/desc
rect x=524 y=113 width=2 height=26 fill=rgb(255.0,0.0,0.0)/
descFilledRect/desc
rect x=70 y=138 width=453 height=2 fill=rgb(255.0,0.0,0.0)/

o Painted by 4 rectangles
o Left border is shifted out into the left margin --

   o Shipping borders as filled rectangles
- prevents correct SVG positioning
- dotted, dashed borders (anyway no properties available at present)

   Text

text x=70 y=131 font-size=18 font-family=sans-serif
fill=rgb(255.0,255.0,0.0)linked_to/text
text x=147 y=131 font-size=18 font-family=sans-serif
fill=rgb(255.0,255.0,0.0)text2/text
text x=191 y=131 font-size=18 font-family=sans-serif
fill=rgb(255.0,255.0,255.0)inline/text
text x=238 y=131 font-size=18 font-family=sans-serif
fill=rgb(255.0,255.0,0.0)text2/text



An Image

descrenderImage URL
file:C:/HU/alt/Fop-0.20.1/docs/graphics/fop.jpg/desc
rect x=70 y=156 width=100 height=60 /

o Reference coordinates top/left
o How big is an image given pixels/lines and rows without resolution? The
formatter has to know the extent of the image and no more.
o The renderer has to handle various image formats and cache images if
needed at all.
o As a courtesy the formatter can determine image formats and some image
properties as a common task, e.g.
- pixels/lines and rows to allow a proportional scaling
- color model
- compression
o Java 1.4's Advanced Imaging and Image I/O will allow a comfortable
programming
o If the basics of image and PDF are known, image processing is a file
copy.



The Internal Link

   First comes the text

text x=70 y=242 font-size=12 font-family=sans-serif
fill=rgb(0.0,0.0,0.0)before_link/text
text x=132 y=242 font-size=12 font-family=sans-serif
fill=rgb(0.0,0.0,0.0)internal_link/text
text x=200 y=242 font-size=12 font-family=sans-serif
fill=rgb(0.0,0.0,0.0)after_link/text


   and much later the link out of context
rect x=129 y=229 width=64 height=12 /

o This is PDF principle of operation: OK, if device/format independence is
no goal of FOP



Foreign Object: SVG

rect fill=none stroke-width=1 stroke=black x=70 y=262
width=250 height=50 /

o At present Foreign Object = SVG.
o The renderer can have it transcoded by Batik into a JPEG: about a dozen
statements.
o Transcoder parameters: customization by compiling a Java class?
o Postprocessing like an image.
o The formatter has to know the extent of the object and no more.



o PDF rendering happens at about 6 trace points. PDFRenderer has lots of
unused code.

o A precise page geometry has to be calculated by the formatter: spaces,
(collapsing) borders, padding.

o Know the features of PDF and Java: correct graphic object (line,
rectangle, PDF path and stroke), caching, ressource management.

A formatter formats and a renderer renders. A strict separation is desirable
(keyword: device independence)- very few mutual imports. The formatter needs
only area dimensions and has to pass data to the renderer instead of
controlling and pushing it. xsl:fo input has to be setup, so that the
formatter just has to process text. No digging 

AW: printing the correct document

2002-06-08 Thread J.U. Anderegg

Guten Tag,

schicken Sie mir die Input xsl:fo? Dann kann ich den Fall einmal anschauen.

Mit freundlichen Gruessen
Hansuli Anderegg
Tel. 01-381-0207




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




PDF Tests

2002-06-05 Thread J.U. Anderegg

View the PDF document with a Browser, e.g Internet Explorer. Keep it open
during your test session and reload the file when a new document version is
written. There are no file locking/sharing problems, no need to change file
names. I suppose print fidelity is kept.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Running Prefligh PDF tools on PDF files produced by FOP

2002-05-28 Thread J.U. Anderegg

Matthew Brook O'Donnell schrieb:

 cause a 'fatal PDF error' in PitStop, even without the modification
 of (_data.size() + 1) to _data.size() in the PDFStream class that Hansuli
 proposed.

 However, I haven't been able to produce PDF that pass with 0.20.3 (even
with
 the proposed patch).

[..]

 Were there significant change in the PDF output classes between 0.20.2
and
 0.20.3?

As already mentioned the following bug sounds suspect:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9054

 Christian

It is this bug: inserts of Tc into the PDF stream

Hansuli Anderegg





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: PS Renderer patch

2002-05-27 Thread J.U. Anderegg

The coordinates x/y have to be defined: outer, inner, center of the border
line?

PDF renderer FOP-0.20.1

o draws a box with 4 filled rectangles - each border line is a filled
rectangle. The SVG trace below demonstrates this.

o 4 calls to method addFilledRect(int x, int y, int w, int h, PDFPathPaint
fill) in PDFRenderer


(x,y) is the center of the line

border height = 3
---center (y for horizontal line)


Other renderers might have to operate with (y +- h/2), (x +- w/2)


svg width=595pt height=841pt xmlns=http://www.w3.org/2000/svg;
rect x=51.023pt y=100.213pt width=255.117pt height=2.834pt
fill=rgb(255.0,0.0,0.0)/
rect x=48.189pt y=100.213pt width=2.834pt height=43.669pt
fill=rgb(255.0,0.0,0.0)/
rect x=306.14pt y=100.213pt width=2.834pt height=43.669pt
fill=rgb(255.0,0.0,0.0)/
rect x=51.023pt y=141.048pt width=255.117pt height=2.834pt
fill=rgb(255.0,0.0,0.0)/


Hansuli Anderegg



tables.pdf
Description: Adobe PDF document

?xml version=1.0 encoding=ISO-8859-1?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:src=UBSXMLSrc
fo:layout-master-set
fo:simple-page-master master-name=seiten page-height=29.7cm page-width=21cm margin-top=2cm margin-bottom=2cm margin-left=1.8cm margin-right=2.0cm
fo:region-before region-name=s2ff-before extent=2.0cm /
fo:region-body margin-top=1.0cm margin-bottom=2.0cm /
fo:region-after region-name=s2ff-after extent=2.0cm /
/fo:simple-page-master
/fo:layout-master-set
fo:page-sequence master-name=seiten initial-page-number=1
fo:static-content flow-name=s2ff-after
fo:block font-size=11pt font-family=sans-serif line-height=13pt text-align=center padding-top=12mm
fo:page-number //fo:page-number-citation ref-id=IDAWEF4 /
/fo:block
/fo:static-content
fo:flow flow-name=xsl-region-body

fo:block font-size=11pt font-family=sans-serif line-height=13pt text-align=starttable border - cell padding, border/fo:block
fo:block
fo:table space-after.optimum=13pt space-before.optimum=3pt border-color=red border-width=1.0mm border-style=solid font-size=10pt font-family=sans-serif text-align=start
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-body
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=yellow
fo:blockcell 1.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 1.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dotted  border-color=yellow
fo:blockcell 1.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 2.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.2mm border-style=dotted  border-color=blue
fo:blockcell 2.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=green
fo:blockcell 2.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dotted  border-color=yellow
fo:blockcell 3.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=green
fo:blockcell 3.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=yellow
fo:blockcell 3.3/fo:block
/fo:table-cell
/fo:table-row
/fo:table-body
/fo:table
/fo:block

fo:block font-size=11pt font-family=sans-serif line-height=13pt text-align=starttable border, padding top/bottom - cell padding, border/fo:block
fo:block
fo:table space-after.optimum=13pt space-before.optimum=3pt border-color=red border-width=1.0mm border-style=solid padding-top=6pt padding-bottom=6pt font-size=10pt font-family=sans-serif text-align=start
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-body
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=yellow
fo:blockcell 1.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 1.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dotted  border-color=yellow
fo:blockcell 1.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 2.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.2mm border-style=dotted  border-color=blue
fo:blockcell 2.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=green
fo:blockcell 2.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always

AW: diffs for on-the-fly image support

2002-05-21 Thread J.U. Anderegg

Inserting JPEG into a PDF file is a simple file copy - given the URI,
bits/pixel and color model. The latter are coded within JPEG files. PDF
stores the image once and allows multiple references to it. Is programmed
caching superior to the caching of the file system?

From PDF view, memory = (JPEG file size + PDF encoded image) is needed at
most during the lifetime of an output page in memory. Why isn't that so:
device independence, AWT compatibility?

Similar considerations apply to GIF, TIFF and Fax formats.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: direct rendering of images to pdf

2002-05-16 Thread J.U. Anderegg

These notes apply to fo:external-graphic under FOP 0.20.1:

o FOP images are kept as XObjects until the end of job, because
- the image is written to the output file
- and the complete image object is added to the XObjects vector in order to
build the ressource dictionary at the end of the PDF document.

But the ressource dictionary needs only PDF object references - not the
images themselves. So if the addImage-method of PDFDocument-class is changed
like this, only images within a page are kept in memory.

old code:  this.xObjects.add(xObject);
   this.xObjectsMap.put(url, xObject);   deleted: does not hurt,
because never written

new code:  this.xObjects.addElement(new PDFXObject(this.objectcount,
this.xObjectCount)); // just adding an object ID as reference does it

Still memory usage rises from start to end of job: most likely FOP images
hang forever uncompressed in the area tree.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: AW: Latest FOP schema

2002-05-13 Thread J.U. Anderegg

J. Pietschmann wrote:

fo:block are

 Rectangular areas, perhaps indented and with border, padding
 and other individual traits, nested into a rectangular area.

I understand setting traits, properties. How about page layout, setting
inline and baseline postitions? Does it imply a unconditional CRLF?

What does the input below look look like on the page?

fo:block
level_0_text fills to position A
fo:block
level_1_text positioned at A fills to position B
/fo:block
more level_0_text positioned at B
/fo:block

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Latest FOP schema

2002-05-11 Thread J.U. Anderegg

From the external view block means a rectangle containing formatted text,
something like a paragraph.

o What do fo:blocks as children of fo:blocks: mean for the end user?
o What's teheffect of block's in combination with tag element TEXT like
leader, marker, inline, wrapper, basic-link?
o When is a block required?



Hansuli Anderegg




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Tables: padding and borders

2002-05-07 Thread J.U. Anderegg

Tests with FOP 0.20.1 and PDF output:

o Cells
- Define a rectangle with geometric lines as sides: width = 0.
- Padding on the cell element offsets text within the cell rectangle.
- Border rectangles are centered over the sides of the cell rectangle.
Adjacent cells put both centered border rectangles on common side lines.

o Tables
- Borders are built around the cells, when cells are already formatted and
fixed to a page position.
- Padding on the table element shifts the table border (not the table
itself relative to the parent) - e.g. out into the left margin.
- Table borders are aligned outwards from the sides of the cell rectangles.
This produces an overlap with cell borders centered on cell rectangle sides.

This may sound very complicated. See my attached test data and the results,
zoom the test document as much as possible: if this is still an issue!


Hansuli Anderegg



tables.pdf
Description: Adobe PDF document

?xml version=1.0 encoding=ISO-8859-1?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:src=UBSXMLSrc
fo:layout-master-set
fo:simple-page-master master-name=seiten page-height=29.7cm page-width=21cm margin-top=2cm margin-bottom=2cm margin-left=1.8cm margin-right=2.0cm
fo:region-before region-name=s2ff-before extent=2.0cm /
fo:region-body margin-top=1.0cm margin-bottom=2.0cm /
fo:region-after region-name=s2ff-after extent=2.0cm /
/fo:simple-page-master
/fo:layout-master-set
fo:page-sequence master-name=seiten initial-page-number=1
fo:static-content flow-name=s2ff-after
fo:block font-size=11pt font-family=sans-serif line-height=13pt text-align=center padding-top=12mm
fo:page-number //fo:page-number-citation ref-id=IDAWEF4 /
/fo:block
/fo:static-content
fo:flow flow-name=xsl-region-body

fo:block font-size=11pt font-family=sans-serif line-height=13pt text-align=starttable border - cell padding, border/fo:block
fo:block
fo:table space-after.optimum=13pt space-before.optimum=3pt border-color=red border-width=1.0mm border-style=solid font-size=10pt font-family=sans-serif text-align=start
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-body
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=yellow
fo:blockcell 1.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 1.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dotted  border-color=yellow
fo:blockcell 1.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 2.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.2mm border-style=dotted  border-color=blue
fo:blockcell 2.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=green
fo:blockcell 2.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dotted  border-color=yellow
fo:blockcell 3.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=green
fo:blockcell 3.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=yellow
fo:blockcell 3.3/fo:block
/fo:table-cell
/fo:table-row
/fo:table-body
/fo:table
/fo:block

fo:block font-size=11pt font-family=sans-serif line-height=13pt text-align=starttable border, padding top/bottom - cell padding, border/fo:block
fo:block
fo:table space-after.optimum=13pt space-before.optimum=3pt border-color=red border-width=1.0mm border-style=solid padding-top=6pt padding-bottom=6pt font-size=10pt font-family=sans-serif text-align=start
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-column column-width=30mm /
fo:table-body
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=yellow
fo:blockcell 1.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 1.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dotted  border-color=yellow
fo:blockcell 1.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always
fo:table-cell padding-left=6pt border-width=0.5mm border-style=dashed  border-color=green
fo:blockcell 2.1/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.2mm border-style=dotted  border-color=blue
fo:blockcell 2.2/fo:block
/fo:table-cell
fo:table-cell padding-left=6pt border-width=0.5mm border-style=solid   border-color=green
fo:blockcell 2.3/fo:block
/fo:table-cell
/fo:table-row
fo:table-row keep-with-next=always
fo:table-cell 

AW: Is SVG a preferred way to draw form lines?

2002-05-06 Thread J.U. Anderegg

At least 2 aspects are to be considered: document design/generation and
operation

o SVG
- document design: do you have a tool?
- operation: uses Batik starts new processes and generates images

o xsl:fo table with borders, backgrounds

- document design: type xsl:fo on the hard way?
- operation: FOP only

But will Adobe extend PDF and Acrobat to handle SVG XML?

Hansuli Anderegg





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: [REDESIGN] Line layout manager discussion

2002-05-06 Thread J.U. Anderegg

By writing renderer code with FOP 0.20.1 I observed :

A basic link

fo:basic-link internal-destination=dest0link wordst/fo:basic-link

arrives 3 times in the PDFrenderer asynchronously, without any connection
between each other.

1. as word link
2. as word words
3. as annotation rectangle

This is OK with PDF. But there is an assumption on the operation of the
output device. Other document formats: link rendering needs access to all
related data. How about FOP extensions, new versions of xsl:fo? Deep area
tree, linear sequential representation, semantics - I cannot tell. It has to
be device independent.


Fetching info randomly from the area tree?

Some document formats need a list of fonts used at the beginning of the
document or each page. Can the renderer retrieve this info from the the area
tree in advance?  Elimination of intermediate storage makes renderer
programming straight forward.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: [REDESIGN] Line layout manager discussion

2002-05-01 Thread J.U. Anderegg

Questions:

o A basic-link in PDF means an annotation - an annotation defines a
rectangle. What's the effect, if the annotation text breaks to a new line?
If the basic-link contains more blocks and children?

o Middle Easterner write left-to-right, top-to-bottom. Far Easterners write
from top-to-bottom, right-to-left. They have their own font metrics. Is the
FOP pagination able to handle this? How does it affect the area tree and the
document presentation?

o fo:external-graphic: can text be flowed around an image? That means, does
it make sense for a user to mix text and images within the same block -
unless a table is used, but this is a different setup.

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




FOP PDF extensions: multilevel outlines, form fields, Javascript

2002-04-25 Thread J.U. Anderegg

Specification Request

I programmed multilevel outlines, form fields, Javascripts with the PDF
classes of Fop-0.20.1. These experiments, attacking from the back end, lead
to these conclusions:


1. PDF Extensions can be added to the PDF classes on a clean way. The trick
is when/where to insert PDF objects to avoid troubles with reference
resolutions.


2. Extension Types

Definition position: the page and page coordinates of a rendered element.

2.1 Element text/attributes only

example: startup JavaScript

fox:startupScript file=startup.js/

2.2 Element text/attributes + position of parent element

example: outlines

fo:blockThis is a heading level 1
  fox:outline level=1Go and see heading level 1/fox:outline
/fo:block

2.3 Element text/attributes + position of parent element + reserved
rectangle coordinates

example: form fields

fo:block
  fox:form file=f9viewer.form width=30mm height=10mm/
/fo:block

(Implemented with external files, which in turn pull in further exteral
JavaScript files in my implementation).

2.4/5/6 corresponding to 2.1/2/3 but a reference to a subtree in xsl:fo
input instead of just text/attributes of a single element.

example: fancier form fields in XML

fo:block
  fox:formField type=button width=30mm height=10mm
fox:action
  some Javascript
/fox:action
  fox:appearance
  some PDF stuff
  /fox:appearance
  fox:formField
/fo:block



So FOP has to do depending on the extension type:
- get a position
- format/reserve the reqested page space
- setup arguments
- transfer control into the code of the PDFRenderer with the arguments. The
addressing of methods has to be specified. New methods have to be added, so
that existing methods are not modified. The code has to be executed while
method renderPage is working. Lots of things happen in FOP in a different
sequence from the xsl:fo XML sequence.

A few general interfaces enable powerful PDF extensions - in the first
approach perhaps with rather crude input representations like native PDF
syntax. Organization of XML, XSL, other components and procedures are anyway
the key to success. That's what I learnt from development of a multilingual
application.

Next: math and chemical formulas, embedding EPS - you name it?

Hansuli Anderegg



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




External Links

2002-04-17 Thread J.U. Anderegg

By looking at PDF I think a link has to be coded like this (copy in the
samples):

fo:basic-link
external-destination=destinationlink_rectangle/fo:basic-link

o destination: an URI, where it makes a difference if there is an
extension .pdf or not
o link_rectangle: the rectangle on the page to click on

So, if you want to have an image in the rectangle:

fo:basic-link
external-destination=http://nagoya.apache.org/the_image_to_be_pointed_to.jp
g
  fo:external-graphic src=my_rendered_image.jpg/
/fo:basic-link

The destination has to be a full URI for a file!


Hansuli Anderegg





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




PDF JavaScript and Form Fields: FOP prototype version is available

2002-04-12 Thread J.U. Anderegg

Attached I send a small demo document generated by an adapted FOP system. If
attachements do not work in the forum, send me a request by e-mail.

If there is interest I  will compile the inputs, some comments and a list of
related documents. PDF JavaScript and Form Fields cover a broad range of
applications from simple user navigation/form-fillin to complex
database/transaction systems. Note that many functions need more Adobe
software than just Acrobat Reader.

Hansuli Anderegg, Zurich



link03.pdf
Description: Adobe PDF document

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


AW: Designing PDF extensions: form fields

2002-04-08 Thread J.U. Anderegg

Forms and JavaScript in PDF may be about as complex as xsl:fo. To get a
feeling for the learning, design and development effort see:

Acrobat JavaScript Object Specification, Version 5.0.5, Technical Note #
5186
Chapter Quick Reference Forms: 20 pages illustrated with Acrobat menues

Keyword Acrobat GUI: something like that is needed for a comfortable
solution. Have it generate an XML representation and transformed XML back to
PDF syntax by a FOP Extension?

Remains the low level way like PDFMark does it as documented in
http://www.math.uakron.edu/~dpstory/tutorial/pdfmarks/forms.pdf
Very little implementation effort without imposing arbitrary limitations.
Perhaps a user is willing to try this approach and experience will show real
life  requirements.

Hansuli Anderegg, Zurich, Switzerland



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Designing PDF extensions: form fields

2002-04-04 Thread J.U. Anderegg

Hi Keiron,

Let's fix a DESIGN GOAL. What can be realized in which time frame? I see 2
ways to go ahead:

1. Low level implementation using native PDF syntax: users have to learn PDF
syntax and to some extent PDF file structure. They can try experimentally
everything with the risk of invalid PDF in the document test phase. The
document development might look like this:

- get documentation: PDF reference manual or see PDFmarks in
http://www.math.uakron.edu/~dpstory/tutorial/pdfmarks/forms.pdf
- develop document without form fields
- use Acrobat to add the form fields to the document
- view the PDF document in ASCII e.g. with Windows WordPad and copy form
field PDF objects into FOP markup
- test, modify FOP markup

2. Perfect, complete XML syntax for PDF forms covers all functions. Perhaps
XHTML could do this job. The system is fully documented, so that users never
have to care about PDF internals (my favorite reference document has 96
pages). The PDFextension takes over FOP properties and uses existing PDF
methods. Additional properties needed for PDF form fields are handled.

Of course a clean system (2) is preferable. Where is the expert to take over
this task? Not very elegant system (1) can be set up within 1 month assumed
the pdf library offers an API to allow PDF extensions - the base for other
developments. Once priorities are set, technicalities will be solved
efficiently.


Hansuli Anderegg, Zurich, Switzerland



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Designing PDF extensions: form fields

2002-04-01 Thread J.U. Anderegg

I programmed PDF form fields into Fop-0.20.1. PDF form fields have an
annotation representation in PDF files with the subtype widget. So I
patched the external-link within the renderer code to process form fields.
Additionally a PDF fields object had to be added to the PDF stream and a
reference to it into the PDF document catalog. So far quite easy.

From this experience I see now the design below for PDF plugins (rather
plugin than FOP extension, because this is only partially FOP business).
Main areas of concern are the external interface and on the other hand
general methods provided by FOP to generate valid PDF file structures. When
this API is available, features like PDF JavaScript etc. will be easy to
implement. Plugins are not allowed to modify any FOP code.

XSL:FO will be device-dependent. So users will have to take care of that
with XSLT.

Hansuli Anderegg, Zurich, Switzerland

==

EXTERNAL INTERFACE

PDF Form Field Example:

(1) fo:instream-foreign-object width=50 height=12
(2) FOPplugin type=PDFForm renderClass=PDFDocument
renderMethod=addFormField
(3) /T (pb1)
(3) /FT /Btn
(3) /Ff 65536
(3) /H /P /F 4
(3) /BS  /W 2 /S /B 
(3) /MK  /BC [ 0 0 0 ]
(3) /BG [.7529 .7529 .7529]
(3) /CA (Button) 
/FOPplugin
/fo:instream-foreign-object

(1) instream-foreign-object asks the FOP formatter for space.


PDF RENDERER

o The foreign-object method of the PDF renderer is called by FOP
- arguments: type, renderer class, renderer method (Strings from 2) and
rectangle coordinates, data.

o control is passed to the specified class/method in FOPplugin
- arguments: rectangle coordinates and unprocessed text of XML element
FOPplugin.

(3) Just anything: in my case the text in native PDF form syntax from the
FOPplugin XML element (transforming PDF form syntax into XML syntax does not
make sense unless Adobe switches to XML). XML in case of SVG. Perhaps a
differenciation between XML and non-XML data will be helpful. Of course the
parser requires valid XML input. Character sets and line endings will have
to be looked at.


INVOKED METHOD by PDF renderer foreign object invokes in turn

o special, separate plugin method(s) (most likely added to PDFDocument
class)
- the plugin has to setup his PDF objects, keep track of his object
references.

FOP has to enable the plugin to insert PDF objects by an API most likely to
be implemented in the PDFDocument class.


GENERAL PDFDocument METHODS provided by FOP

- request a PDF object (including trailer objects) with ID and XREF
maintenance
- add entries/PDF reference ID's to catalog (outline requires a catalog
entry too)

Basically this means providing external interfaces to the PDF package. Not
so easy while keeping PDF integrity.

__





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]