When you need to repair damaged PDF and then delete unwanted pages from it, please have a free trial of software VeryPDF PDF Toolbox Command Line Converter. By this software and this function, you can reorder pages of PDF files in a batch even if there are some damaged PDF files, the conversion also can be done smoothly. This function is necessary when handling PDF files automatically, as when processing damaged PDF, some applications will stop or be delayed for a long time. In the following part, I will show you how to fulfill this function.
Step 1. Download PDF Toolbox Converter
- There are three versions of this software: Mac, Linux and Windows. Please download the right version according to your computer system. Once downloading finishes, there will be an zip file. Please extract it to some folder then you can check the elements in it.
- There are three sub folders in extracted folder. Please find executable file in bin folder, find test bat files in test folder and find help document in doc folder.
Step 2. Repair Damaged PDF
Usage:pdftoolbox <input files> [options] <-outfile output >
- Normally speaking, damaged PDF behave abnormal opening. When you try to open it, there will be error message reminding to download something or saying PDF has been damaged. Also, sometimes damaged PDF can not be converted or edited by others applications.
- When repair damaged PDF, please refer to the following command line templates.
Repair PDF's corrupted XREF table and stream lengths:
pdftoolbox broken.pdf -outfile fixed.pdf
There is no special parameter as this software will repair damaged PDF file automatically. When you need to and deleted pages, this steps can be saved as you can directly call this application to from PDF. When you only need to , please refer to the above command line.
Step 3. Delete pages from PDF
- When you need to , please refer to the following command line template.
pdftoolbox sample_testcmd.pdf -merge 1-9 21-end -outfile "_delete_pages(10-20)_out.pdf"
Please input full path of this application then call input PDF file, then specify the pages you need leading by parameter –merge, last input the full file path of output PDF file leading by parameter –outfile. By this way, some pages will be deleted. When delete pages from damaged PDF file, this command is also available.
By this software, you can also merge files and set password to protect processed PDF files and so on so forth. Please check more functions on software website. During the using, if you have any question, please contact us as soon as possible.