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
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.
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
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 %%%%%%%
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.