For example
1 - 4 would be a separate document
5 - 9 would be a separate document
10 - 12 would be a separate document
13 - 22 would be a separate document, etc
Each time files are processed the ranges could be different and would be read from a secondary data file. The files would be received as a match set 1234567890.pdf and 1234567890.xml. The pdf files are very large with around 1000 documents of various sizes within each pdf.
Not sure how to approach this using PPC 2019.1
My guess would be to use the alambic api?
var myPDF = Watch.GetPDFEditObject();
myPDF.Open(Watch.GetJobFileName(),false);
myPDF.Pages().ExtractTo('C:\\Tests\\Pages1-4.pdf',0,4,true);
myPDF.Pages().ExtractTo('C:\\Tests\\Pages5-9.pdf',4,5,true);
myPDF.Pages().ExtractTo('C:\\Tests\\Pages10-12.pdf',9,3,true);
myPDF.Pages().ExtractTo('C:\\Tests\\Pages13-22.pdf',12,10,true);
myPDF.Close();
Would need to extract within a loop so something like this?
var startonpage = [0, 4, 9];
var numofpages = [4, 5, 10];
var pdfname = ['1-4Pagers.pdf', '5-9Pagers.pdf', '10-19Pagers.pdf'];
var doccount = 3;
var i = 0;
var myPDF = Watch.GetPDFEditObject();
myPDF.Open(Watch.GetJobFileName(),false);
do {
myPDF.Pages().ExtractTo('C:\\Tests\\' + pdfname[i],startonpage[i],numofpages[i],true);
i++;
}
while (i < doccount);
myPDF.Close();