People, I am not a developer but this thread kind of caught my eye.
I have no real interest in anything like this unless it is to help our dev staff with something or there is a dev need at some point.
I used ACS to look up the GENERATE_PDF function in SYSTOOLS mentioned by Bryan just to see what it looked like. Certainly interesting.
Then I googled "ibm i generate_pdf in systools code example" just to see what turned up.
And I got this (I filled in the parms with my own spooled file).
VALUES SYSTOOLS.GENERATE_PDF(
JOB_NAME => '077758/MISMMAYER/CALLIBM',
SPOOLED_FILE_NAME => 'QPJOBLOG',
SPOOLED_FILE_NUMBER => 1,
PATH_NAME => '/mmtest/listing1.pdf');
To make this work, I created '/mmtest' in the IFS.
listing1.pdf is created in '/mmtest' as you would expect when the SQL is run.
Then i used the "printer output" feature in ACS to open and review "listing1.pdf".
It looks exactly like the spooled file.
Would this help anyone? Don't know but thought I'd throw it out there in case anyone wants to figure
out how to use it in their processing.
Respectfully,
Michael Mayer
IBM i on Power System Admin
ERMCO-ECI
2225 Industrial Rd
Dyersburg, Tennessee 38024
Cell, Office and Text Messages: 518.641.8906
Email: michael.mayer@xxxxxxxxxxxxx
https://www.ermco-eci.com/
https://ermcopower.com/
IBM i Award Winning Blog Site:
https://ibmireference.blogspot.com/
Awarded IBM 2024/2025 Advocate, Contributor, Influencer and IBM i Ready Badges.
------------------------------------------------------------------------------------------------------
1. Re: SYSTOOLS.GENERATE_PDF (Bryan Dietz)
2. Re: SYSTOOLS.GENERATE_PDF (Brian Garland via MIDRANGE-L)
3. Re: SYSTOOLS.GENERATE_PDF (Brian Garland via MIDRANGE-L)
4. Re: SYSTOOLS.GENERATE_PDF (Brad Stone)
5. Re: SYSTOOLS.GENERATE_PDF (Justin Taylor)
6. Re: SYSTOOLS.GENERATE_PDF (cesco via MIDRANGE-L)
------------------------------------------------------------------------------------------------------
message: 1
date: Thu, 19 Jun 2025 07:45:05 -0500
from: Bryan Dietz <bdietz400@xxxxxxxxx>
subject: Re: SYSTOOLS.GENERATE_PDF
With that tool being in the library SYSTOOLS, you can use the SCHEMAS app in ACS to find it and retrieve its DDL.
in there you will see it uses CPYSPLF to create the PDF.
do you get the same results using CPYSPLF?
if there are any other options in CPYSPLF that make the PDF creation work you can "adjust" the GENERATE_PDF and make your own copy of the function.
Brian Garland via MIDRANGE-L wrote on 6/19/2025 6:47 AM:
I'm trying to use the SQL function GENERATE_PDF with an *AFPDS spooled
file and the resulting PDF is not accurate. I do have the
prerequisite option installed.
The character size is off on bolded characters (too large). It also
is truncating the right hand side of the document.
I've used CVTSPLPDF (part of MMAIL) and it creates a PDF with all the
correct formatting. However, we cannot use this in our product due to
the license.
Is this just a limitation of GENERATE_PDF?
Any other AFPDS to PDF options that are no/low cost whose license
allows embedding in a commercial product?
Brian
--
-- .
Bryan
------------------------------
message: 2
date: Thu, 19 Jun 2025 08:46:57 -0400
from: Brian Garland via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: Re: SYSTOOLS.GENERATE_PDF
I've used AFP2PDF in the past with success.
None of the links in that article work anymore and it seems to refer to the same code that is part of MMAIL (hpt & tifflib) so that license would not work for me.
Is there any reason you can't use OVRPRTF TOSTMF('/myfile.pdf')
WSCST(*PDF)?
This is for an ad hoc conversion after the fact. These spooled files are actually printed sometimes so we need to generate them and then allow later capture if desired.
--
This email and any files transmitted with it are confidential and intended solely for the use of the individual or company to whom they are addressed.
Do not disclose, distribute, or copy this email to others outside your company. If you have received this email in error, please notify the sender immediately and delete this email from your system.
------------------------------
message: 3
date: Thu, 19 Jun 2025 09:03:58 -0400
from: Brian Garland via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: Re: SYSTOOLS.GENERATE_PDF
I've used AFP2PDF in the past with success.
None of the links in that article work anymore and it seems to refer
to
the same code that is >>part of MMAIL (hpt & tifflib) so that license
would not work for me.
It looks like I confused LIBTIFF and TIFFLIB. Also, the final link "download all files" works. This one might be usable. I'll keep looking for other options too.
Brian
--
This email and any files transmitted with it are confidential and intended solely for the use of the individual or company to whom they are addressed.
Do not disclose, distribute, or copy this email to others outside your company. If you have received this email in error, please notify the sender immediately and delete this email from your system.
------------------------------
message: 4
date: Thu, 19 Jun 2025 08:11:24 -0500
from: Brad Stone <bvstone@xxxxxxxxx>
subject: Re: SYSTOOLS.GENERATE_PDF
Most likely the fonts used in the report are not installed and it's doing substitution.
There's also WSCST objects that may need to be used, if that's possible on the SQL command (*WSCST and *WSCSTLETTER).
MMail used AFPTOOL for its AFPDS conversion I believe. At least for a while.
On Thu, Jun 19, 2025 at 6:47?AM Brian Garland via MIDRANGE-L < midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
I'm trying to use the SQL function GENERATE_PDF with an *AFPDS spooled
file and the resulting PDF is not accurate. I do have the
prerequisite option installed.
The character size is off on bolded characters (too large). It also
is truncating the right hand side of the document.
I've used CVTSPLPDF (part of MMAIL) and it creates a PDF with all the
correct formatting. However, we cannot use this in our product due to
the license.
Is this just a limitation of GENERATE_PDF?
Any other AFPDS to PDF options that are no/low cost whose license
allows embedding in a commercial product?
Brian
--
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or company to whom they
are addressed.
Do not disclose, distribute, or copy this email to others outside your
company. If you have received this email in error, please notify the
sender immediately and delete this email from your system.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit:
https://list/
s.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&data=05%7C02%7Cmichae
l.mayer%40ermco-eci.com%7Ccdc196b4fb1b48321e4a08ddaf480dd9%7Cd2deeaf27
0e4425c91d7d99d784e89d6%7C0%7C0%7C638859446365869360%7CUnknown%7CTWFpb
GZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkF
OIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=bkm2EuwHuAyeX4u5P
xwlxqhyQutOBLAPwvdT7dwCJSs%3D&reserved=0
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.
------------------------------
message: 5
date: Thu, 19 Jun 2025 08:43:06 -0500
from: Justin Taylor <jtaylor.0ab@xxxxxxxxx>
subject: Re: SYSTOOLS.GENERATE_PDF
What about CPYSPLF?
On Thu, Jun 19, 2025 at 7:47?AM Brian Garland via MIDRANGE-L < midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
I've used AFP2PDF in the past with success.
None of the links in that article work anymore and it seems to refer
to the same code that is part of MMAIL (hpt & tifflib) so that license
would not work for me.
Is there any reason you can't use OVRPRTF TOSTMF('/myfile.pdf')
WSCST(*PDF)?
This is for an ad hoc conversion after the fact. These spooled files
are actually printed sometimes so we need to generate them and then
allow later capture if desired.
------------------------------
message: 6
date: Thu, 19 Jun 2025 15:43:22 +0000 (UTC)
from: cesco via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: Re: SYSTOOLS.GENERATE_PDF
stock included PSF and always worked pretty fine for me, but I never went too fancy with fonts keeping them pretty "standard", the limit is that it lacks PDF/A (push the request on the ibm feature req site!), but it is a pretty fast engine to generate PDF.
Try to use straight CPYSPLF if that changes.Or create a printer with WRKPSFCFG for full control (emulation and page size) and then you can even attach an exit program there for full routing , respooling, dispositions... even a DTAQ to signal when PDF is created to inform external things (publishing, archival etc.).
------------------------------
Subject: Digest Footer
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) digest list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
------------------------------
End of MIDRANGE-L Digest, Vol 24, Issue 595
*******************************************
As an Amazon Associate we earn from qualifying purchases.