Read PDF Files, please.

Dears users.

Can someone help me understand and teach how can I read a PDF file that is on the same application server?
can not find help on this subject.
I would like to put a button on the Grid and open the pder file.

My best regards.

Cezar Moniz

If the PDF file is placed on the webserver, you just need to point a link or a button to the HTTP path, for example:


<a href="http://www.site.com/application/test.pdf">pdf file</a>

or in a grid application you can use using sc_link:


sc_link(column_name, "http://www.site.com/application/test.pdf", ,"a pdf file");

Use ViewersJS. I use it in some projects and worked like a charm
http://viewerjs.org/

The one by Mozilla is pretty good too…

pdfjs

I’ve actually embedded this in a scriptcase app so I didn’t reply on the user’s PDF renderers…

I tested viewerjs too…Seemed to work OK, but I ended up choosing pdfjs…Was a little bit faster, but the callbacks can through you for a loop sometimes… Especially on multiple page PDFs.

Let us know what you ended up using…I’m always interested in collaborating and learning since my space deals a lot with PDF files.

I use pdfjs as my primary embedded pdf viewer for my digital contracts module. it has its limitations but works for the purpose it was designed for.

if the requirement is for embedding non-pdf documents then viewerjs is the best choice.

Did you try viewerjs with pdf in binary field (I mean pdf in database) ?

My PDF’s are stored in the file system, but i store the filenames in database and the call the path to open the pdf.

To show the entire PDF from the database, then additional code is needed.
This is discussed in great detail at http://stackoverflow.com/questions/24535799/pdf-js-and-viewer-js-pass-a-stream-or-blob-to-the-viewer

Let me know if you are successfull.

to all friends who answered me and helped me.
I was able to solve the problem by putting together all the answers.

Thank you all.