Free Support Forum -

Couldn't use FileStream for pdfExtractor on Read only PDF


I’m using pdfExtractor to know whether a pdf document have images or not using pdfExtractor.ExtractaImage and then pdfExtractor.HasNextImage.

That worked fine for many files except a file which says “The file you have opened
complies with the PDF/A standard and has been opened read-only to prevent
when I opened it in Adobe pdf viewer. It throws “The process cannot access the file ‘Location\Test1.pdf’ because it is being used by another process” exception. But it can extract the metadata from that same file. Other files in the same folder works fine.

What can be the issue with this file? Is there a way to use pdfExtractor on this read-only pdfs?

Let me know.



Got it resolved.

Used File.Open with read only fileacess and fileshare as none.

Hi John,

Can you please share the source PDF document so that we can test the scenario at our end. We are sorry for this inconvenience.