|
| ||||||||||
| Tags: break, command line, pdf, software, windows |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Software to break a PDF file from the command line
Example, a PDF file containing 5 pages, with bookmark PAGE1, PAGE2, PAGE3, PAGE4 and PAGE5. We would like the software via the command line (ie without interface) can generate PAGE1.pdf, PAGE2.pdf ... Also, is it possible to highlight the index in a PDF to a text file? |
|
#2
| ||||
| ||||
| Re: Software to break a PDF file from the command line
Nitro PDF Professional is the perfect PDF product for business and enterprise — combining the power to create, edit, organize, secure and convert PDF with an extremely competitive price. This software lets anyone easily create, combine, edit, secure, convert and collaborate with PDF files. Nitro PDF Professional's key features:
|
|
#3
| ||||
| ||||
| Re: Software to break a PDF file from the command line
Here is the code: Code: public static void parsePage1(String[][] tab)
throws IOException
{
Runtime myRuntime = Runtime.getRuntime();
Process myProcess;
File file = new File("C:\\" );
for(int i=0; i<tab.length; i++)
{
file = new File("SOURCE_PATH\\"+tab[i][0]+"_"+tab[i][1]+"_"+tab[i][2]+"_"+tab[i][3]+".pdf" );
myProcess = myRuntime.exec("java -jar \"C:\\Program Files\\pdfsam\\lib\\pdfsam-console-0.7.3.jar\" -f \""+file.getPath()+"\" -o DESTINATION_PATH -s BURST -compressed split" );
try
{
myProcess.waitFor();
}
catch (InterruptedException ie)
{
ie.printStackTrace();
}
file.delete();
file = new File("DESTINATION_PATH\\1_"+tab[i][0]+"_"+tab[i][1]+"_"+tab[i][2]+"_"+tab[i][3]+".pdf" );
file.renameTo(new File("DESTINATION_PATH\\"+tab[i][0]+"_"+tab[i][1]+"_"+tab[i][2]+"_"+tab[i][3]+".pdf" ));
file = new File("DESTINATION_PATH\\2_"+tab[i][0]+"_"+tab[i][1]+"_"+tab[i][2]+"_"+tab[i][3]+".pdf" );
file.delete();
myProcess.destroy();
}
} |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Software to break a PDF file from the command line" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can i get the command line parameters for any application/software? | benno777 | Software Development | 1 | 03-07-2012 11:48 AM |
| How to Turn File Sharing On/Off via command line? | Obessed | Networking & Security | 3 | 10-11-2010 01:40 AM |
| Add a File Printer port from Command Line | mandalorian2 | Software Development | 0 | 29-04-2008 08:52 PM |
| .inf file will not run from the command line | CHRITOPHER | Windows XP Support | 2 | 31-08-2007 01:53 AM |
| Group Policy software install with command line switch | James Lavery | Windows Server Help | 4 | 08-10-2004 06:04 PM |