Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

split pdf file

Status
Not open for further replies.

elly00

Technical User
Jun 30, 2011
69
IT
Hi

I would like to ask you if it's possible using vbs to split a pdf document
For example if my pdf have 3 pages I would like to have in a specif folder 1.pdf 2.pdf 3.pdf basically one page should generate a document

thanks!!!!
 
Not by itself, no. You need a tool that can split PDF's and that supports scriptable COM automation (e.g the full Adobe Acrobat, but not Acrobat Reader). Word might be a possibility as your automatable tool, as it has the ability to open PDFs (but converts them to Word documents that may not look exactly like the original), and then - if on Windows 10 - you can print individual pages out as PDFs
 
Once upon a time I would have recommended PDFtk - the PDF toolkit (which I still use with AutoHotkey to script merging and splitting PDFs). However, I see there are recent reported problems with it.

An alternative, also scriptable, is cpdf - Coherent PDF - which I'm now going to be testing as a replacement for PDFtk.

Hope this helps...
 
Hi

SOLVED!!!!THANKS

***

I've set a bat to lunch cpdf but something strange happens
In details...I have a pdf of about 50 pages
If I lunch the split command directly in windows prompt all works correctly and I obtain my news 50 pdf files..If I luch the same command form a file.bat it split only the first 9 pages and then is stops..
The command used is:
C:\Users\cpdf\cpdf-binaries-master\Windows\cpdf -split C:\Users\cpdf\testsplit.pdf -chunk 1 -o C:\Users\cpdf\out%%%.pdf

Thanks
 
The problem is that in a batch file %%% is interpreted as %. So out%%% becomes out%, which means that cpdf will only generate out1.pdf to out9.pdf. Change it to %%%%%%%
 
I usually split pdf files with online pdf editors. I think it is much more comfortable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top