10-22-2015 1:49 PM
Hello,
I'm working on an ABAP program that gets a PDF file as a table of type TLINE to make some treatment on it.
Our requirement is to count the number of pages of the PDF file (basically using the TLINE table)
I searched a lot in the community, but nothing found !
Please give me any suggestions to solve this problem.
Thanks in advance.
10-22-2015 6:44 PM
If its an OTF format you can count the number of "EP"s in the OTF data. EP is the representation of end of page.
Thanks
Thrinath
10-22-2015 6:44 PM
If its an OTF format you can count the number of "EP"s in the OTF data. EP is the representation of end of page.
Thanks
Thrinath
10-23-2015 9:57 AM
Is there a function module to count number of EPs in the OTF data ?
10-23-2015 10:52 AM
Hi,
can't you just use the page counter of the spool request? An OTF job should have as many EP OTF commands as the page count of the spool request itself says...
The page count of a spool request is stored in table field TSP01-RQAPPRULE.
Regards,
Alex
10-23-2015 10:15 AM
10-23-2015 11:00 AM
Hi,
If you open any PDF in notepad/textpad/notepad++ you should see a line starts with "/Count" which actually gives you the no of pages for pdf. Not sure how you are generating the PDF, but if you read the PDF in ASCII mode and do a search on "/Count" you should get the no of pages after a space after the string "/Count". Please see the screenshot below(Highlighted in yellow). This may be one of the option.
R