I'm having some issues while using TXT2PDF installed on our mainframe. I run the tool thru the JCL by specifying flat files for Configuration file, Input Date, Output Binary PDF etc.
I'm able to convert the text placed in DD:REPORT to a binary PDF without any issues when the input data comes in 1 page in the final PDF. But when the input data is large & the converted PDF is more than 1 page, the formatting defined for the first page(in DD:CONFIG) is used on the second page too(for eg, images loaded in first page get displayed in second page too). This spoils the whole PDF as I want to have separate formatting for the second page of the PDF. Since I'm creating the REPORT file thru a batch hence it has data for various scenarios. Hence in some case the output record is small in some case it is large.
So can anyone help with my below question, I'll really appreciate the help as i've been searching internet for last several days in order to get some documentation or good examples.
Question 1) Thru the configuration file I'm able to control the formatting of the text on first page. But how do I make sure the formatting applies to single page.
Question 2) How do I apply different formatting on the second page. Can I build some logic based on the row count ?
Question 3) Can I control what comes in the first or second page ? Right now I guess the program itself moves the data to a new page based on the input data. In case I want to break at some text & move all the rest to a new page(even when there is space in first page).
Actually the TXT2PDF on mainframe is using REXX & hence I decide to raise the question in this section. Actually I was trying to find some other category more relevant to TXT2PDF but was not able to find any better.
Can you pls let me know what will be the category/forum for "Vendor support for TXT2PDF". I too want the question to be raised in the right place as I desperately need help on this. Is there a way thru which I can then move this question to that forum instead of creating a new thread ?
txt2pdf is quite a generic name for a text to PDF converter
there are many implementations around for many environments and friends
there are a couple of implementations written in rexx,
one of them including the docs is at
but without knowing what the TS is really using it is difficult to reply properly
The implementation I'm using in on the mainframe. It is for OS/390 & z/OS & is a standard TSO command utility. The version is written in REXX. I'm invoking TXT2PDF thur a JCL. The JCL pick the necessary information from flat files.
There is a separate flat file on mainframe for each of the below:
a) Configuration file(XXX.TEST.CONFIG). This file holds the output PDF formatting. I've used commands like IMAGE, DRAW, TEXT, FONT etc.
b) Input text to be converted(XXX.TEST.DATA). This file holds the text to be converted into PDF.
c) Output Binary PDF (XXX.TEST.PDF). This file is the output PDF in binary format.
JCL that is used to run TXT2PDF:
//XXXXXXXX JOB (XXXXX,XXX,,,,XXX,,,0),'XXX',CLASS=C,
//* CREATE A PDF FROM TEXT ADD IMAGE
/*NOTIFY XXXXXXX *** ADDED BY SUBMIT EXIT ***
//SCRATCH EXEC PGM=IEFBR14
//DD1 DD DSN=XXX.TEST.PDF,DISP=(MOD,DELETE,DELETE)
//DD2 DD DSN=XXX.TEST.B64,DISP=(MOD,DELETE,DELETE)
//* ALLOCATE DATASETS
//REALLOC EXEC PGM=IEFBR14,COND=(8,LE)
//DD1 DD DSN=XXX.TEST.PDF,DISP=(NEW,CATLG),
//DD2 DD DSN=XXX.TEST.B64,DISP=(NEW,CATLG),
//* CREATE A PDF FROM TEXT ADD IMAGE USING REXX
//TXT2PDF EXEC PGM=IKJEFT01,PARM=('TXT2PDF CONFIG DD:CONFIG'),
//STEPLIB DD DSN=XXX.XXX,DISP=SHR
//SYSEXEC DD DSN=XXX.XXX,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//REPORT DD DSN=XXX.TEST.DATA,DISP=SHR
//OUTPDF DD DSN=XXX.TEST.PDF,DISP=OLD
//CONFIG DD DSN=XXX.TEST.CONFIG,DISP=SHR
//IMAGE DD DSN=XXX.JPG,DISP=SHR
//* ENCODE PDF USING BASE64 ASSEMBLER
Once the above JCL is run, the text in flat file is converted to PDF against the configuraton file. My problem arises when this input text is large & hence take more than 1 page in converted PDF.
I hope this gives some information on my installtion/usage.
My bad, It is really difficult to express the problem in words I guess. Also I'm not very good in the mainframe terminologies. Sorry abt that.
I've been reading the above document since last 5 days & truely speaking its only with its help I've been able to atleast to create a PDF. I was able to format, change font, add images, make things bold while converting the input text to PDF. As long as the input text is managable on 1 page everything is fine.
But this document doesn't tell how to create a configuration file for a conversion that says will be 5 pages of PDF. The configuration files explained in this document is not for a PDF that is having more than 1 page. I even studied some configuration files @ "www.homerow.net/rexx/txt2pdf/" which helped me a lot but they to don't span across pages.
I don't know but if I attach my test conversions files(Input text, Output PDF, Configuration file) that I created by hit & trial here, would it be any help ?
Thanks for the advice. Finally whats concluded is that the TXT2PDF version we're using doesn't support different formatting for different page. The formatting configured will be used across all the pages.