You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by David Elliot <da...@gmail.com> on 2006/01/04 02:24:19 UTC

Embedding PDF documents?

Hi FOP Users,

Apologies if this is a very common question - I have checked the FAQ!

I know that you can embed (via <external-graphic> for example), the
following file types: BMP, EPS, GIF, JPEG, PNG, SVG or TIFF during a
FOP render.

Is there any talk of "PDF" being supported as an additional "Input
Format" for Apache FOP?  We would like to read in PDF input docs as
part of a multi-attachment XML -> PDF render.

I have seen a customized FOP library that uses the PJX libs to effect
this - although this customized lib is somewhat buggy.

Many thanks,

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Embedding PDF documents?

Posted by Clay Leeds <we...@mac.com>.
On Jan 6, 2006, at 10:15 AM, Glen Mazza wrote:
> I think we're talking two different things.  FOP's input is still  
> an XML document in the XSL namespace, those types above are  
> graphics incorporated via fo:external-graphic or fo:instream- 
> foreign-object.  You would apparently like a new extension element  
> then, possibly under fo:instream-foreign-object, that will allow  
> for incorporating a PDF document.
>
> PDF is not a graphic though.  It is an output type, a document--so  
> I guess you would need to write a parser for FOP to be able to  
> translate the PDF document into XSL-namespace events that can  
> subsequently be rendered on FOP's standard output types--PDF, PS,  
> AWT, RTF, etc.  That is out of scope for FOP.  But if someone  
> wanted it to contribute it to FOP, I would defer that to the rest  
> of the team (I haven't been coding for awhile), but it would need  
> to be pretty robust and solid -- not just a partly working system  
> that will fill up the Bugzilla list with errors from people trying  
> to use FOP just to concatenate PDF documents, or to convert PDF  
> documents into other output formats.  (Then again, that's how open  
> source works...  ;-)

While it would be 'nice to have' I'm not convinced it would be a good  
idea. It would be one more maintenance 'hassle' to support & maintain  
(unless this new addition had enough of a following to support it-- 
i.e. new developers).

BTW, although TIFF files are supported, I don't believe multiple page  
TIFF files (e.g., FAX documents) are supported. I took a look at the  
FOP Graphics page's TIFF section ([1], [2]) & didn't see any mention  
about it, but I believe that only single-page TIFF files are supported.

> Also, AFAICT the W3C XSL Working Group does not allow for embedding  
> XSL documents within other XSL documents (i.e, placing an fo:root  
> within an fo:root).  Whatever their philosophical concerns are  
> about such embedding may also be relevant for embedding PDF  
> documents here.
>
> Glen

[1]
http://xmlgraphics.apache.org/fop/0.20.5/graphics.html#tiff
[2]
http://xmlgraphics.apache.org/fop/0.91/graphics.html#tiff

Web Maestro Clay

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Embedding PDF documents?

Posted by Glen Mazza <gm...@apache.org>.
David Elliot wrote:

>Hi Glen,
>
>Sure that makes sense, FOP looks to be conceived as an Apache strength
>XSL-FO -> PDF formatting utility/library that implements W3C's XSL-FO
>standard - the end result being a library which task specific
>applications can then confidently leverage.  Although, currently FOP
>supports a variety of input formats - notionally image/graphic data
>(BMP, EPS, GIF, JPEG, PNG, SVG or TIFF) - for inclusion during a
>render.  Did this list of supported data formats evolve via
>contribution, or is it strictly specified by standard ?
>
>Many thanks,
>David
>
>  
>

I think we're talking two different things.  FOP's input is still an XML 
document in the XSL namespace, those types above are graphics 
incorporated via fo:external-graphic or fo:instream-foreign-object.  You 
would apparently like a new extension element then, possibly under 
fo:instream-foreign-object, that will allow for incorporating a PDF 
document.

PDF is not a graphic though.  It is an output type, a document--so I 
guess you would need to write a parser for FOP to be able to translate 
the PDF document into XSL-namespace events that can subsequently be 
rendered on FOP's standard output types--PDF, PS, AWT, RTF, etc.  That 
is out of scope for FOP.  But if someone wanted it to contribute it to 
FOP, I would defer that to the rest of the team (I haven't been coding 
for awhile), but it would need to be pretty robust and solid -- not just 
a partly working system that will fill up the Bugzilla list with errors 
from people trying to use FOP just to concatenate PDF documents, or to 
convert PDF documents into other output formats.  (Then again, that's 
how open source works...  ;-)

Also, AFAICT the W3C XSL Working Group does not allow for embedding XSL 
documents within other XSL documents (i.e, placing an fo:root within an 
fo:root).  Whatever their philosophical concerns are about such 
embedding may also be relevant for embedding PDF documents here.

Glen



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Embedding PDF documents?

Posted by David Elliot <da...@gmail.com>.
On 1/6/06, Glen Mazza <gm...@apache.org> wrote:
> David Elliot wrote:
>
> >Is there any talk of "PDF" being supported as an additional "Input
> >Format" for Apache FOP?  We would like to read in PDF input docs as
> >part of a multi-attachment XML -> PDF render.
> >
> That would IMHO be outside FOP's scope, as the input for Apache FOP is
> an XML document in the XSL namespace.  That's FOP's task at Apache.
> Other software products may choose to embed Apache FOP as part of
> something that you would like to see, but I think FOP's role in this
> aspect should be merely to be very easy to be embedded in other
> products, but not directly be that "other product" itself.
>
> Glen

Hi Glen,

Sure that makes sense, FOP looks to be conceived as an Apache strength
XSL-FO -> PDF formatting utility/library that implements W3C's XSL-FO
standard - the end result being a library which task specific
applications can then confidently leverage.  Although, currently FOP
supports a variety of input formats - notionally image/graphic data
(BMP, EPS, GIF, JPEG, PNG, SVG or TIFF) - for inclusion during a
render.  Did this list of supported data formats evolve via
contribution, or is it strictly specified by standard ?

Many thanks,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Embedding PDF documents?

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 5, 2006, at 22:44, Glen Mazza wrote:

Hi Glen / David,

> David Elliot wrote:
>
>> Is there any talk of "PDF" being supported as an additional "Input
>> Format" for Apache FOP?  We would like to read in PDF input docs as
>> part of a multi-attachment XML -> PDF render.
>>
>
> That would IMHO be outside FOP's scope, as the input for Apache FOP  
> is an XML document in the XSL namespace.  That's FOP's task at  
> Apache.  Other software products may choose to embed Apache FOP as  
> part of something that you would like to see, but I think FOP's  
> role in this aspect should be merely to be very easy to be embedded  
> in other products, but not directly be that "other product" itself.

That's very nicely put. At most, what could be done directly in FOP -- 
if anyone has the necessary amount of time and resources-- is create  
a FO extension for this. If I recall correctly, this has already been  
mentioned in the past (albeit very briefly).

Just thought I'd mention it again.


Cheers,

Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Embedding PDF documents?

Posted by Glen Mazza <gm...@apache.org>.
David Elliot wrote:

>Is there any talk of "PDF" being supported as an additional "Input
>Format" for Apache FOP?  We would like to read in PDF input docs as
>part of a multi-attachment XML -> PDF render.
>  
>

That would IMHO be outside FOP's scope, as the input for Apache FOP is 
an XML document in the XSL namespace.  That's FOP's task at Apache.  
Other software products may choose to embed Apache FOP as part of 
something that you would like to see, but I think FOP's role in this 
aspect should be merely to be very easy to be embedded in other 
products, but not directly be that "other product" itself.

Glen



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Embedding PDF documents?

Posted by Manuel Mall <ma...@apache.org>.
> Hi FOP Users,
>

I am not aware of any attempts to integrate something like this into FOP. 
Have you looked at possible post processing options using a library like
iText (http://www.lowagie.com/iText/) for example, that is let FOP
generate the initial PDF then use iText to append / insert pages from the
other PDFs?

Manuel

> Apologies if this is a very common question - I have checked the FAQ!
>
> I know that you can embed (via <external-graphic> for example), the
> following file types: BMP, EPS, GIF, JPEG, PNG, SVG or TIFF during a
> FOP render.
>
> Is there any talk of "PDF" being supported as an additional "Input
> Format" for Apache FOP?  We would like to read in PDF input docs as
> part of a multi-attachment XML -> PDF render.
>
> I have seen a customized FOP library that uses the PJX libs to effect
> this - although this customized lib is somewhat buggy.
>
> Many thanks,
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org