Hello,
We are using Rasterizer in our .Net Core API to generate thumbnail for a given PDF page. We have all varieties of documents including signed PDFs, large PDFs etc and these are stored in SAN path. We are creating an instance of InputPdf and then passing it to PdfRasterizer. After that, we are getting total number of pages with the below code. Occassionally, the total number of pages is coming as zero even though we have the file on the SAN path. After few minutes, for the same PDF file, we get correct number of pages. This is happenning multiple times on a single day on multiple servers. We are not getting document load exceptions while loading pdf using InputPdf. So, the pdf exists in the path. While the code is returning zero pages for one PDF file, we are getting proper results for other PDF files at the same time on the same server.
Can you please help me to find out the possible reasons for this behavior?
using (var inputPdf = new InputPdf(pdfPath))
{
using (var pdfDoc = new PdfRasterizer(inputPdf))
{
int totalPages = inputPdf.Pages.Count();
}
}
Thanks