Open downloaded file in browser pdf format - ruby

I am using paperclip to upload docx doc and pdf files to my railsapp, is there any way I can view this uploaded files in the browser itself in pdf format, without downloading it ?

Try pdf.js.
Firefox recently started using it as viewer for PDF files, but you can integrate it in your app. But you still need to 'download' it, that is, load into the browser.

Related

TCPDF display blank page suddenly in Laravel

I used TCPDF in Laravel project for output pdf that was couple weeks ago. It worked perfect. I copy the project folder for backup. Today I tried to output pdf. Error 503 shows up. so I used backup data but it also problem browser ask me to open pdf or save pdf, when I open it it's all white blank pdf page. I'm guessing Is it my CDN problem?
I need pdf output function. Could you teach me what is cause please? and also if you have recommendation. I would like to know other PDF output library.

font issue in pdf merging

I'm using dompdf for generating pdf in one of my php application. It's working fine. Now client want to merge pdf using PDFLib. But getting font issue. Below is the scenario:-
1) sample.pdf (this pdf generated by dompdf)
2) demo1.pdf (normal pdf downloaded from internet)
3) demo2.pdf (normal pdf downloaded from internet)
Now client is trying to merge all these 3 pdfs with pdflib. demo1.pdf and demo2.pdf is looking good in merged pdf but sample.pdf is giving an font issue. content of sample.pdf in merged pdf are not understandable.
Any idea how to recover from this situation?

Attach a already created pdf with a new pdf generated with DOM PDF in codeigniter

I am creating a PDF file using DOM pdf and codeigniter as my framework. In that PDF i want to attach already saved PDF's on my server at the end of newly created PDF file. Is that possible with DOM PDF to create a PDF like that.
Presently DOM PDF will not support for merging two pdf files
You can do with PDFTK.
Or
Refer this :
Merge multiple PDF files into one in PHP

Open or Save HTML Document with their associated media files

I am working on a Live HTML5 Editor and also published it on windows 8.1 store as BETA version check below link :
Propan HTML5 Live Editor
Here i have a problem of saving media files that are include in html document, i know that for security reasons windows not allow direct path for a file so i fetched its content and display on x-webview or an iframe for live preview .But how can i open or fetch attached media files with that file and same for saving a HTML document with media files ??
If you have any suggestions ,post here..So,i got your way to do so !!

Why pdftk produced pdf files will not render in Firefox?

I have a site - www.jcrocetta.com.
On this site I have 2 pdf files. One file has blurred data and the other is clear, both files were created with pdftk.
In order to blur out some personal data in the pdf I used Inkscape. But Inkscape only opens/edits one PDF page at a time. After I made my edits in Inkscape I saved the files as .pdf formatted files. At that point I had three separate pdf files, pages 1 through 3. I then used pdftk to concatenate the 3 files into one.
The final pdftk-produced files are on www.jcrocetta.com. Just click the public information button.
In Chrome viewing inline works fine.
Downloading the file from Firefox works fine too.
But viewing inline on Firefox it renders blank pages. How can I fix this?
Also, I know that pdf files not produced with pdftk will render correctly on both Chrome and Firefox.
Thanks for your help.
FireFox has a lovely new feature: It now uses the PDF.js library to render PDF files, instead of calling out to an Adobe Reader plugin, or forcing you to save the file to disk. Unfortunately, it seem that PDF.js isn't quite perfect yet. A quick search shows that other people have the same issue, but the only "solution" I've seen offered boils down to "file a bug report at https://github.com/mozilla/pdf.js/issues or https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=PDF+Viewer".
Also: Do the three individual PDF files render in FireFox, before you use pdftk to concatenate them?

Resources