Loading ...
Sorry, an error occurred while loading the content.

Embedding a PDF within a PDF?

Expand Messages
  • Carey Oxler
    Lemme guess... there is no way to insert a PDF as an object inside FOP. I have a static PDF document that needs to be the last page of our
    Message 1 of 3 , Jul 8, 2003
    • 0 Attachment
      Lemme guess... there is no way to insert a PDF as an object inside
      FOP. I have a static PDF document that needs to be the last page of
      our dynamically-generated PDF. Plus, this static document may be
      replaced from time to time at the client's whim. If I could embed it
      as an object, that would make my life easy.

      The horrible alternative is hand-coding the FOP to create an
      imitation of the static PDF as a last page, and meticulously hand-
      coding any and all changes whenever the client updates the document.

      Any suggestions?

      --Carey
    • Jim White
      ... It s not too hard to imagine a way to hack up FOP to embed some existing PDF content (probably doing something based on the page master stuff). You could
      Message 2 of 3 , Jul 8, 2003
      • 0 Attachment
        Carey Oxler wrote:
        > Lemme guess... there is no way to insert a PDF as an object inside
        > FOP. I have a static PDF document that needs to be the last page of
        > our dynamically-generated PDF. Plus, this static document may be
        > replaced from time to time at the client's whim. If I could embed it
        > as an object, that would make my life easy.

        It's not too hard to imagine a way to hack up FOP to embed some existing
        PDF content (probably doing something based on the page master stuff).

        You could also do the equivalent by post-processing the PDF to append a
        file.

        Some stuff that might help:

        jpedal - PDF extraction
        http://www.jpedal.org/

        itext - PDF generation
        http://www.lowagie.com/iText/

        Retep - PDF generation
        http://retep.org/retep/home.do

        Googling "append pdf files" turns up a bunch of stuff too
        http://www.google.com/search?q=append+pdf+files

        Jim
        --
        "I love deadlines. I love the whooshing sound they make as they fly by."
        -- Douglas Adams
      • Praveen Sam
        ... IF you are saying that you want a static page at the end of a dynamically generated pages(say 10 or 20) - you can do that by having a different
        Message 3 of 3 , Jul 8, 2003
        • 0 Attachment
          >I have a static PDF document that needs to be
          > the last page of
          > our dynamically-generated PDF. Plus, this static
          > document may be
          > replaced from time to time at the client's whim.

          IF you are saying that you want a static page at the
          end of a dynamically generated pages(say 10 or 20) -
          you can do that by having a different
          layout-master-set with a simple-page-master for the
          dynamic content and one for the static so that the
          static page is always rendered "after" the dynamic one
          and run the above in a for-each loop.

          You can store the static content in the xsl fo with
          matching xml tags that identify it as a "seperate"
          page. This would render it as "static pdf" that you
          already had in place at the end of the document -
          basically you are breaking the pdf into an xml and an
          xsl fo and rendering back into the pdf.(At the end of
          the dynamically generated pages). Any time the client
          wants to change the content of the static pdf - all
          you would be doing is changing the xsl fo.

          Since the sequence is in place - the pdf is "always"
          generated after your dynamic content is generated.

          Hope this helps ..

          cheers
          Praveen

          > I could embed it
          > as an object, that would make my life easy.
          >
          > The horrible alternative is hand-coding the FOP to
          > create an
          > imitation of the static PDF as a last page, and
          > meticulously hand-
          > coding any and all changes whenever the client
          > updates the document.
          >
          > Any suggestions?
          >
          > --Carey
          >
          >


          =====


          __________________________________
          Do you Yahoo!?
          SBC Yahoo! DSL - Now only $29.95 per month!
          http://sbc.yahoo.com
        Your message has been successfully submitted and would be delivered to recipients shortly.