Created
January 16, 2018 15:59
-
-
Save chrdek/1616130c587b2924878627b42d4f4d0b to your computer and use it in GitHub Desktop.
PDF page slicer (by page number) using convert from imagemagick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Use this file to extract a specific page from a pdf.. | |
cls | |
@echo off | |
@echo. | |
REM Default pdf files path.. | |
SET pdfpath=%USERPROFILE%\Documents\mypdfs\ | |
SET /P pagenum="Enter the pdf page you need here:" | |
SET /A "page=%pagenum%-1" | |
SET /P filename="Enter the pdf file name here:" | |
@echo. | |
convert -density 150 %pdfpath%%filename%.pdf[%page%] %pdfpath%pdfpage-%pagenum%.pdf | |
@echo on | |
@echo ...DONE! Check extracted file at %pdfpath%pdfpage-%pagenum%.pdf | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment