Re: Overflow in block-level elements

2007-02-14 Thread Jeremias Maerki
As far as I understand the spec the "overflow" property applies only to
FOs which create a viewport area.

http://www.w3.org/TR/xsl11/#prapply also says:
Property overflow applies to: fo:region-body, fo:region-before,
fo:region-after, fo:region-start, fo:region-end, fo:block-container,
fo:external-graphic, fo:instream-foreign-object, and fo:inline-container.

For a table-cell it means you have to place a block-container in it if
you want to clip content. table-cell itself only creates reference-areas.

On 14.02.2007 08:37:05 Tim Keen wrote:
>   
> If a table-cell has height and width then should"overflow" work as a property 
> to it?
> 
> Cheers
> 
> Tim
> 
> Roger Kovack1 wrote: Andreas L Delmelle wrote: 
> >   On Feb 9, 2007, at 00:11, Roger Kovack1 wrote: 
> >>   In short, overflow is allowed in fo:block-container but not in fo:block. 
> >>>   Not exactly: overflow /is applicable to/ block-container, but not to 
> >>> block. 
>   Does "block-level element" refer to fo:block? 
> >   Strictly speaking, yes, but since the property does not apply to 
> > fo:block...Why? Well, because a block has no width/height, so there is no 
> > possibility of overflow in either direction. 
>   Thanks for the explanation. I was just wondering if the spec is being 
> misunderstood or is inaccurate insome manner. 



Jeremias Maerki


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



Re: Table troubles

2007-02-14 Thread Jeremias Maerki

On 13.02.2007 13:40:53 Andreas L Delmelle wrote:
> On Feb 12, 2007, at 23:34, Jeremias Maerki wrote:
> 
> > 
> >> I'd very much like to agree with your solution/interpretation, but
> >> the nit in me feels compelled to ask:
> >> "100% of what?"
> >
> > XSL 1.1 says for percentages in block-progression-dimension:
> > The percentage is calculated with respect to the corresponding  
> > dimension
> > of the closest area ancestor that was generated by a block-level
> > formatting object. If that dimension is not specified explicitly  
> > (i.e.,
> > it depends on content's block-progression-dimension), the value is
> > interpreted as "auto".
> >
> > But that's a weird statement IMO. If the table's parent is a block,  
> > the
> > block's height depends on the content's size. Circular dependency. It
> > would make more sense to say: "...of the closest anscestor that is a
> > reference area..." Shrug.
> 
> The Rec in all its glory! :)
> I wonder what this means for tables that don't have a block-container  
> parent. Note that, since a block's b-p-d can't be specified, that  
> leaves only block-container as a possible and reliable base 'block- 
> level FO that generates the closest area ancestor'. If there is no  
> such block-container, the behavior of percentages would again be  
> undefined. If there's only a parent block, then this would create a  
> circular dependency, as you point out...
> 
> Besides that, mind that the native XSL property 'block-progression- 
> dimension' does not directly apply to table or table-row. That is,  
> specifying block-progression-dimension="100%" on a table or table-row  
> would (and should) not have any effect. Only the CSS-XSL hybrids  
> 'height/min-height/max-height' apply to them.

My first reaction was: That's simply not true. b-p-d does apply to table
and table-row. The CSS properties are mapped to the XSL equivalents as
specified in http://www.w3.org/TR/xsl11/#d0e4413
Our code exclusively works with b-p-d and i-p-d, not height, max-height etc.

But as you noticed 7.3 refers to the CSS properties explicitely. IMO
that's another point in the spec that is really not helpful. Rather the
opposite. I wish the CSS dependency were never introduced

Anyway, b-p-d does apply to table and table-row. :-)

> Now, these being CSS  
> properties in origin, I think that either:
> a) the first rule in 7.3 applies
> "1. For properties defined in CSS2 referring to the "containing  
> block", the content-rectangle of the closest ancestor block-area that  
> is not a line-area is used."
> 
> or b), the height property being mapped to XSL's block-progression- 
> dimension (or inline-progression-dimension), the fourth rule applies
> "4. If the formatting object generating the identified area generates  
> a sequence of such areas, the first area is used for the conversion."
> 
> I'd put my money on a). Moreover, this is most likely why XSL  
> explicitly refers to CSS in its definition of height, since  
> percentage heights for tables and table-rows in CSS are /not/ defined  
> in terms of a containing block --they are undefined altogether :(

I prefer to ignore the CSS stuff and work with the XSL stuff entirely,
i.e. map everything to XSL and go from there. Makes my brain hurt a
little less. :-)

> b) seems to make matters even worse. It would again lead to a  
> circular dependency for some tables that are direct descendants of  
> the flow, since that 'first area' could correspond to the first area  
> generated by the table itself... If not, then it could also be an  
> area generated by a completely unrelated block (=first block in the  
> flow) preceding the table...? Big Shrug indeed!




Jeremias Maerki


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



Re: AWT Previewer external remote jpg file no rendering

2007-02-14 Thread Jeremias Maerki
Well, when you output PDF a different renderer is used than when you
display the file in the AWT previewer or if you render PNG/TIFF. So,
differences are generally possible though not necessarily expected.

In my tests with FOP 0.93, JPEG images do appear with the Java2D
renderer subclasses (AWT preview, PNG, TIFF). Unfortunately, I keep
repeating myself by saying that the image library is in serious need of
an overhaul. When we finally get to that it'll get better.

The reason for your seeing the space reserved for the image is easily
explained: FOP inspects the images for their natural size in order to do
the layout but without actually fully loading the image already. Only
when the document is rendered will the image be fully loaded depending
on the capabilities of the renderer. In your case, it seems that for
some reason the Java2DRenderer could not get the JPEG decoded. Too bad
we don't have any logging info in place to see which image library was
used.

Sorry, no helpful suggestion from me at the moment. You can try
debugging Java2DRenderer.drawImage() to get an idea what's going wrong.

On 13.02.2007 23:29:50 craigg wrote:
> 
> Hiya,
> 
> Having trouble with external graphics which are jpg's being rendered with
> the AWT Previewer. Using exactly the same xsl pointing to an equivilent
> gif/bmp seems to render fine. The strange thing is that looking at the
> preview window with Debug on, you can see it has gathered the image size
> (the block around it isn't the default size), so it has found the file, and
> attempted to render it atleast.
> 
> http://localhost:80/project/images/cook3.jpg)"
> text-align="center" display-align="center"/>
> 
> Using FOP (embedded) in another app to produce pdf output seems to work
> fine! although using the PNG/TIFF output mimics the previewer by not
> displaying the images, but having blank space of their exact size (i believe
> the site says that PNG/TIFF output is derrived from the same rendering code 
> as the previewer).
> 
> 
> Everything compiled under jdk 1.5
> 
> Anyone ever had this problem before?
> 
> Running the viewer from a debugging ide doesn't show Any warnings/errors
> about difficulties getting/rendering the image.
> 
> Any help is apprechiated :)
> 
> Craig
> -- 
> View this message in context: 
> http://www.nabble.com/AWT-Previewer-external-remote-jpg-file-no-rendering-tf3223962.html#a8954846
> Sent from the FOP - Users mailing list archive at Nabble.com.



Jeremias Maerki


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



Dynamic Running Heads

2007-02-14 Thread Jeff Sese
How do i go about creating dynamic running heads that displays the first 
article in the page and the last article in page; or the only article if 
there is only one article in the page?


page 1:
Title 1
some text
some text
some text
some text
some text

page 2:
some text
some text
Title 2
some text
some text
some text

page 3:
some text
Title 3
some text
some text
some text
some text

page 4:
some text
some text
some text
some text
some text
some text

page 5:
Title 4
some text
some text
some text
Title 5
some text
some text
some text

I want my output to have the following headers for their corresponding page:

page 1: Title 1
page 2: Title 1 - Title 2
page 3: Title 2 - Title 3
page 4: Title 3
page 5: Title 4 - Title 5

Where do i put my markers and how do i retrieve them?

Thanks,
--
*Jeff Sese*

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



Re: Table troubles

2007-02-14 Thread Chris Bowditch

Vincent Hennebert wrote:

Chris Bowditch a écrit :


Andreas L Delmelle wrote:




The Rec in all its glory! :)
I wonder what this means for tables that don't have a block-container 
parent. Note that, since a block's b-p-d can't be specified, that 
leaves only block-container as a possible and reliable base 'block-
level FO that generates the closest area ancestor'. If there is no 
such block-container, the behavior of percentages would again be 
undefined. If there's only a parent block, then this would create a 
circular dependency, as you point out...



I don't think there is a circular dependency:



XSL 1.1 says for percentages in block-progression-dimension:
The percentage is calculated with respect to the corresponding dimension
of the closest area ancestor that was generated by a block-level
formatting object. If that dimension is not specified explicitly i.e.,
it depends on content's block-progression-dimension), the value is
interpreted as "auto".



Which I understand as changing the "n%" value of b-p-d for the current
object to "auto". So on Andrea's example:

  
  
 
  
  


The height of the fo:block-container is 100% of the height of the
fo:table (the closest ancestor generating a block-area). As for fo:table
the only sensible value is "auto", then the height of this very
block-container is changed to "auto".


I agree with Vincent's interpretation here. When the spec is unclear, 
common sense should prevail. Just saying percentage heights are not 
supported unless inside a block-container is not good enough IMHO. And 
if a common sense approach can't be agreed upon then an e-mail should be 
sent to the editors list requesting clarification.






In the case where fo:table is a child of fo:block or fo:flow isn't the
nearest ancestor reference area the fo:region-body? Whose bpd will be
known.



To be precise, the nearest ancestor is the normal-flow-reference-area in
which the table relies, which has the size of its parent
span-reference-area, whose size generally is the size of the
main-reference-area (unless there are several spans) which generally has
the size of the region-body (unless there are before-floats or
footnotes) (see 6.4.14 fo:region-body). Follow me? ;-)


Yes and I agree.


So yes the bpd should be known, unless there are several spans in which
case we can surely imagine a whole bunch of tricky situations with a mix
of auto and percentages, leaving the bpd undefined...


Thats right, so the only case thats not supported then is percentage 
heights on FOs on a page with multiple span areas. I think that is an 
acceptable limitation from a user perspective.




Does anyone else think this discussion should be moved to fop-dev?

Chris




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



Need working example or help how to use PDF/A-1b with FOP 0.93

2007-02-14 Thread Virginijus Kandrotas

I am looking for help how to use PDF/A-1b. Does anybody have working example
? I need example  input XML fo file and FOP configuration / font embedding. 

Best regards,

Virginijus Kandrotas
-- 
View this message in context: 
http://www.nabble.com/Need-working-example-or-help-how-to-use-PDF-A-1b-with-FOP-0.93-tf3227266.html#a8964915
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Need working example or help how to use PDF/A-1b with FOP 0.93

2007-02-14 Thread Jeremias Maerki
Make sure you follow the instructions here:
http://xmlgraphics.apache.org/fop/0.93/pdfa.html

I've uploaded an example for you:
http://people.apache.org/~jeremias/pdfa-example.zip

(you just have to copy arial.ttf in the same directory. Omitted in the
ZIP for legal reasons.)

HTH

On 14.02.2007 14:33:15 Virginijus Kandrotas wrote:
> 
> I am looking for help how to use PDF/A-1b. Does anybody have working example
> ? I need example  input XML fo file and FOP configuration / font embedding. 



Jeremias Maerki


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



Re: Need working example or help how to use PDF/A-1b with FOP 0.93

2007-02-14 Thread Virginijus Kandrotas

Hello Jeremias,

 Thank you for your help and the example you have attached, but it still not
working for me. I think there is some problems with the FOP configuration. I
getting this error:

org.apache.fop.pdf.PDFConformanceException: For PDF/A-1b, all fonts, even
the base 14 fonts, have to be embedded! Offending font: Times-Roman
at org.apache.fop.pdf.PDFFont.validate(PDFFont.java:199)
at org.apache.fop.pdf.PDFFont.toPDFString(PDFFont.java:210)
at org.apache.fop.pdf.PDFObject.toPDF(PDFObject.java:164)
at org.apache.fop.pdf.PDFObject.output(PDFObject.java:153)
at org.apache.fop.pdf.PDFDocument.output(PDFDocument.java:831)
at org.apache.fop.pdf.PDFDocument.outputTrailer(PDFDocument.java:896)
at 
org.apache.fop.render.pdf.PDFRenderer.stopRenderer(PDFRenderer.java:483)
at
org.apache.fop.area.RenderPagesModel.endDocument(RenderPagesModel.java:241)
at
org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:426)
at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endDocument(TransformerIdentityImpl.java:962)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown 
Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown 
Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

Can you please look at my code maybe you can see what is wrong ?

  FopFactory fopFactory = FopFactory.newInstance();

  File configFile = new
File("/home/vk/a-tests/fop/exampl/fop.xconf");
  fopFactory.setUserConfig(configFile);

  FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
  foUserAgent.getRendererOptions().put("pdf-a-mode",
"PDF/A-1b");

  PDFRenderer pdfrenderer = new PDFRenderer();
  pdfrenderer.setUserAgent(foUserAgent);

  foUserAgent.setRendererOverride(pdfrenderer);


  // Construct fop with desired output format
  Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
foUserAgent, outputMessages[0]);

  fopFactory.addElementMapping(new FOElementMapping());
  fopFactory.addElementMapping(new SVGElementMapping());
  fopFactory.addElementMapping(new
BatikExtensionElementMapping());
  fopFactory.addElementMapping(new
ExtensionElementMapping());
  fopFactory.addElementMapping(new XMPElementMapping());
  fopFactory.addElementMapping(new RDFElementMapping());
  fopFactory.addElementMapping(new
PSExtensionElementMapping());

  // Setup JAXP using identity transformer
  TransformerFactory factory =
TransformerFactory.newInstance();
  Transformer transformer = factory.newTransformer(); //
identity transformer

  // Setup input stream
  Source src = new StreamSource(inputMessages[0]);

  // Resulting SAX events (the generated FO) must be piped
through to FOP
  Result res = new SAXResult(fop.getDefaultHandler());

  // Start XSLT transformation and FOP processing
  transformer.transform(src, res);

  
  Thank you in advance,

  Virginijus Kandrotas
-- 
View this message in context: 
http://www.nabble.com/Need-working-example-or-help-how-to-use-PDF-A-1b-with-FOP-0.93-tf3227266.html#a8966701
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Need working example or help how to use PDF/A-1b with FOP 0.93

2007-02-14 Thread Jeremias Maerki
This means you are still somehow referencing one of the base 14 fonts.
Even if you use Times-Roman, you have to explicitely define this font in
the configuration for PDF/A (as if it were a custom font) even though
it's normally available for use for non-PDF/A documents. The
specification requires that ALL fonts are embedded. And that's not the
case with the normal base 14 fonts.

It's a good idea to set "font-family" to your main font you're using in
your documents and to set this property top-level directly on fo:root.
This is what I've done in the example. That way no default value for
font-family can creep in anywhere. Of course, you also have to make sure
that you can an entry in the FOP configuration for every font that you
use in your documents.

Your Java code looks good, but see my question below (not related to the
problem here).

On 14.02.2007 16:10:07 Virginijus Kandrotas wrote:
> 
> Hello Jeremias,
> 
>  Thank you for your help and the example you have attached, but it still not
> working for me. I think there is some problems with the FOP configuration. I
> getting this error:
> 
> org.apache.fop.pdf.PDFConformanceException: For PDF/A-1b, all fonts, even
> the base 14 fonts, have to be embedded! Offending font: Times-Roman
>   at org.apache.fop.pdf.PDFFont.validate(PDFFont.java:199)

> 
> Can you please look at my code maybe you can see what is wrong ?
> 
>   FopFactory fopFactory = FopFactory.newInstance();
> 
>   File configFile = new
> File("/home/vk/a-tests/fop/exampl/fop.xconf");
>   fopFactory.setUserConfig(configFile);
> 
>   FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>   foUserAgent.getRendererOptions().put("pdf-a-mode",
> "PDF/A-1b");
> 
>   PDFRenderer pdfrenderer = new PDFRenderer();
>   pdfrenderer.setUserAgent(foUserAgent);
> 
>   foUserAgent.setRendererOverride(pdfrenderer);
> 
> 
>   // Construct fop with desired output format
>   Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
> foUserAgent, outputMessages[0]);
> 
>   fopFactory.addElementMapping(new FOElementMapping());
>   fopFactory.addElementMapping(new SVGElementMapping());
>   fopFactory.addElementMapping(new
> BatikExtensionElementMapping());
>   fopFactory.addElementMapping(new
> ExtensionElementMapping());
>   fopFactory.addElementMapping(new XMPElementMapping());
>   fopFactory.addElementMapping(new RDFElementMapping());
>   fopFactory.addElementMapping(new
> PSExtensionElementMapping());

Why are you doing this? Didn't it work otherwise? Strange environment 
(application server)???


> 
>   // Setup JAXP using identity transformer
>   TransformerFactory factory =
> TransformerFactory.newInstance();
>   Transformer transformer = factory.newTransformer(); //
> identity transformer
> 
>   // Setup input stream
>   Source src = new StreamSource(inputMessages[0]);
> 
>   // Resulting SAX events (the generated FO) must be piped
> through to FOP
>   Result res = new SAXResult(fop.getDefaultHandler());
> 
>   // Start XSLT transformation and FOP processing
>   transformer.transform(src, res);
> 
>   
>   Thank you in advance,
> 
>   Virginijus Kandrotas
> -- 
> View this message in context: 
> http://www.nabble.com/Need-working-example-or-help-how-to-use-PDF-A-1b-with-FOP-0.93-tf3227266.html#a8966701
> Sent from the FOP - Users mailing list archive at Nabble.com.



Jeremias Maerki


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



fop and image sizing

2007-02-14 Thread Hinrich Aue
Hello everybody,

 

I was wondering about some things:

Why does FOP not use meta data (specially dpi) from images? I know it
doesn't, I read the documentation. I just wonder why.

Of course, when you don't read that information, you have to set a dpi
resolution.

Why is it 72 dpi? Every screen these days has >96dpi. Printers have even
higher dpi.

Another question is, is it configurable? I read a different post about this,
but nobody answered. Can I change these default 72 dpi to 96 dpi?

 

I'm asking these questions because I'm a docbook user, and I use FOP.

For our printed documentation we use FOP. We have _a lot_ of screenshots.

Now I have to set the absolute width for every image instead of setting dpi
to 96 dpi in FOP.

I cannot scale the images, they are also used for our html documentation.

 

Is there something I can do?

Are there plans for FOP to use image meta data?

 

Thanks in advance,

Hinrich



Re: Need working example or help how to use PDF/A-1b with FOP 0.93

2007-02-14 Thread Virginijus Kandrotas



I just try to run your example (pdfa-example.fo), have no extra references
to the fonts defined.

regards,

Virginijus Kandrotas

-- 
View this message in context: 
http://www.nabble.com/Need-working-example-or-help-how-to-use-PDF-A-1b-with-FOP-0.93-tf3227266.html#a8967758
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Table column widths

2007-02-14 Thread Tom Bentley
I'm having problems getting table columns to fill the table width using
0.93/Java1.4. 

In particular, I've got:

  
  
  
  
  
...table-rows and table-cells...
  


What I expected to happen is that each of the columns widths would be at
least the specified absolute length (30,50,12.5,15mm), plus 1/4 of the
difference between the table's width and the sum of those absolute widths.
What I get is that each column is just the specified absolute width
(30,50,12.5,15mm), i.e. proportional-column-width(1) is effectively 0.

If I try:
  
  
  
  
I get what I expect, the last three columns are the specified widths, and
the first one takes up all the remaining space.

Am I misintrpreting the spec, or is this a FOP bug? If the former can anyone
recommend an alternative way to specify column widths in absolute units, and
table widths as a % and have FOP treat the specified column widths a
'advised minimums', and actually distribute the excess space amongst each of
the columns?

Many thanks

Tom


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



Re: Dynamic Running Heads

2007-02-14 Thread Louis . Masters
Not 100%, but Chris answered something similar last week: 
http://marc.theaimsgroup.com/?l=fop-user&m=117066981314656&w=2

It is more of how to retrieve the previous page's marker, but it should 
get you going.

If you need a basic marker example, there is one in the distribution under 
examples\fo\markers.

-Lou



Jeff Sese <[EMAIL PROTECTED]> wrote on 02/14/2007 04:08:20 AM:

> How do i go about creating dynamic running heads that displays the first 

> article in the page and the last article in page; or the only article if 

> there is only one article in the page?
> 
> page 1:
> Title 1
> some text
> some text
> some text
> some text
> some text
> 
> page 2:
> some text
> some text
> Title 2
> some text
> some text
> some text
> 
> page 3:
> some text
> Title 3
> some text
> some text
> some text
> some text
> 
> page 4:
> some text
> some text
> some text
> some text
> some text
> some text
> 
> page 5:
> Title 4
> some text
> some text
> some text
> Title 5
> some text
> some text
> some text
> 
> I want my output to have the following headers for their corresponding 
page:
> 
> page 1: Title 1
> page 2: Title 1 - Title 2
> page 3: Title 2 - Title 3
> page 4: Title 3
> page 5: Title 4 - Title 5
> 
> Where do i put my markers and how do i retrieve them?
> 
> Thanks,
> -- 
> *Jeff Sese*
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


How do I get the .xsl line number which caused an error in fop .93?

2007-02-14 Thread brycenesbitt

Is it possible to get fop to tell me what line number, in the original xsl,
is causing a particular exception?  I get lots of
mysteries like:

Feb 14, 2007 9:34:56 AM
org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm
updateData2
WARNING: Line 1 of a paragraph overflows the available area. (fo:block, no
context info available)

Which is fine, but what paragraph?  Or:

WARNING: Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. table
(http://www.w3.org/1999/XSL/Format)
Feb 14, 2007 9:34:56 AM org.apache.fop.fo.FOTreeBuilder$MainFOHandler
endElement

Again, fine, but I have a lot of tables in a big xsl file.  I have searched
the FAQ, but can't find any reference to this topic.
My worst one is:

Feb 14, 2007 9:34:56 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error(Unknown location):
fo:table-body is missing child elements. 
Required Content Model: marker* (table-row+|table-cell+)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:160)
at org.apache.fop.cli.Main.main(Main.java:191)

Which I think might be this table, but I can't tell for sure without what
amounts to a binary search, removing tables one by one until the error goes
away:

  



  

  

  

  
  

  

  

  

  


-- 
View this message in context: 
http://www.nabble.com/How-do-I-get-the-.xsl-line-number-which-caused-an-error-in-fop-.93--tf3228637.html#a8969802
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Need working example or help how to use PDF/A-1b with FOP 0.93

2007-02-14 Thread Jeremias Maerki
Does that mean you can't run my example? You get an error about
"Times-Roman" with pdfa-example.fo? If yes, that's really weird.

I simply did this on the command-line:
fop -c fop.xconf -fo pdfa-example.fo -pdfa1b pdfa-example.pdf

Have you tried it from the command-line?

On 14.02.2007 16:59:53 Virginijus Kandrotas wrote:
> 
> 
> 
> I just try to run your example (pdfa-example.fo), have no extra references
> to the fonts defined.
> 
> regards,
> 
> Virginijus Kandrotas



Jeremias Maerki


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



Re: fop and image sizing

2007-02-14 Thread Jeremias Maerki

On 14.02.2007 16:57:30 Hinrich Aue wrote:
> Hello everybody,
> 
>  
> 
> I was wondering about some things:
> 
> Why does FOP not use meta data (specially dpi) from images? I know it
> doesn't, I read the documentation. I just wonder why.

Wow, http://xmlgraphics.apache.org/fop/0.93/graphics.html seems quite a
bit out of date. A few things stated there are wrong.

FOP does interpret the resolution setting of most bitmap images. Only
formats like BMP don't contain a resolution. For JPEG and PNG this
should work fine.

> Of course, when you don't read that information, you have to set a dpi
> resolution.
> 
> Why is it 72 dpi? Every screen these days has >96dpi. Printers have even
> higher dpi.

72dpi is the default PostScript and PDF resolution.

> Another question is, is it configurable? I read a different post about this,
> but nobody answered. Can I change these default 72 dpi to 96 dpi?

Yes, see: 
http://xmlgraphics.apache.org/fop/0.93/configuration.html#general-elements
("source-resolution")

> 
> I'm asking these questions because I'm a docbook user, and I use FOP.

0.93???

> For our printed documentation we use FOP. We have _a lot_ of screenshots.
> 
> Now I have to set the absolute width for every image instead of setting dpi
> to 96 dpi in FOP.

For screenshots, even 96dpi may be too little. How about using
percentages to scale down the images?

> I cannot scale the images, they are also used for our html documentation.
> 
>  
> 
> Is there something I can do?
> 
> Are there plans for FOP to use image meta data?

As indicated above, we already do that in most places. If the above
doesn't help, please post an example.



Jeremias Maerki


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



Re: How do I get the .xsl line number which caused an error in fop .93?

2007-02-14 Thread Jeremias Maerki
Xalan-J claims on the website that they support location information but
each time I tried, it didn't work. See:
http://xml.apache.org/xalan-j/features.html#factoryattribute

Maybe another XSLT processor can do that.

But you can always just run the XSLT process and then use the
intermediate FO file as input for FOP. In that case, you will get line
number information. That approach is always a good idea to track down
errors.

The validation error can be avoided if wrap the whole table in an xsl:if
checking for count(text4) > 0. Or you can enabled relaxed validation
(see the docs).

On 14.02.2007 18:40:54 brycenesbitt wrote:
> 
> Is it possible to get fop to tell me what line number, in the original xsl,
> is causing a particular exception?  I get lots of
> mysteries like:
> 
> Feb 14, 2007 9:34:56 AM
> org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm
> updateData2
> WARNING: Line 1 of a paragraph overflows the available area. (fo:block, no
> context info available)
> 
> Which is fine, but what paragraph?  Or:
> 
> WARNING: Mismatch: table-body (http://www.w3.org/1999/XSL/Format) vs. table
> (http://www.w3.org/1999/XSL/Format)
> Feb 14, 2007 9:34:56 AM org.apache.fop.fo.FOTreeBuilder$MainFOHandler
> endElement
> 
> Again, fine, but I have a lot of tables in a big xsl file.  I have searched
> the FAQ, but can't find any reference to this topic.
> My worst one is:
> 
> Feb 14, 2007 9:34:56 AM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException: Error(Unknown location):
> fo:table-body is missing child elements. 
> Required Content Model: marker* (table-row+|table-cell+)
> at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
> at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> at org.apache.fop.cli.Main.startFOP(Main.java:160)
> at org.apache.fop.cli.Main.main(Main.java:191)
> 
> Which I think might be this table, but I can't tell for sure without what
> amounts to a binary search, removing tables one by one until the error goes
> away:
> 
>table-layout="fixed" width="100%">
> 
> 
>  font-size="8.5pt">
>   
> 
>   
> 
>width="0.25in" src="url(green_chevron.png)" />
> 
>   
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/How-do-I-get-the-.xsl-line-number-which-caused-an-error-in-fop-.93--tf3228637.html#a8969802
> Sent from the FOP - Users mailing list archive at Nabble.com.


Jeremias Maerki


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



Re: Table column widths

2007-02-14 Thread Jeremias Maerki
It's a bug in FOP. The columns should actually evenly fill up the
remaining width, even without the proportional-column-width(1).

On 14.02.2007 17:39:14 Tom Bentley wrote:
> I'm having problems getting table columns to fill the table width using
> 0.93/Java1.4. 
> 
> In particular, I've got:
> 
>   
>   
>   
>   
>   
> ...table-rows and table-cells...
>   
> 
> 
> What I expected to happen is that each of the columns widths would be at
> least the specified absolute length (30,50,12.5,15mm), plus 1/4 of the
> difference between the table's width and the sum of those absolute widths.
> What I get is that each column is just the specified absolute width
> (30,50,12.5,15mm), i.e. proportional-column-width(1) is effectively 0.
> 
> If I try:
>   
>   
>   
>   
> I get what I expect, the last three columns are the specified widths, and
> the first one takes up all the remaining space.
> 
> Am I misintrpreting the spec, or is this a FOP bug? If the former can anyone
> recommend an alternative way to specify column widths in absolute units, and
> table widths as a % and have FOP treat the specified column widths a
> 'advised minimums', and actually distribute the excess space amongst each of
> the columns?
> 
> Many thanks
> 
> Tom



Jeremias Maerki


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



Exception in thread "main" java.lang.OutOfMemoryError

2007-02-14 Thread Krishna . Cherla
Hello All,

I am trying to convert an XML document(approx about 110 pages long,
777KB) into a pdf document using an FO transformation. But it gives me
the following error.

Exception in thread "main" java.lang.OutOfMemoryError

I tried the last three solutions mentioned here.


But I donot know how to increase the heap size available to the JVM.Can
anybody let me know how to do it so I can try that last option too.
Thanks,
Sindhu 



Email Firewall made the following annotations
 NOTICE 
---

This message is for the designated recipient only and may contain confidential, 
privileged or proprietary information. If you have received it in error, please 
notify the sender immediately and delete the original and any copy or printout. 
Unintended recipients are prohibited from making any other use of this e-mail. 
Although we have taken reasonable precautions to ensure no viruses are present 
in this e-mail, we accept no liability for any loss or damage arising from the 
use of this e-mail or attachments, or for any delay or errors or omissions in 
the contents which result from e-mail transmission.

-


Re: Exception in thread "main" java.lang.OutOfMemoryError

2007-02-14 Thread Mathieu Malaterre

On debian fop is using: JAVA_OPTS. I have seen also FOP_OPTS being used.
Anyway the fop command is usally simply a wrapper around the java
command, so you could just open that file and change what ENV var they
are using for passing option to the java command.

HTH
-M
Ref:
http://gdcm.sourceforge.net/wiki/index.php/Module_Attributes#How_To

On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:




Hello All,

I am trying to convert an XML document(approx about 110 pages long,
777KB) into a pdf document using an FO transformation. But it gives me
the following error.

Exception in thread "main" java.lang.OutOfMemoryError

I tried the last three solutions mentioned here.


But I donot know how to increase the heap size available to the JVM.Can
anybody let me know how to do it so I can try that last option too.

Thanks,
Sindhu


Email Firewall made the following annotations
-
--- NOTICE ---
This message is for the designated recipient only and may contain
confidential, privileged or proprietary information. If you have received it
in error, please notify the sender immediately and delete the original and
any copy or printout. Unintended recipients are prohibited from making any
other use of this e-mail. Although we have taken reasonable precautions to
ensure no viruses are present in this e-mail, we accept no liability for any
loss or damage arising from the use of this e-mail or attachments, or for
any delay or errors or omissions in the contents which result from e-mail
transmission.
-




--
Mathieu

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



Re: Exception in thread "main" java.lang.OutOfMemoryError

2007-02-14 Thread Louis . Masters
For Sun's java, on the java command line, use something like this:

-Xmx512m

The 512m means 512 megabytes of memory.  Set it to whatever you need. 
Check out your java compiler/exe vendor for more details.

-Lou



[EMAIL PROTECTED] wrote on 02/14/2007 01:37:21 PM:

> Hello All, 
> I am trying to convert an XML document(approx about 110 pages long, 
> 777KB) into a pdf document using an FO transformation. But it gives me 
> the following error. 
> Exception in thread "main" java.lang.OutOfMemoryError 
> I tried the last three solutions mentioned here.  //xmlgraphics.apache.org/fop/0.93/running.html> 
> But I donot know how to increase the heap size available to the JVM.
> Can anybody let me know how to do it so I can try that last option too.
> Thanks, 
> Sindhu 
> 
> Email Firewall made the following annotations 
> 
> NOTICE --- 
> This message is for the designated recipient only and may contain 
> confidential, privileged or proprietary information. If you have 
> received it in error, please notify the sender immediately and 
> delete the original and any copy or printout. Unintended recipients 
> are prohibited from making any other use of this e-mail. Although we
> have taken reasonable precautions to ensure no viruses are present 
> in this e-mail, we accept no liability for any loss or damage 
> arising from the use of this e-mail or attachments, or for any delay
> or errors or omissions in the contents which result from e-mail 
transmission. 
> - 

Re: Dynamic Running Heads

2007-02-14 Thread Jeff Sese

Hi,

I tested some variations of the position of the markers and the 
properties i used for the retrieve-marker, i finally got my desired 
output. Here's my fo code for reference:


   
   
   border-bottom-width="1pt" background-color="gray">
   retrieve-class-name="heading-in-page-sequence" 
retrieve-boundary="page-sequence" 
retrieve-position="first-starting-within-page"/>
   retrieve-class-name="heading-separator" retrieve-boundary="page" 
retrieve-position="first-starting-within-page"/>
   retrieve-boundary="page" retrieve-position="last-ending-within-page"/>

   
   
   
   
   marker-class-name="heading-in-page-sequence">first heading
   First 
Heading

   Some text
   Some text
   Some text
   Some text
   Some text
   marker-class-name="heading-in-page-sequence">first 
headingSome text

   
   
   marker-class-name="heading-in-page-sequence">second heading

   
   marker-class-name="heading-separator">-
   second 
headingSecond Heading

   Some text
   Some text
   Some text
   Some text
   Some text
   marker-class-name="heading-in-page-sequence">second 
headingSome text

   
   
   marker-class-name="heading-in-page-sequence">third heading

   
   marker-class-name="heading-separator">-
   third 
headingThird Heading

   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   Some text
   marker-class-name="heading-in-page-sequence">third 
headingSome text

   
   
   marker-class-name="heading-in-page-sequence">fourth heading

   
   marker-class-name="heading-separator">-
   fourth 
headingFourth Heading

   Some text
   Some text
   Some text
   Some text
   Some text
   marker-class-name="heading-in-page-sequence">fourth 
headingSome text

   
   
   marker-class-name="heading-in-page-sequence">fifth heading

   
   marker-class-name="heading-separator">-
   fifth 
headingFifth Heading

   Some text
   Some text
   Some text
   Some text
   Some text
   marker-class-name="heading-in-page-sequence">fifth 
headingSome text

   
   
   

Basically, I placed a marker that can be read when i specified a 
page-boundary of page-sequence. These were place as the first child of 
the parent block of the article and the first child of the last block of 
the article. Then I placed a marker for the separator and the title of 
the current article in the first block child of the main block, so that 
it can only be read by a page-boundary of page (I hope my understanding 
of the page-boundary property was correct).


Thanks,
*Jeff Sese*


Jeff Sese wrote:
How do i go about creating dynamic running heads that displays the 
first article in the page and the last article in page; or the only 
article if there is only one article in the page?


page 1:
Title 1
some text
some text
some text
some text
some text

page 2:
some text
some text
Title 2
some text
some text
some text

page 3:
some text
Title 3
some text
some text
some text
some text

page 4:
some text
some text
some text
some text
some text
some text

page 5:
Title 4
some text
some text
some text
Title 5
some text
some text
some text

I want my output to have the following headers for their corresponding 
page:


page 1: Title 1
page 2: Title 1 - Title 2
page 3: Title 2 - Title 3
page 4: Title 3
page 5: Title 4 - Title 5

Where do i put my markers and how do i retrieve them?

Thanks,


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