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 NewWorld <ne...@msn.com> on 2009/09/16 07:17:56 UTC

Re: PDF as external graphic

Hi there,
I have been using FOP for quite some time and it is working great, and I am
using the fop-pdf_image plug-in to insert a PDF into the final output.
However, I having problem with inserting PDF’s that created with PDF
versions like adobe 9. In summary I am looking for the plug-in to support
PDF 1.7 version.
It will be greatly appreciated if some one tells me where I can get the
plug-in.

Thanks Kindly,
Al




Maximilian Gaerber wrote:
> 
> Hi,
> 
> below is a template that I use for "merging" existing pdfs with 
> generated content. The existing pdf needs to be set up in a way that the 
> body region has the same width and height as the generated body. Header 
> and Footer are part of the generated content (so page numbering etc. 
> works). You can even add markers to these "custom pages", so they show 
> up in the TOC.
> 
> start snip
> ---------
> 
>   <xsl:template name="insert-custom-page">
>         <xsl:param name="master-ref"></xsl:param>
>         <xsl:param name="file-ref"></xsl:param>
>         <xsl:param name="content"></xsl:param>
>         <xsl:param name="custom-marker-text"></xsl:param>
>     
>         <fo:page-sequence master-reference="{$master-ref}">
>             <xsl:call-template name="header"/>
>             <xsl:call-template name="footer"/>
>          
>             <fo:flow flow-name="xsl-region-body">
>                 <xsl:if test="(normalize-space($custom-marker-text)) !=
> ''">
>                  <fo:marker marker-class-name="custom-marker">
>                    <xsl:value-of 
> select="$custom-marker-text"></xsl:value-of>
>                  </fo:marker>
>                 </xsl:if>
>                 <xsl:choose>
>                     <xsl:when test="$content = 'none'">
>                         <fo:block></fo:block>
>                     </xsl:when>
>                     <xsl:otherwise>
>                 <fo:block-container absolute-position="absolute" 
> top="-25mm" left="-15mm">
>                     <fo:block overflow="hidden" width="180mm" 
> height="252mm">
>                         <fo:external-graphic src="{$file-ref}"/>
>                     </fo:block>
>                 </fo:block-container>
>                     </xsl:otherwise>
>                 </xsl:choose>
>             </fo:flow>
>         </fo:page-sequence>
>    
>     </xsl:template>
> 
> --------
> end snip
> 
> Regards,
> 
> Max
> 
> Jeff Griffith schrieb:
>> We have also had a number of occasions to want to do
>> two things with external PDFs via FOP:
>>
>> 1): insert an external PDF page into an FOP generated
>> document (thus, we're merging a PDF and FOP doesn't
>> really do anything more with it)
>>
>> 2): embed a PDF page within a page in a PDF document
>> which means that only the "body" section of the page
>> is involved.
>>
>> We have used some other tools to acheive task 1, but
>> the result is always a bit of a hack. Some tools
>> don't handle page numbers, etc. so there's a lack
>> of consistency in the overall document.
>>
>> For item 2, the external PDF object becomes part
>> of the FOP page, just like an embedded SVG object.
>>
>> Thanks,
>> Jeff Griffith
>> CSSI
>>
>> PS it would be really great if I could embed the PDF
>> in a "float" object and put commentary on three side.
>>
>>
>> Trevor Harmon wrote:
>>> Hi,
>>>
>>> I have a question about <fo:external-graphic>. What's the reason 
>>> (technical? licensing? lack of interest?) that FOP does not support 
>>> PDF as a graphic format? It seems strange that FOP supports PDF for 
>>> output but not for input.
>>>
>>> The reason I ask is because I'm trying to embed some PDF 
>>> illustrations as figures in a PDF document via FOP. What is the 
>>> workaround for this? Will I just have to convert the PDFs to a format 
>>> that FOP supports?
>>>
>>> Thanks,
>>>
>>> Trevor
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>> __________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 
>> 3757 (20090111) __________
>>
>> E-Mail wurde geprüft mit ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>>
> 
> 
> News des Monats: www.thermopal.de - E-Business Lösung mit System für
> Thermopal, eine Tochter der Pfleiderer AG: Neugestaltung, wegweisende
> Produktsuche und moderne Nutzerführung!
> 
> -- 
> infolox GmbH
> Maximilian Gärber
> Bregenzer Straße 101
> D-88131 Lindau
> 
> fon +49 8382 / 275 894-70
> fax +49 8382 / 275 894-9
> mob +49 176 / 20 10 33 24
> 
> mail maximilian.gaerber@infolox.de
> www.infolox.de
> www.selektofix.de
> www.katalogfabrik.de
> www.typo3-services.com
> 
> 
> Rechtsform: Gesellschaft mit beschränkter Haftung
> Sitz der Gesellschaft: Lindau a. B.
> Registergericht: Amtsgericht Kempten
> Registernummer: HRB 8161
> Geschäftsführer: Stefan Bauhuis, Alexander Pircher, Richard Schmid
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/PDF-as-external-graphic-tp21375508p25466094.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: PDF as external graphic

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
As noted in the plug-in's README file:

"Apache FOP currently generates PDF 1.4. If you include a PDF with a
higher PDF version, the results may be unpredictable."

There's currently no other plug-in available to my knowledge. To get
fully correct behaviour we'd also have to teach FOP how to produce PDFs
of a later version. Working on that is currently not on my priority list.

On 16.09.2009 07:17:56 NewWorld wrote:
> 
> Hi there,
> I have been using FOP for quite some time and it is working great, and I am
> using the fop-pdf_image plug-in to insert a PDF into the final output.
> However, I having problem with inserting PDF’s that created with PDF
> versions like adobe 9. In summary I am looking for the plug-in to support
> PDF 1.7 version.
> It will be greatly appreciated if some one tells me where I can get the
> plug-in.
> 
> Thanks Kindly,
> Al
> 
> 
> 
> 
> Maximilian Gaerber wrote:
> > 
> > Hi,
> > 
> > below is a template that I use for "merging" existing pdfs with 
> > generated content. The existing pdf needs to be set up in a way that the 
> > body region has the same width and height as the generated body. Header 
> > and Footer are part of the generated content (so page numbering etc. 
> > works). You can even add markers to these "custom pages", so they show 
> > up in the TOC.
> > 
> > start snip
> > ---------
> > 
> >   <xsl:template name="insert-custom-page">
> >         <xsl:param name="master-ref"></xsl:param>
> >         <xsl:param name="file-ref"></xsl:param>
> >         <xsl:param name="content"></xsl:param>
> >         <xsl:param name="custom-marker-text"></xsl:param>
> >     
> >         <fo:page-sequence master-reference="{$master-ref}">
> >             <xsl:call-template name="header"/>
> >             <xsl:call-template name="footer"/>
> >          
> >             <fo:flow flow-name="xsl-region-body">
> >                 <xsl:if test="(normalize-space($custom-marker-text)) !=
> > ''">
> >                  <fo:marker marker-class-name="custom-marker">
> >                    <xsl:value-of 
> > select="$custom-marker-text"></xsl:value-of>
> >                  </fo:marker>
> >                 </xsl:if>
> >                 <xsl:choose>
> >                     <xsl:when test="$content = 'none'">
> >                         <fo:block></fo:block>
> >                     </xsl:when>
> >                     <xsl:otherwise>
> >                 <fo:block-container absolute-position="absolute" 
> > top="-25mm" left="-15mm">
> >                     <fo:block overflow="hidden" width="180mm" 
> > height="252mm">
> >                         <fo:external-graphic src="{$file-ref}"/>
> >                     </fo:block>
> >                 </fo:block-container>
> >                     </xsl:otherwise>
> >                 </xsl:choose>
> >             </fo:flow>
> >         </fo:page-sequence>
> >    
> >     </xsl:template>
> > 
> > --------
> > end snip
> > 
> > Regards,
> > 
> > Max
> > 
> > Jeff Griffith schrieb:
> >> We have also had a number of occasions to want to do
> >> two things with external PDFs via FOP:
> >>
> >> 1): insert an external PDF page into an FOP generated
> >> document (thus, we're merging a PDF and FOP doesn't
> >> really do anything more with it)
> >>
> >> 2): embed a PDF page within a page in a PDF document
> >> which means that only the "body" section of the page
> >> is involved.
> >>
> >> We have used some other tools to acheive task 1, but
> >> the result is always a bit of a hack. Some tools
> >> don't handle page numbers, etc. so there's a lack
> >> of consistency in the overall document.
> >>
> >> For item 2, the external PDF object becomes part
> >> of the FOP page, just like an embedded SVG object.
> >>
> >> Thanks,
> >> Jeff Griffith
> >> CSSI
> >>
> >> PS it would be really great if I could embed the PDF
> >> in a "float" object and put commentary on three side.
> >>
> >>
> >> Trevor Harmon wrote:
> >>> Hi,
> >>>
> >>> I have a question about <fo:external-graphic>. What's the reason 
> >>> (technical? licensing? lack of interest?) that FOP does not support 
> >>> PDF as a graphic format? It seems strange that FOP supports PDF for 
> >>> output but not for input.
> >>>
> >>> The reason I ask is because I'm trying to embed some PDF 
> >>> illustrations as figures in a PDF document via FOP. What is the 
> >>> workaround for this? Will I just have to convert the PDFs to a format 
> >>> that FOP supports?
> >>>
> >>> Thanks,
> >>>
> >>> Trevor
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >>
> >>
> >> __________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 
> >> 3757 (20090111) __________
> >>
> >> E-Mail wurde geprüft mit ESET NOD32 Antivirus.
> >>
> >> http://www.eset.com
> >>
> >>
> >>
> >>
> > 
> > 
> > News des Monats: www.thermopal.de - E-Business Lösung mit System für
> > Thermopal, eine Tochter der Pfleiderer AG: Neugestaltung, wegweisende
> > Produktsuche und moderne Nutzerführung!
> > 
> > -- 
> > infolox GmbH
> > Maximilian Gärber
> > Bregenzer Straße 101
> > D-88131 Lindau
> > 
> > fon +49 8382 / 275 894-70
> > fax +49 8382 / 275 894-9
> > mob +49 176 / 20 10 33 24
> > 
> > mail maximilian.gaerber@infolox.de
> > www.infolox.de
> > www.selektofix.de
> > www.katalogfabrik.de
> > www.typo3-services.com
> > 
> > 
> > Rechtsform: Gesellschaft mit beschränkter Haftung
> > Sitz der Gesellschaft: Lindau a. B.
> > Registergericht: Amtsgericht Kempten
> > Registernummer: HRB 8161
> > Geschäftsführer: Stefan Bauhuis, Alexander Pircher, Richard Schmid
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/PDF-as-external-graphic-tp21375508p25466094.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 




Jeremias Maerki


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