PrPages - Determines the coloured pdf-pages from the commandline! ================================================================= This is the test-version. If you think this modul is useful for you and if you want to use it in a regularely way or if you want to publish it together with your own applications then you have to buy it. Try before you buy ;-) ================================================================= How to call ... ... on the commandline Syntax 1: prpages drive:\path\file.pdf S 00 drive:\path\fileS00.csv Syntax 2: prpages drive:\path\file.pdf E 00 drive:\path\fileE00.csv Syntax 3: prpages drive:\path\file.pdf E 20 drive:\path\fileE20.csv 128 Syntax 4: prpages drive:\path\ S 12 drive:\path\fileS12.csv Syntax 5: prpages drive:\path\ E 00 drive:\path\fileE00.csv Syntax 6: prpages drive:\path\ E 00 drive:\path\fileE00.csv 64 [At the end of this guide you'll find samples how to use PrPages in your own applications] The resulting csv-file could look like this ... An 8-pages-document (option E was used) ... c:\temp\PrPages\samp1.pdf;1;792;612;color; c:\temp\PrPages\samp1.pdf;2;792;612;bw/gray; c:\temp\PrPages\samp1.pdf;3;792;612;bw/gray; c:\temp\PrPages\samp1.pdf;4;792;612;bw/gray; c:\temp\PrPages\samp1.pdf;5;612;792;bw/gray; c:\temp\PrPages\samp1.pdf;6;612;792;bw/gray; c:\temp\PrPages\samp1.pdf;7;612;792;bw/gray; c:\temp\PrPages\samp1.pdf;8;792;612;color; [ file with path; pagenumber; pageheight; pagewidth; color or bw/gray ] An 70-pages-document (option S was used) ... c:\temp\PrPages\main.pdf;70;842;595;4;66 [ file with path; pagecount; height of first page; width of first page; coloured pagecount; bw/gray-pagecount ] The options ... Option S means only the total number of all coloured and non-coloured pages ...so you will get one csv-line for each pdf-document. The content of the resulting csv-file look like this (Option S): drive/path/filename ; pagecount ; first pageheight ; first pagewidth ; color-pages ; bw/gray-pages Option E means the properties from each page of a pdf-document ...so you will get one csv-line for each page of the analyzed pdf-document The content of the resulting csv-file using option E: drive/path/filename ; pagenumber ; pageheight ; pagewidth ; color or bw/gray You can use a single pdf or a complete path to analyze all pdf-documents Next to option S/E there is a 2-digits numeric value. It stands for the so called "gray value tolerance" or "gray balance" it could be an option in some printer drivers mainly for bigger printing machines to set a more smooth demarcation about what are already coloured or still gray values. Next to the "gray value tolerance" there's the output path/file in csv-format. There is an optional last numeric parameter having to do with pixel scaling/resolution at the end telling PrPages about the check-sensibility. If the value is missing then 128 will be used automatically. If you want to change it, try values from 32, 64, 128, 192 up to 256 (means less performance). The parameters fname = The path (with pdf-files) or a single pdf-file which shall be checked ... soe = S(um) or E(ach) page (having influence on the csv-output) gv = Valid values are from 0 up to 99. If you don't want it then a 0 is necessary csv = Drive, path and file.csv pix = The resolution making the checks more accurate (value 128 will be used automatically. 32, 64, 96, 128, 192, 256, ... are possible, too. The errors 9001 the source-parameter is missing 9002 too much parameters 9003 the target (.csv) parameter is missing/wrong 9004 the target path is not valid 9005 parameter for resolution is not numeric 9052 parameter for "gray value tolerance" is not numeric 9006 parameters are missing 9007 no pdf-files in the path 9010 file could not be processed 9011 there is a user password on the file 9013 structure problems with the file 9014 dictionary problems with the file How to use PrPages.exe inside your own programs/applications/vba-routines ... inside vb-/vba-code: retvalue = Shell("drive:\path\PrPages.exe" "drive:\path\file.pdf" "S" "00" "drive:\path\fileS00.csv", 0) --> last value 0 means to hide the window. Value 1 means normal window. ... inside Delphi-Code: ShellExecute(0, 'open', PChar('c:\temp\PrPages.exe'), pchar('c:\temp\sample.pdf E 15 c:\temp\sampleE15.csv'), nil, SW_SHOWNORMAL); or ... ShellExecute(0, nil, PChar('c:\temp\PrPages.exe'), pchar('c:\temp\sample.pdf E 15 c:\temp\sampleE15.csv'), nil, SW_SHOWNORMAL); ... inside C++-Code: RunApplication("PrPages.exe", "c:\temp\sample.pdf E 15 c:\temp\sampleE15.csv"); or (with AnsiStrings) ... AnsiString FileName = "c:\\temp\\PrPages.exe"; RunApplication(FileName.c_str(), 0); ... inside C#-Code: Process proc = new Process(); proc.StartInfo.FileName = "cmd.exe"; proc.StartInfo.Arguments = @"/C " "C:\temp\PrPages.exe" " c:\temp\sample.pdf E 15 c:\temp\sampleE15.csv " " "; proc.Start(); ... inside .NET-Code: string programmname = @"C:\temp\PrPages.exe"; string parameter = @"c:\temp\sample.pdf E 15 c:\temp\sampleE15.csv"; System.Diagnostics.Process.Start(programmname, parameter); Keep in mind: Wit @ one backslash is okay - without it looks like this "c:\\temp...". (c)2012...2019 by Ingo Schmoekel - www.PDF-Analyzer.com Ingo Schmoekel - Software-Dev.& Distribution - Zedernstr. 30a D-28832 Achim GERMANY www.IS-Soft.de www.PDF-Analyzer.com Please read my blog at: http://pdfcomments.blogspot.com/