Shell command fails while merging PDF files. Can I get an error message out of the process?
Posted on 2016-11-08
Working in Access, I have a process which saves about 200 individual PDF reports to file and merges them together into a 275+ page document (using FTPtk), or at least it should. Unfortunately, it is hanging up about 90 pages into the process, and the main document it is merging pages into is getting corrupted. Unfortunately, the shell command I'm using either is not transferring control back to Access, or is not providing an error message, so I have no way of testing for this problem, so the program just hangs up.
The Shell command I'm using looks like:
strMerge = "pdftk " & strPath & strMasterPDF & " " & strPDFReport & " cat output " & strPath & strMasterTemp
This process merges the PDF report into the main PDF document (strMasterPDF) and names in a new file (strMasterTemp).
I then rename the temp file back to the main document to process the next file in the loop. Is there another way, from within Access to shell out to this process and actually get some feedback that the process is complete? or that it failed?
I don't know whether the process is failing because I don't provide enough time for the merge to complete or what.