I have a requirement to produce PDFs with large print and I am having issues, need help

Discussions relating to writing software in ILE RPG (RPG IV). This includes both fixed and free format RPG.
Post Reply
bigbeargc
Posts: 2
Joined: Wed Mar 06, 2024 8:24 pm

I have a requirement to produce PDFs with large print and I am having issues, need help

Post by bigbeargc »

I currently work for a health care claims processing provider. We MAIL denial PDFs created on the Power I.

I write the programs that create denial PDFs that are mailed to members and/or providers. I create the PDFs using *AFPDS defined printer files, pass the PDF to AFPTOOL, which copies the printer file to a TIFF file, and converts the TIFF file into a PDF.

The company has received a requirement to be able to provide large print for those members who document their requirements for large print as a preference. I have tried many approaches such as changing fonts, point size, chrsiz, using CDEFNT (to point directly to 18pt size fonts), etc. But I can't get the characters to only increase to roughly a point size of 14-16 but no larger. I have checked the overrides, and they are not an issue. I posed the question on CODE400.com and the RPG400 mailing list but no one gave me a viable option. Any suggestions, links, or possible resources would be greatly appreciated. Thank you for even reading and considering my dilemma.

Reggie
jonboy49
Posts: 206
Joined: Wed Jul 28, 2021 8:18 pm

Re: I have a requirement to produce PDFs with large print and I am having issues, need help

Post by jonboy49 »

The obvious first question - assuming you have stated the current process correctly: Why are you creating a TIFF from a PDF merely to create a PDF again. Doesn't seem to make any sense.

Second: Do you know where in the process the "shrinkage" occurs? What are the font sizes in the original PDF? The TIFF ?

Third: Have you raised this as an issue with IBMN support?

Assuming all else fails, I would consider switching to generating these specific PDFs via an alternative method. We use the PHP library TCPDF to produce PDFs and it is a very simple process that could easily be initiated from your RPG. There are also similar libraries for Python, Java and other languages if those work better for you.
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: I have a requirement to produce PDFs with large print and I am having issues, need help

Post by Scott Klement »

I've used PDFLIB -- they make it for all platforms, including IBM i, and it works very nicely. They provide documentation of how to make PDFs natively from ILE languages such as RPG. So instead of doing weird things like creating an AFP, converting it to TIFF and converting it to PDF, you can just create the PDF directly and have complete formatting options -- you can do anything that PDF supports this way.

If you decide to stick with the print to AFPDS method for some reason, I would try something like this:

Code: Select all

     A            PRCONTMSG     25          FONT(2304 (*POINTSIZE 20))
     A                                      POSITION(8.930 2.500)
This approach to controlling the font size works for me. I have never gotten useful results from CHRSIZ or CDEFNT. Using this approach, you can use OVRPRTF to override to a *PDF document, no need for playing games with TIFFs or software to convert TIFF to PDF.

Problem with this approach is that there are very few fonts available with the FONT keyword that I've found. The ones that exist work fine, though.

By contrast using something like PDFLIB gives you nearly unlimited options for fonts, line drawing, and all the other features of PDF. Using the libraries for other languages (Java, Python, PHP, Node, etc) would also work fine, with the caveat that you have to be able to code in those languages.
peder udesen
Posts: 15
Joined: Thu Jul 29, 2021 8:00 am

Re: I have a requirement to produce PDFs with large print and I am having issues, need help

Post by peder udesen »

Another option to generate PDFs would be to use InterForm

https://interform400.com/
bigbeargc
Posts: 2
Joined: Wed Mar 06, 2024 8:24 pm

Re: I have a requirement to produce PDFs with large print and I am having issues, need help

Post by bigbeargc »

Thanks all, for the replies...
Post Reply