I'm testing PDFium via your demo program. I load a 12 page PDF file to test the Delete Page button and Move Page to End buttons.
If the first page of the file is displayed, the Delete button generates a List index out of bounds error and the error appears over and over again. This is true for both buttons. Also both buttons appear to work correctly with any page except the first page.
For DeletePages, I have confirmed that the first page is PageIndex = 0 and I'm guessing that when it is deleted, that yields a PageIndex of -1. I hoped to overcome this by first moving the page, but I tried several versions of the MovePages and still got the error.
J.R. |