Greetings,
I'm trying to print some pages from a pdf document (special thanx to the iText library team) (i.e: 4,9 and 12).
I think I did all good but the printer prints the entire document (bypassing the PrintRequestAttribute object passed to the print() method).
When steppin' into the code, I got the right number of Attributes, and the Attributes map let me check if the PageRanges object is getting the right values: that is the case.
Boolean testPrint=false;
testPrint=Reglages.add(new PageRanges(4));
dpjCSSMBulletins.print(DocToPrint, Reglages);
testPrint=Reglages.remove(PageRanges.class);
testPrint=Reglages.add(new PageRanges(12));
dpjCSSMBulletins.print(DocToPrint, Reglages);
testPrint=Reglages.remove(PageRanges.class);
testPrint=Reglages.add(new PageRanges(9));
dpjCSSMBulletins.print(DocToPrint, Reglages);
Each time the add() and remove() returned "true", and I can see the changes in the debug window in the IDE.
I can't explain why when I'm looking at the printer status (using lpq on Linux) the document to be printed is full (250000 bytes) and when printing I got the first page instead of the fourth... I stopped right there and never went further.
The javadoc information says:
public PageRanges(int member)
Construct a new page ranges attribute containing a single integer. That is, only the one page is to be printed.
Is anybody knows if there is limitations or particular bugs using this class ?
Thanx in advance ^^