Announcement

Collapse
No announcement yet.

Generating PDFs on IFS using xslt

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Generating PDFs on IFS using xslt

    Hi,

    I'm just back to development on the iSeries after about 14 years. I'm amazed to see how it's moved on, however, need some help and advice. We need to produce some pdfs with a very specific layout and format which is currently coming from a word template. I was thinking to create an xslt to mimic this format and generate an xml file containing the appropriate data which would then be rendered as a pdf on the IFS using the xslt. Has anyone had any experience doing something similar who could give me some pointers? Also, if there's another solution, this would also be highly appreciated.

    Thanks in advance.

  • #2
    You could take a look at InterFormNG2
    It can receive data from a lot of sources and formats and produce formatted output in different formats - for example PDF.

    http://interform400.com

    They are located in Denmark, Germany and United States.

    You can find a lot about it on Youtube.
    Last edited by Peder Udesen; 3 weeks ago.

    Comment


    • #3
      Originally posted by Peder Udesen View Post
      You could take a look at InterFormNG2
      It can receive data from a lot of sources and formats and produce formatted output in different formats - for example PDF.

      http://interform400.com

      They are located in Denmark, Germany and United States.

      You can find a lot about it on Youtube.
      Thanks Peder. It looks very interesting. However, I was trying to avoid going through a 3rd party solution and do this natively from the iSeries. Any ideas?

      Comment


      • #4
        Spoolfiles can be generated as PDF automatically. Does the MS-Word template include logos or constant text? Convert it to an AFP page overlay.

        Comment


        • #5
          This page explains how to create a page overlay

          https://www.ibm.com/support/pages/cr...rinter-drivers

          To print the word document to AFP you need the AFP print drivers. If you don't have them they can be downloaded here

          https://dl.ricohsoftware.com/downloa...9-1cf7403f3b4f

          Comment


          • #6
            Originally posted by UserName10 View Post
            This page explains how to create a page overlay

            https://www.ibm.com/support/pages/cr...rinter-drivers

            To print the word document to AFP you need the AFP print drivers. If you don't have them they can be downloaded here

            https://dl.ricohsoftware.com/downloa...9-1cf7403f3b4f
            Super. I'll look into this.

            Comment


            • #7
              If you really want to go crazy.... you can use Node.js on the IBMi and use NPM packages like jsPDF and jsPDF-AutoTable to produce fancy PDFs and write them to the IFS.
              Your friends list is empty!

              Comment


              • #8
                Thanks for helping an old school RPG programmer. I've had a lot of success with AFP and then doing a CPYSPLF with *TOSTMF *PDF options. I do have another question though that someone may be able to help with. The pdf I'm creating should contain hyperlinks to a web-site and the hyperlink is dynamic. I can achieve this by simply having a text field with the website address e.g. https://www.google.com. Adobe recognizes this and it does work as a hyperlink, however, it's not formatted as a hyperlink. I can get around this by making the color blue and having it underlined, however the underline is the default color, black, which looks a bit strange. Does anyone know how to either have the underline in blue, or to specify that the text is a hyperlink so that adobe displays it as a real hyperlink?

                Comment


                • #9
                  Actually, further to this, I would need a real hyperlink with a substitution text as the URL is several lines long and needs to be replaced with a small phrase. Has anyone ever managed to generate an AFP spool file with a URL on the page which, when converted to a pdf, can be displayed as a hyperlink with replacement text? It may be that this is just not possible.

                  An example in HTML would be "<a href="https://www.google.com" target= "_blank">Google</a> being displayed as the text Google on the pdf with a hyperlink to https://www.google.com.

                  Comment

                  Working...
                  X