Re: Use PDF as input source for FOP

2006-11-30 Thread Jeremias Maerki
Incidentally, I've been investigating this recently for a customer.
Essentially, there's one big problem: Our PDF library only supports
writing PDF and it's optimized for this task. We don't have a PDF parser
which would be needed. I've done a quick&dirty prototype using PDFBox to
see if including PDF pages using fo:external-graphic would be doable. If
you have a PDF parser it's pretty easy. We were discussing about
adopting PDFBox as our primary PDF library but it's not optimized for
writing large PDF files which our own library is. Big dilemma. I have a
few ideas to make this work with relatively little effort (using a
combination of PDFBox and our PDF library, still not a one-day job,
though) and I will likely get to this in the next weeks. But as always,
no promises on this list and help is welcome. :-)

On 01.12.2006 06:36:14 Peter wrote:
> Apologies for jumping in on this thread, but I have a similar requirement,
> that is, a pdf is delivered to us which we want to embed in fop, much like
> one would embed a jpg.
> 
>  
> 
> I understand fop does not support that today, but does anybody have ideas on
> what it might take to implement that? Note that I have the impression that
> other xsl-fo processors do support such a feature.




Jeremias Maerki


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



RE: Use PDF as input source for FOP

2006-11-30 Thread Peter
Apologies for jumping in on this thread, but I have a similar requirement,
that is, a pdf is delivered to us which we want to embed in fop, much like
one would embed a jpg.

 

I understand fop does not support that today, but does anybody have ideas on
what it might take to implement that? Note that I have the impression that
other xsl-fo processors do support such a feature.

 

Thanks,

 

Peter

 

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 30, 2006 8:37 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Use PDF as input source for FOP

 


Thank you, Dirk...we do use iText for some of our applications...I'll get
with our developers that are using iText to find out more and I'll check out
the URL you listed. 

Thanks again. 




Dirk Bromberg <[EMAIL PROTECTED]> 

11/30/2006 02:00 PM 


Please respond to
fop-users@xmlgraphics.apache.org


To

fop-users@xmlgraphics.apache.org 


cc

 


Subject

Re: Use PDF as input source for FOP

 


 

 




Hi,

what you want can be done with itext.
www.lowagie.com/*iText*/

fop can only create pdfs with some like xml:fo as source.

Dirk

[EMAIL PROTECTED] schrieb:
>
> Has anyone had any experience with using PDF's as input for FOP?
>
> We are using FOP 0.20.5 with Java 1.5.  We have a PDF that was 
> provided to us by an outside source.  We would like to leverage the 
> existing PDF (or as much of it as we can)  by using it as an input 
> source.  Our goal is to  modify it with our data, and have FOP 
> generate a new PDF for us, which would be a combination of the 
> original PDF and our data.
>
> From reading the FAQ's and the mail archives for FOP, it appears FOP 
> will only take XML and XSL-FO as input.  So, I am wondering, do I need 
> to use some independent PDF to XML conversion tool, or if there is a 
> better/easier way to do this?
>
> Thank you for any insight you can offer us regarding this issue.
>
>
>
>
>


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





Re: javax.xml.transform.TransformerException error - DocBook XSL with FOP 0.92

2006-11-30 Thread J.Pietschmann

Paul Moloney wrote:
Since we don't create FO files directly, but via FOP, do you know how I 


You mean "via DocBook XSLT", don't you?

would configure FOP or what change(s) I need to make to our customised 
DocBook XSL layer in order to achieve this?


The DocBook XSLT has a very helpful community. Try
 http://docbook.sourceforge.net/

J.Pietschmann

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



Re: NPE IN SingleByteFont.hasChar when using IDAutomationC39S font

2006-11-30 Thread J.Pietschmann

Peter wrote:

Fop now says

SEVERE: file:///c:/temp/lala.fo:9:42: No conversion defined 40;
property:'height'


This is unrelated to the barcode/font issue, it means
FOP can't convert the value into something it understands.
I think this is a bug in FOP (measurements without a unit
should be interpreted as pixel, unless I overlooked something).
In any case if you generate PDF you should specify measurements
in mm, pt or in.

J.Pietschmann


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



Re: Use PDF as input source for FOP

2006-11-30 Thread jperkowski
Thank you, Dirk...we do use iText for some of our applications...I'll get 
with our developers that are using iText to find out more and I'll check 
out the URL you listed.

Thanks again.



Dirk Bromberg <[EMAIL PROTECTED]> 
11/30/2006 02:00 PM
Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
cc

Subject
Re: Use PDF as input source for FOP






Hi,

what you want can be done with itext.
www.lowagie.com/*iText*/

fop can only create pdfs with some like xml:fo as source.

Dirk

[EMAIL PROTECTED] schrieb:
>
> Has anyone had any experience with using PDF's as input for FOP?
>
> We are using FOP 0.20.5 with Java 1.5.  We have a PDF that was 
> provided to us by an outside source.  We would like to leverage the 
> existing PDF (or as much of it as we can)  by using it as an input 
> source.  Our goal is to  modify it with our data, and have FOP 
> generate a new PDF for us, which would be a combination of the 
> original PDF and our data.
>
> From reading the FAQ's and the mail archives for FOP, it appears FOP 
> will only take XML and XSL-FO as input.  So, I am wondering, do I need 
> to use some independent PDF to XML conversion tool, or if there is a 
> better/easier way to do this?
>
> Thank you for any insight you can offer us regarding this issue.
>
>
>
>
>


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




Re: Use PDF as input source for FOP

2006-11-30 Thread Dirk Bromberg

Hi,

what you want can be done with itext.
www.lowagie.com/*iText*/

fop can only create pdfs with some like xml:fo as source.

Dirk

[EMAIL PROTECTED] schrieb:


Has anyone had any experience with using PDF's as input for FOP?

We are using FOP 0.20.5 with Java 1.5.  We have a PDF that was 
provided to us by an outside source.  We would like to leverage the 
existing PDF (or as much of it as we can)  by using it as an input 
source.  Our goal is to  modify it with our data, and have FOP 
generate a new PDF for us, which would be a combination of the 
original PDF and our data.


From reading the FAQ's and the mail archives for FOP, it appears FOP 
will only take XML and XSL-FO as input.  So, I am wondering, do I need 
to use some independent PDF to XML conversion tool, or if there is a 
better/easier way to do this?


Thank you for any insight you can offer us regarding this issue.








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



Use PDF as input source for FOP

2006-11-30 Thread jperkowski
Has anyone had any experience with using PDF's as input for FOP?

We are using FOP 0.20.5 with Java 1.5.  We have a PDF that was provided to 
us by an outside source.  We would like to leverage the existing PDF (or 
as much of it as we can)  by using it as an input source.  Our goal is to 
modify it with our data, and have FOP generate a new PDF for us, which 
would be a combination of the original PDF and our data. 

>From reading the FAQ's and the mail archives for FOP, it appears FOP will 
only take XML and XSL-FO as input.  So, I am wondering, do I need to use 
some independent PDF to XML conversion tool, or if there is a 
better/easier way to do this?

Thank you for any insight you can offer us regarding this issue.







Re: javax.xml.transform.TransformerException error - DocBook XSL with FOP 0.92

2006-11-30 Thread Paul Moloney

You can find the FO file at:
http://pmoloney.googlepages.com/administrator_guide.txt



I can't reproduce the problem, because I don't have the images that
should be included (and the Arial font, but that should be less
problematic). Can you also post the images? Or try to post a sample
document without any image that still shows the problem.


Hi Vincent,

That last sentence helped, since removing one particular graphic meant that 
the doc built - I should have tried this before. doh. So it turns out that 
the severe error is also related to graphics not being resized.


You previously mentioned:


You can
try to replace "auto" by "scale-to-fit" for the value of content-height.
But if possible this may be easier to resize the image to make it fit on
the line.


Since we don't create FO files directly, but via FOP, do you know how I 
would configure FOP or what change(s) I need to make to our customised 
DocBook XSL layer in order to achieve this? We could resize the images, and 
that'll be the short-term fix, but I'd rather configure the build so that if 
people add oversized graphics, errors don't happen.


Thanks again,

P.

-pm

http://oceanclub.blogspot.com

"Politicians, like underwear, should be changed often, and for the same 
reasons." 



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



RE: NPE IN SingleByteFont.hasChar when using IDAutomationC39S font

2006-11-30 Thread Peter
I found the TrueType versions of the 2 barcode fonts I was using and those
work just fine.

Peter

> -Original Message-
> From: Peter [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 30, 2006 8:42 AM
> To: 'fop-users@xmlgraphics.apache.org'
> Subject: RE: NPE IN SingleByteFont.hasChar when using IDAutomationC39S
> font
> 
> Jeremias,
> 
> That gets me a little further.
> 
> Fop now says
> 
> SEVERE: file:///c:/temp/lala.fo:9:42: No conversion defined 40;
> property:'height'
> 
> A PDF is however created and when I open it, Acrobat Reader complains PDF
> with
> "The font 'IDAutomationC39S' contains bad /Flags."
> 
> A document is however opened which does contain "a" barcode.
> 
> Note that I am not necessarily in a big hurry, so if you say "I'm sure it
> can be made to work with some coding but right now" is there anything I
> can do to actually make it work?
> 
> Thanks,
> 
> Peter
> 
> > -Original Message-
> > From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, November 30, 2006 7:41 AM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: NPE IN SingleByteFont.hasChar when using IDAutomationC39S
> > font
> >
> > The problem is the "UnknownEncoding" in the XML. FOP did not recognize
> > the encoding and can't handle a font like that. I'm sure it can be made
> > to work with some coding but right now, the only thing you can try is to
> > replace "UnknownEncoding" with "StandardEncoding" and check if it works.
> > Otherwise, you should check out http://barcode4j.sourceforge.net as an
> > alternative.
> >
> > On 30.11.2006 00:56:54 Peter wrote:
> > > Thanks for the reply,
> > >
> > > I started from a Type1 font for which, I have the impression, the -enc
> > ansi
> > > option is not supported/relevant.
> > >
> > > Attached the metrics file.
> > >
> > > All guidance where to look is appreciated,
> > >
> > > Thanks,
> > >
> > > Peter
> > >
> > > > -Original Message-
> > > > From: J.Pietschmann [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, November 29, 2006 11:32 PM
> > > > To: fop-users@xmlgraphics.apache.org
> > > > Subject: Re: NPE IN SingleByteFont.hasChar when using
> IDAutomationC39S
> > > > font
> > > >
> > > > Peter wrote:
> > > > > I am trying to use a Barcode font (IDAutomationC39S) and I am
> > getting an
> > > > NPE
> > > > > with the following trace listed lower.
> > > >
> > > > Barcode fonts are tricky, because barcode glyphs are not separate
> > > > unicode glyphs.
> > > > It seems that the encoding for your font is unknown. Try to generate
> > > > the font metrics using the -enc ansi, although I think you did this
> > > > already. Would you mind sending in your metrics file?
> > > >
> > > > If all else fails, try the barcode4j extension or generate a SVG
> > > > for the barcode and use this (there are XSLT style sheets out there
> > > > for this purpose).
> > > >
> > > > J.Pietschmann
> >
> >
> > Jeremias Maerki
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: page breaks

2006-11-30 Thread Shubhrata Tewari

Thanks, it worked.
- Original Message - 
From: "Chris Bowditch" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, November 30, 2006 2:42 PM
Subject: Re: page breaks



Shubhrata Tewari wrote:


Hi,
I am iterating over a list of tables and I want each table to appear on a 
a new page.I have set the break-after="page" in the fo:block, but this is 
creating an unnecessary page at the end of the last element.
Is there any way to add a page break without introducing an extra page 
before or after the fo:block?


This is more of an XSLT problem than a XSL-FO one. You can add a test to 
the XSLT so that break-after="page" is added to every table except the 
last one.



 this is the code:
 






font-size="{$data_font_size}" font-style="{$font_style}" 
font-family="{$font_family}" keep-together="always" break-after="page">








 table contents






I hope this makes sense.

Chris




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





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



Re: page breaks

2006-11-30 Thread Chris Bowditch

Shubhrata Tewari wrote:


Hi,
I am iterating over a list of tables and I want each table to appear on 
a a new page.I have set the break-after="page" in the fo:block, but this 
is creating an unnecessary page at the end of the last element.
Is there any way to add a page break without introducing an extra page 
before or after the fo:block?


This is more of an XSLT problem than a XSL-FO one. You can add a test to 
the XSLT so that break-after="page" is added to every table except the 
last one.


 
this is the code:
 
 









font-size="{$data_font_size}" font-style="{$font_style}" 
font-family="{$font_family}" keep-together="always" break-after="page">








 table contents






I hope this makes sense.

Chris




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