Access Modern Web Browser Control – Splitting PDFs

As promised in my previous post regarding merging PDFs together using the new Access Modern Web Browser control:

This post is about splitting/extracting a set of pages from a PDF.
 

The Basic Concept

Thanks to the new Modern Web Browser being able to support JavaScript Promise, Canvas, …, I was able to finalize some work on the matter that I had started several years ago.

The interface is very simple:

Access PDF Splitwhere you select the file from which to extract pages from, specify the start and end pages to extract, provide a file name to give the generated PDF file and a button to make it all happen.

Just like with the Merge utility, the beauty here is it is all local and requires no software, dlls, ActiveX be installed or used to make it happen.

Furthermore, since I didn’t embed the HTML (like I’ve done for other solutions) in the database itself, you can even simply open the html file in your browser and use it there!

And yes, it is even possible to fully automate the process. So you could pull paths/files from Access and perform a merge without any user intervention.
 

The PDF Library

For the purposes of today’s article, just like the previous article, I will be using pdf-lib to perform the manipulations of the PDF document(s).  That said, there are a number of alternatives and you can just as equally use any of those if you wish!
 

Demo Database

Feel free to download a 100% unlocked copy of a sample database I have put together to illustrate some of what is discussed above by using the link provided below:

Download “PDF Split” PDFSplit.zip – Downloaded 6214 times – 663.27 KB  

Notice About Content/Downloads/Demos

Disclaimer/Notes:

If you do not have Microsoft Access, simply download and install the freely available runtime version (this permits running MS Access databases, but not modifying their design):

Microsoft Access 2010 Runtime
Microsoft Access 2013 Runtime
Microsoft Access 2016 Runtime
Microsoft 365 Access Runtime

All code samples, download samples, links, ... on this site are provided 'AS IS'.

In no event will Devhut.net or CARDA Consultants Inc. be liable to the client/end-user or any third party for any damages, including any lost profits, lost savings or other incidental, consequential or special damages arising out of the operation of or inability to operate the software which CARDA Consultants Inc. has provided, even if CARDA Consultants Inc. has been advised of the possibility of such damages.

 

Additional Resources