Not able to read whole page of PDF

We are trying to read first 10 pages from a pdf and save that 10 pages only . But we are not able to get whole count of 10. After 4 pages it is not going further to read 5th page.

Please find the sample code for doing the same in the attachment.
Please suggest what can be the issue .
SampleCode.zip (397 Bytes)

@52000537

Would you please try to use API with a valid license as due to trial version restriction, you cannot process more than 4 elements of a collection inside Document e.g. Pages, Annotations, Paragraphs, etc. In case you do not have a valid license, please consider applying a 30-days free temporary license to evaluate the API without any limitation. In case you still face any issue please let us know by sharing your sample PDF document.