I need to open a PDF in the client.
The PDF its generated in my Controller (i have no problem with that) and i need to show that PDF inside a layout (not a window).
Related: SmartGWT/GWT: Show a PDF on client side
You could show the pdf in a SmartGWT component using an IFrame.
See this sample and this forum.
Related
I want to extract the coordinates of a PDF document with the help of a mouse click. I have gone through some posts but since I'm new to this, I'm not being able to understand it properly. Also, can this be done if I render the PDF file in a web page?
You can add javascript to a pdf document. Although you only get access to a limited subset of the language.
If you only need the coordinates once (for instance when doing layout of the document), you can simply open it with adobe and activate the rulers/grid option to see where your mousepointer is currently located.
I have a page where I have a lot of info about an item, with a little "Download specs pdf" button below. Clicking it opens the pdf seperately, which is all I need for the webversion.
However I'm currently working on my print css, and my goal is to create a print css here that shows the info along with the pdf below it, included in the same printfile.
Is it possible to embed the pdf in my page (only for print css)? I've tried using the <object> or embed tags but this doesn't seem to show up at all in my print css.
Update: I managed to show the pdf using iframe, but I'm unable to set the iframe height to the pdf's height. The pdf is dynamic so it's not a set height. Dynamically updating the height through jQuery has proven to be impossible because the onload event isn't fired for file downloads in an iframe. If anyone can help me come to a solution, I would be very grateful.
Thanks in advance.
The simple solution is to force a 4:3 perspective on the iframe and size it according to your print page (A4 paper size is standard here).
You can use PDF.js library's who is an amaZing JavaScript PDF viewer working cross browser. Display the PDF in a div, make it hidden with a display:none for web version with your screen CSS.
One advice I can give you is, if you know the maximum number of PDF pages, just make the iframe height large enough... that means, if the number of pages is less, the printer is going to output empty pages.
The other advice was the one stated above, get a tool to annotate or change properties of all PDFs to contain that information.
I found this tool: http://pdfcrowd.com/html-to-pdf-api/ to convert PDF into HTML, which you can use instead of displaying PDF
I'm thinking your best bet is to have a parsed version of the PDF for printing. Open it in Illustrator and save each page to SVG and use the SVG files to print with.
I've worked on a requirement that allows me to show a PDF file inside a browser by doingo a Response.ContentType = "application/pdf".
The problem is that the default view of the PDF is always showing the bookmarks menu at the left, is there a way by using HTTP headers or something to tell the PDF viewer not to show the bookmarks section?
Thanks in advance.
There's two ways that you can do it. The way that I would recommend is to actually open the PDF in Adobe Acrobat and go to File, Properties. On the Initial View tab you'll see a lot of options for how to display the PDF. The second way I haven't tested but Adobe says you can pass various querystring options to the PDF. The one you'd probably want is http://example.org/doc.pdf#pagemode=none
The way how a PDF document is displayed can be configured inside the PDF document.
There are a lot of PDF editors that can modify the "viewer preferences" as it is mostly called. One free example is BeCyPDFMetaEdit.
I will have a page that will regularly updated by a client (using something like TinyMCE), adding links to PDF files that I want to open in a lightbox on the page. Does code to make this a lightbox need to have the link of each PDF inside it or will the code cover any PDF links on the page? I am relativly new to lightboxes in general and was wondering if this is possible, thanks.
I believe PDF is too much for lightbox, use ThickBox with iframes instead.
I have a system where users can upload PDF documents. Rather than displaying the link to these PDFs as a title link, or a PDF icon link, I would like it to be a thumbnail of the first page of the PDF document.
How can I get a thumbnail image of the first (or any specified) page of a PDF document, using ASP.NET 3.5?
Here is a free component to display PDF thumbnails in asp.net: http://www.tallcomponents.com/pdfthumbnail-versions.aspx
GhostScript is another option.
There are no built in PDF capabilities in the BCL.
You will need to use a PDF library that allows you to output images. Use it to render the first page as a thumbnail.
Here is one article on code project to do this (using acrobat and COM interop), here a thread on MSDN forums .