ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

hyperlink in print file

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

  • hyperlink in print file

    I have a program that creates a report in pdf, is there a way to put a hyperlink in the rpgle print file? So when opened in pdf you can clink on the link?

  • #2
    I'd be very surprised if RPG output to a printer file could result in live links in a .PDF, but I've been surprised before. There are probably better approaches to creating such a .PDF. The RPG possibly should create database records that can feed into something that can create a .PDF under more customized control.
    Tom

    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

    Comment


    • Whitecat27
      Whitecat27 commented
      Editing a comment
      Tom says, "The RPG possibly should create database records that can feed into something that can create a .PDF under more customized control."

      I am curious as to why you think a database needs to be created, and how it would give more customized control outside the original RPGLE program that creates the PDF. My question is nothing evil or snarky aimed at you personally... it's just a curiosity.

      Maybe you can share your thoughts about that with me, and then, I get to learn a new thing.

  • #3
    Depending upon your particular flavor of iSeries release level, a PDF can be directly created by an RPGLE program. According to IBM, at V7R1, your print file needs to be created as an *AFPDS type. Those details can be found here:



    The resulting "spool file" can also be directed to the NTFS area on your iSeries machine using the directions on this page...

    Convert your spool files to PDF just using functionality available in the IBM i operating system. No third part tools, just native functionality.


    I'd really not want to type all those details into this post, so those two links are left as an exercise for the reader.

    I have used these methods to do PDF files without the use of third party software, and even though IBM says that all this will work at V6R1, there are people out there that simply can't get all this to work for them at that release level. I've also seen various comments in other places that seem to indicate difficulties with CCSIDs... however, I'd think that is more of a function of the resulting PDF, rather than the output from the RPGLE/CLLE programs.

    As far as hyperlinks go... I've not ever embedded one in any PDF I've made, however, it would seem to be a simple matter to create a test case. Much like Tom, I'd be surprised that using the given methods here, that embedding a hyperlink in an RPGLE program into a PDF would not work (although our areas of being surprised are somewhat different). It's kind of nice to know that all of our iSeries machines can provide surprises to every one of us.


    Best Regards,

    Fred Williams

    Comment

    Working...
    X