Some PDFs contain bad pages. e.g. 3 page document with valid pages 1
and 3, but page 2 points at a non-existent object. In which case,
FPDF_LoadPage() would return NULL for page 2.
On Tue, Jun 7, 2022 at 11:04 AM Markoce <
abacefabm...@gmail.com> wrote:
>
> We recently ran into a case where calling FPDF_LoadPage returned NULL. What are some ways we can interpret this? Also, is it valid to FPDF_GetLastError when that function returns NULL? Many functions explicitly say to call FPDF_GetLastError if there was an issue, and this one does not, so I am assuming the error code would me meaningless if we did?
>
> We are sure we gave a page index that is in bounds as it is a 1 page PDF and we passed in 0.. We also already checked if the Document object being passed in is NULL.
>
> --
> You received this message because you are subscribed to the Google Groups "pdfium" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
pdfium+un...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/pdfium/2e55524e-f393-4571-8b0f-2db645ae4c0an%40googlegroups.com.