I am using wicked_pdf to generate a PDF file.
Is it possible to add a link to a particular page in the same PDF.
For example, I need to add a link to page 4 of the PDF on page 1.
How to create a hyperlink to a specific page of pdf in sihny application?
I have title of a tabPanel in shiny. My objective is to create a hyperlink which takes to a specific page of a pdf file.
You can try this one:
a("Page4",target="_blank",href="myfile.pdf#page=4")
I have a rails app that generates a pdf for a given html partial. In the partial I have a number of links that have a target of _blank, however in the generated PDF the target looks like it is being ignored.
I just want the pdf to open links in a new tab/window.
A collaborators from PDFKIT said
"This sounds like a problem with wkhtmltopdf (which is what renders the pdf from the html). (Pdfkit just wires up everything between ruby/rails and that binary.)"
Any help would be appreciated.
Regards,
Sean Hubers Answer:
PDFs are not marked up with HTML. How a link click is handled in a PDF
depends on the PDF viewer you are using. Modern browsers with built-in
PDF viewers may navigate to the page within the same frame as the PDF
view and that is not something that can be controlled with an HTML
element attribute. What happens if your link is clicked when the PDF
is being viewed in Adobe Acrobat or Mac Preview? You're at the whim of
the software and operating system. Sorry to bear the bad news but this
is the reality of the PDF format.
I'm new to MVC and would like to find out how to view PDF files. Specifically, I have a bunch of PDF files on server. I would like to render links to those PDF files using MVC and allow the user to click on a link to view the PDF file in a browser. Thank you in advance for your help.
You may use some javascript or pdf readers controll.
Look at : http://viewerjs.org/
I want to have a web page coded with HTML5, and I want to be able to put a pdf file onto this page so you can view it without having to click on any links to download it separately. Anyone know how to do this?
I want it to keep the text, images, and layout of the pdf file also. If that weren't the case I would just use an image. Thanks!
Edit: This will be hopefully going onto the ipad. So it won't support adobe. I need to just find a way to somehow make the pdf file show up in an html5 page without using a viewer. I want to keep all of its layers. It doesn't have to stay a pdf file when its on the page, I just need to find a way to transfer all of those layers there without having to do this manually with divs for each image, paragraph, etc.
I don't think this is possible without using Flash. Instead, you might want to convert the PDF to a different format (HTML for example) that can be rendered by the browser. There are tools that can do this from the command line, so making a script to do it on your site won't be too difficult.
You can use the embed tag like this:
<embed src="/path/to/your/file.pdf" />
Maybe you could convert the pdf to images on the server and display the images instead of the original pdf. As far as i know, Apache pdfbox can be used to do such a convert.
A little bit late and maybe issuu is gonna fix it soon but for now you can embed with issuu.com using an iframe and your magazine address ending in ?mode=mobile. Tested in ipad:
<iframe width="850px" height="580px" src="http://www.issuu.com/your_username/docs/your_magazine_name?mode=mobile" frameborder="0" allowfullscreen></iframe>
I would like same mobile version loading in desktop so there is no advertising. If you know how to make the browser to think it's an ipad let me know.
This code would directly embed a pdf viewer in a webpage
<object data="path to pdf " type="application/pdf" width="100" height="100">
<p>Alternative text - include a link to the PDF!</p>
</object>
If you are using ASP.NET, this link may be of interest to you.
Browser Based PDF Viewing And Editing
Hosted entirely on your server,
activePDF Portal is an ASP.NET
WebControl that enables your users to
interactively view and modify PDF
documents from any source - adding
comments, form fields, bookmarks, and
more – directly from within a standard
web browser, without requiring any
client-side software such as Adobe
Reader or Flash, or the use of ActiveX
controls.
- http://portal.activepdf.com/
PDFObject looks promising, but it doesn't work on iPads at the moment.