- 1
How do u create a code to read a pdf file and displays it on the web page in readable form from either a folder or database?
Like am creating an online library where students should go and search and read from online
1 Odpowiedź
+ 1
Most browsers will make PDF documents readable if your HTTP server responds with a mime type like "application/pdf" and your raw PDF binary data is in the HTTP response body.
If you ever have to scrape text out of a PDF, that can get a little messy but isn't terribly difficult. If you want search keywords autogenerated by converting the PDF to text, it is easy to convert most cases with easily found commands and libraries but a PDF can be a mess of data that doesn't convert to text in any useful way. Consider a PDF made by a scanner or optical character recognition. Images and OCR doesn't lead to perfectly spelled words strung together like plain text. The PDF generated from a scanner or OCR is organized more like a newspaper clipped collage.