Safari PDF controls missing PDF is rendered in iFrame - pdf

Anyone know why the PDF controls normally available when displaying a PDF in Safari would be missing when displayed in an iframe? Neither the "hover" controls or the extnded contextual menu is available. Safari reognized it as a PDF because the contextual menu includes the word PDF in the Open commands, ie. "Open PDF in new Window"
Opening a PDF into an empty browser works fine. The built in controls in Chrome and Firefox are there as well and work fine.
I am serving the PDFs using a very simple web page with an iframe inside a div.
I could be wrong but thought that they were there when I first started this project but I just noticed today that they are missing. Without them, PDF drawings cannot be zoomed in and out rendering them useless as PDFs.

Related

Access DOM embedded PDF in Chrome

Is it possible to access the DOM of a embedded PDF file opened in Chrome?
If you simply open the DevTools in Chrome, only the EMBED tag is visible:
But there is a mouse over PDF file opened in Chrome and right-click => code view, then a completely different page code opens:
Can I get access to it?
Thank you in advance!
Yeah so it looks like you've got multiple documents on a page. Its similar to iFrames in web design. I'm not sure 100% because I cant look through the link.
But I'd highly recommend downloading the PDF as a file, then using ADOBE Pro's library to scrape or w/e with the PDF functions. You eliminate the whole aspect of timing, page loads, and page changes, when you get a direct link to a pdf, and then manipulate the data on the user or cloud PC.

How to click element via Shadow DOM using VBA?

Having opened this link in Chrome, I get to the PDF file that opens in Chrome.
On this page there are buttons for downloading, printing, etc:
When viewing the page code, it does not display any information on the download and print buttons.
When I do view the code by hovering the mouse over the download icon, the code for this button opens, which is not available through a regular DOM.
As I understand it, you can use Shadow DOM here.
How do I access the download button and click it to the VBA?
You could access the pdf by HTTP Request and save the data that way. The data is coming from the web, so it's going to be from a Request. You dont need chrome automated with VBA to do this action. Also Webdriver has good support: Downloading pdf file using WebRequests
idk if selenium has it, but i would search more if i were you and not use the DOM to download PDF by clicking elements.

Disable PDF printing in Firefox by web developer

I am developing a web page to show PDF (in .NET platform). The PDF is inside a iframe. One of the requirement is NOT allow client to print the PDF. I have already made the PDF to be password protected (with pdfsharp). I further hide the toolbar by setting toolbar=0. In Chrome & IE, this works fine. But for Firefox, the story is totally different.
In Firefox, the toolbar will be shown even append #toolbar=0 in the src link. Further, the password protected pdf can be printed by simply clicking the icon in the toolbar.
Can anyone suggest some ways to disable pdf printing in firefox.
Note: I need to show the PDF in the webpage. So, download the PDF is not a option.
You will not be able to control the toolbar or the ability to print (not all PDF viewers respect the permissions set by the password) if you rely on the native browser or OS level PDF viewer by using an iFrame. Different browsers will interpret those settings differently. Even different applications within the same browser will yield different results (Chrome vs Dropbox in Chrome)
You'll need to display the PDF using something like PDF.js or another such library if you want any kind of consistency in appearance and behavior.

Text is misaligned in PDF with fillable field only in Safari

I have a PDF that is generated with PDFlib that has fillable fields. They work as expected on Chrome, FF, Edge, IE, but not on Safari.
We have no Macs at work, so I'm looking at this using SauceLabs with OSX El Capitan, Safari 9.3 on 1376x1032 resolution.
When I fill out the fillable field on a form such as https://www.pdflib.com/pdflib-cookbook/pdf-on-the-web-server/starter-webform/php-starter-webform/ in-browser (again, Safari only), when you click outside the fillable field, the text moves up a couple of pixels. Click to edit again and it regains its original position. Click outside and it moves up again.
Is this an unavoidable Safari bug or is there anything I can do to prevent this from happening (currently reading the PDFlib documentation, and I have seen nothing that remotely mentions this)?
They work as expected on Chrome, FF, Edge, IE, but not on Safari.
please get in mind, all browsers have in the moment only limited PDF viewing support. (they are getting better and better with each versions, but they are not yet perfect)
Please use for viewing PDF files the PDF reference product Adobe Acrobat (Reader). Also other PDF viewers like the Apple Preview are not feature complete and might not display everything correct.
When it display correctly in Adobe Acrobat Reader, you know the PDF is fine and it's a bug in the viewer you use.

PDF doc in Iframe not displaying in IE9 - IE9 asks to open or save only

I have a pdf file that is called inside an iframe. I call the full absolute path of the pdf in the iframe. It displays correctly in all browsers. Except in IE9. IE 9 just asks if you want to open or save the PDF. Then after you open or save it, a blank white space appears inside iframe.
Please help if you have any suggestions.
Thank you