Re: [iText-questions] selectpages for non existing page

2013-11-20 Thread iText Info
beppecosta schreef op 20/11/2013 10:22:
 If I call reader.selectpages ('1, 5, 26') for a pdf that has only 20 pages, I
 get page 1, 5 and 20.
 Is this correct ?

It may be how iText interprets wrong data.
I assumes that when you ask for a page that is higher than the page 
count, you actually meant to ask for the last page.

--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] selectpages for non existing page

2013-11-20 Thread beppecosta
/ That looks like a case of garbage in, garbage out./

I agree but we receive some pdf from our dealer that SHOULD have 26 pages
(the last page contains the signature) and we must extract the first, fifth
and 28th. page. But possibly there was an error and it was built without
some pages.

The selectpages() method - if the pdf does not contains the 26th page
requested - does not care and returns the last page. If we say that this is
by design, I will run a check of total pages before the extract, but an
exception that says that the input is invalid could be appropriate as well.

Regards. Giuseppe.






--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/selectpages-for-non-existing-page-tp4659480p4659484.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php