Got QuickPDF working from the command window:
ox = CREATEOBJECT("DebenuPDFLibraryAX1613.PDFLibrary") WAIT WINDOW ox.UnlockKey('mykey') ox.LoadFromFile(GETFILE(),'') ox.ExtractFilePages('E:\dev\somerset\downloads\594227.pdf','','C:\CRAP\test1.pdf',"1,11-12")
And that's it....tell it the Source.PDF, Target.PDF, and pages you want to extract. Done.
I ran the GhostScript example Ricardo provided and for some reason, it kept getting a file access denied on one of the pages it generated when it was spitting them out one by one in the leadup to the final pdf. Odd.
On 8/7/2019 10:12 AM, Eric Selje wrote:
I'm sorry I couldn't dig up any sample code to share but the documentation for QuickPDF is pretty good and has a lot. There's nothing I wanted to do with PDFs that it couldn't handle. Creating/Editing/Merging/Manipulating...all very good.
I'm desperately trying to wrap things up before I take a week off here. Sorry!
Eric
On Tue, Aug 6, 2019 at 1:32 PM MB Software Solutions, LLC < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
Thanks for the lead, Eric. Got any sample source code to share?
On 8/6/2019 10:02 AM, Eric Selje wrote:
I use (and really like) QuickPDF ( https://www.debenu.com/products/development/debenu-pdf-library/).
Eric
On Fri, Aug 2, 2019 at 11:39 AM Frank Cazabon frank.cazabon@gmail.com wrote:
I've never merged or split PDFs with it but I've used it to fill in a PDF form. Basically I create a script to run the pdftk command, store it in a batch file and execute the batch file
STRTOFILE(m.lcFDFFile, m.lcFolder + "source.fdf") m.lcCommand = [pdftk "] + m.lcBlankForm + [" fill_form "] +m.lcFolder + [source.fdf" output "] + m.lcFilledForm +[" flatten
drop_xfa]
* store the command in a batch file due to the 240 character limitfor run commands m.lcBatchFile = m.lcFolder + "fillpdf.bat" STRTOFILE(m.lcCommand, m.lcBatchFile)
*!* maybe use shellexecute RUN "&lcBatchFile"
IF FILE(m.lcFilledForm) m.lcFileName = JUSTFNAME(m.lcFilledForm) IF MESSAGEBOX('The file ' + m.lcFileName + CHR(13) + 'wassuccessfully created.' + CHR(13) +; 'Would you like to open it now?',36,'PDF Merge Successful') = 6 X8ShellExecute(m.lcFilledForm) ENDIF ELSE MESSAGEBOX("The system encountered a problem creating the PDF.",64,"Problem Encountered") ENDIF
Frank.
Frank Cazabon
On 02/08/2019 11:40 AM, MB Software Solutions, LLC wrote:
That looks great, Frank. Got any source code to share with me?!???
On 8/2/2019 8:32 AM, Frank Cazabon wrote:
This is the PDF Toolkit I have used:
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
which allows you to merge and split (and more) PDFs
Frank.
Frank Cazabon
On 02/08/2019 08:02 AM, MB Software Solutions, LLC wrote: > Ideally, these would be the tables: > > MyComponents.dbf > > * iid int autoinc PK > * cLabel v(50) (e.g., INVOICE, FUEL RECEIPT, BILL OF LADING, etc.) > * tAdded t > > MyPDFs.dbf > > * iid int autoinc PK > * cFilename v(50) > * tAdded t > > MyPages.dbf > > * iid int autoinc PK > * iFileID int (backlink to MyPDFs.dbf) > * nStartPage int > * nEndPage int > * iLabelID (backlink to MyComponents.dbf) > > And then on demand, I could generate a new deliverable PDF > containing multiple components, selectable by the user ahead of time > to put it together. From the original post: "B, C, and E" -- all in > one PDF file. > > > On 8/1/2019 4:29 PM, Frank Cazabon wrote: >> PDF toolkit might let you split a PDF into separate PDFs. But it >> really sounds like you should keep the original PDFs as separate >> entities and deal with each component as you wish. >> >> On 1 August 2019 16:19:10 GMT-04:00, "MB Software Solutions, LLC" >> mbsoftwaresolutions@mbsoftwaresolutions.com wrote: >>> Customer has a single PDF ("document") with several pages in it >>> (let's >>> say 12 pages). The document is made up of several scanned files, >>> each >>> a >>> different file type or "component." >>> >>> Customer wants to extract certain pages from this single PDF into >>> later >>> >>> email to other parties. They cannot mail the entire document
because
>>> some content isn't intended for recipients (like invoices) but they >>> want >>> to be able to send other selected "component" parts and that file >>> attached to the email deliverable would be a SINGLE file. >>> >>> Example: >>> >>> MyPDF.PDF >>> >>> Page 1: Invoice ("A") >>> Page 2-3: Bill of lading ("B") >>> Page 4-6: Fuel slips ("C" >>> Page 7-10: Something else ("D") >>> Page 11-12: Yada yada yada ("E") >>> >>> >>> Eventually, components B, C, and E will be emailed to somebody. >>> >>> >>> Given this scenario, what do you recommend? >>> >>> tia, >>> --Mike >>> >>> >>> >>> --- >>> This email has been checked for viruses by Avast antivirus
software.
>>> https://www.avast.com/antivirus >>> >>>
[excessive quoting removed by server]