Stockinger Robert: XSL-FO embedded XML

Hi all,

I want to create stylesheet to convert a xml document into a XSL-FO file for creating a pdf document. The final pdf shall contain the source xml as an attached/embedded document.

Is it possible to do that? How?

kind regards
Robert

  1. Hi,

    Is this a cross-post or you really do not know (enough) german?

    I want to create stylesheet to convert a xml document into a XSL-FO file for creating a pdf document. The final pdf shall contain the source xml as an attached/embedded document.

    Is it possible to do that?

    Maybe. Depending on the used technology.
    With the commonly used tools like FOP is this (i.e. to embed a PDF into a PDF) not possible.
    However, you could create an xslt-template to take the xml-source itself and transform it to plain-text (first of all the < and > signs) and then put this text into a fo:block styled with a monospace font.

    Regads
    Thomas

    1. Hallo Thomas,

      danke für die Antwort.
      ich verstehe die Antwort so, dass es nicht möglich ist, eine XML per XSLT Datei so in ein PDF zu importieren, dass die Daten dort als Dateianhang ankommen (zB signierte XML Rechnung in ein generiertes PDF Dokument)

      Hast du eine Idee, wie man das alternativ lösen könnte? Mir fällt dann nur noch itext ein.

      lg
      Robert

      Hi,

      Is this a cross-post or you really do not know (enough) german?

      I want to create stylesheet to convert a xml document into a XSL-FO file for creating a pdf document. The final pdf shall contain the source xml as an attached/embedded document.

      Is it possible to do that?

      Maybe. Depending on the used technology.
      With the commonly used tools like FOP is this (i.e. to embed a PDF into a PDF) not possible.
      However, you could create an xslt-template to take the xml-source itself and transform it to plain-text (first of all the < and > signs) and then put this text into a fo:block styled with a monospace font.

      Regads
      Thomas

      1. Hallo,

        danke für die Antwort.
        ich verstehe die Antwort so, dass es nicht möglich ist, eine XML per XSLT Datei so in ein PDF zu importieren, dass die Daten dort als Dateianhang ankommen (zB signierte XML Rechnung in ein generiertes PDF Dokument)

        Korrekt.
        Ich bin jetzt auch nicht sicher, ob es generell möglich ist, im PDF einen "Dateianhang" (wie in Mails, oder wie meinst du "Dateianhang" überhaupt?) zu haben.
        Aber auch wenn: nur weil dein XML signiert ist, wird das PDF deshalb noch lange kein signiertes PDF. (Im signierten PDF kann man in der Signatur eine Datei (genauer gesagt ein Bild) unterbringen)

        Hast du eine Idee, wie man das alternativ lösen könnte?

        Nicht wirklich, weil ich nicht genau verstehe was du erreichen möchtest.

        Grüße
        Thomas