OS/2, eCS & ArcaOS - Technical > Programming

DBE/PmPDF report titles

(1/2) > >>

Per E. Johannessen:
When printing a report in DBExpert to PMPDF, and PMPDF is set to create pdf's automatically, it creates a file like this;
20190920160910-InvoiceReport.PDF where InvoiceReport is the title of the report in DBE.

If the invoice number in this case is 12345, is there a method to automatically create a pdf named only 12345.pdf?
(Actually substitute the report title "InvoiceReport" with the invoice number from it's field in the report.)




roberto:
I have thought about this many times, but I always leave it for later. And today looking at it a bit,
I thought it can be made easier. List the pdfs sorted by dates, and rename it and that's it.

dir "d:\pdf\20190920*.pdf" /O:DN /F >"d:\pdf\xxxxxxx.txt"
rename a b

Per E. Johannessen:
If the name is not given when the report is printed to PMPDF it will always be yyyymmddhhmmss-InvoiceReport.pdf and this file name would have to renamed to 12345.pdf. Remember I use PMPDF's options set to "automatically create pdf" so in this case there is no way to see from the file name that it actually is invoice no. 12345.
Using PMPDF to automatically create pdf's from another application I have results in files named with this format;
yyyymmddhhmmss-Invoice_12345_Account_67890.pdf, so in this case renaming is an easy task.
However, I don't have the sources so I cannot see how it is taking the invoice number and account number from the record and uses them as parts of the file name.

xynixme:
Can the PDF file be parsed afterwards, with or without e.g. Xpdf's pdftotext.exe?

Per E. Johannessen:
Yes, the file can be parsed afterwards and pdftotxt.exe could be used. I do have another program using this approach for some other pdf files.

However, still I'd like to find out how to "automate" this task with DBE/PMPDF since it works fine with another program.

Navigation

[0] Message Index

[#] Next page

Go to full version