For example, the PDF will display fine in Chrome for most users, but they will need a plugin like Adobe Reader installed if they're using Firefox or Internet Explorer. At least PDFObject will allow you to display a message with a link to download Adobe Reader and/or the PDF file itself if their browser doesn't already have a PDF plugin installed. Nov 09, 2017 Generally, a hyperlink is used to link a PDF document to display in the browser. HTML anchor link is the easiest way to display a PDF file. But if you want to display PDF document on the web page, PDF file need to be embedded in HTML.The HTML tag is the best option to embed PDF document on the web page. In this tutorial, we will show you how to display PDF file in the web page.
Active6 months ago
I want to display a PDF file on browser which is store on our server. Here is my code :-
But it returns below output on browser :
PDF File to show :
I am doing this on view of codeignter.
What I am doing wrong ? Please help me on this. thanks in advance
EDIT :-
Im doing something like below :
So how can I show more than one file on browser ?
Edit 2 :-
So as per the answer below I have to use phpmerger to merge multiple PDF file and display into the browser. I gone through this website http://pdfmerger.codeplex.com/ but unable to use into codeignter. Can anyone please help me to use this phpmerger inside my codeingter
Rakesh Shetty
Rakesh ShettyRakesh Shetty
3,34766 gold badges2929 silver badges6969 bronze badges
6 Answers
you can use
PDF Merger library to achive your goals.Here is the link to original library (outdated). Prefer myokyawhtun fork which is maintained
and a sample code will be as following
Supported modes -
browser , file , download and string .
Edit : As i can see you have tagged CI you can put
PDFMerger.php in applications/libraries .and load it in autoload.php or in controller All naruto episodes in english.
and then can use it like redochka
$this->pdfmerger->addPDF() and merge() functions.
7,34099 gold badges4646 silver badges6565 bronze badges
karan thakkarkaran thakkar
1,42222 gold badges1515 silver badges2424 bronze badges
please try this code i hope it will working as i try.
Abdul Qadir
33111 gold badge33 silver badges1818 bronze badges
arshadarshad
RichardBernardsRichardBernards
3,11811 gold badge1717 silver badges3030 bronze badges
my recommended library for embedding PDFs is PDFObject. Check it out here: http://pdfobject.com/
DariusDarius
42211 gold badge55 silver badges2121 bronze badges
This method works if you want to display a pdf in the browser page.
Mike VolmarMike Volmar
Html Display Pdf In Browser Free
Friends just use Anchor Tag that's it. Now-day's all newer browsers supports view of any files.
Show Html Code In Browser
Siddu LoniSiddu Loni
Display Pdf In Browser EdgeNot the answer you're looking for? Browse other questions tagged phphtmlcodeigniterpdf or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |