HTML codes opening with PDF in a separate browser

Asked By 0 points N/A Posted on -
qa-featured

I am planning to load few registration forms to my webpage in PDF format, so that end users can see the PDF within the browser. Which will give a perfect view, so that users can take the printout without any alignment problem. I am not an expert in HTML coding but can understand. Please provide a simple HTML codes opening with PDF in a separate browser.

SHARE
Best Answer by Cameron Msjamie
Answered By 0 points N/A #189356

HTML codes opening with PDF in a separate browser

qa-featured

 

Hi,

If you want to open a pdf file (for ex abc) in a different browser in PDF format, then in the a href tag use this code

<a href="abc.pdf" target="_blank">View pdf</a>

Now when a user click on View pdf, your pdf file i.e abc will open in a separate window

Regards,

Laz Zebbena

Best Answer
Best Answer
Answered By 5 points N/A #189357

HTML codes opening with PDF in a separate browser

qa-featured

Hi Jones

It is really nice to create a web application that can view PDF documents online, because you do not have to download each and one of them and you can only view those files using a web browser. But as a matter of fact, sometimes it depends on the browser if they are capable of displaying PDF files. Google Chrome is one of the browsers that is capable of displaying PDF files on the webpage, while the latest version of Firefox and Internet Explorer do not have this ability.

You can now display PDF files on your HTML files without having browser problems. Here is my suggestion. You can convert first your files as an SWF file. Do not worry, it is very easy.

Here are the steps:

  1. Download and install this file first SWF Tools
  2. Convert your PDF files to SWF files.
  3. Then place this code in your HTML file:
  <object width="595" height="842">       
  <param name="MOVIE" value="NAMEOFFILE.swf"> -name of your file  
  <param name="PLAY" value="true">       
  <param name="LOOP" value="true">       
  <param name="QUALITY" value="high">       
  <embed src="nameofdoc.swf" width="595" height="842"       
   play="true" align="" loop="true" quality="high"       
   TYPE="application/x-shockwave-flash"       
   PLUGINSPAGE="[[https://get.adobe.com/flashplayer/]r]">       
  </embed>       
</object>

You can now view your PDF files in any browsers. So it is not really recommended to make an “href” code in order to view PDF files.

I hope this helps.

Related Questions