PDF Loads in Acrobat but Not in Browser - html

So, I create a pdf in Photoshop and aside from it being immense, it won't open in a browser. When I download with the HTML5 "download" attribute, the file downloads correctly, but if I double click in Chrome, I get a blank screen. If I go to the file manager and double click the pdf, it opens in Acrobat correctly.
Also, how do I decrease the file size? The PDF I have is almost 100MB and it's only 10 pages.

In photoshop (CC/CS6) go to file -> save as -> select PDF
This will open up a settings screen. In the general tab make sure "Preserve photoshop editing capabilities is NOT checked" and "Optimize for Fast Web Preview " IS checked This will make sure your pdf is tiny and optimized for fast web preview in Chrome.

Related

is it possible to make an hyperlink to only download a pdf file?

I have an hyperlink to a pdf form that can not be opened by the browser's pdf viewer. If clicked, the browser tries to show it but I get the error message like "it is necessary Acrobat Reader 8.x" etc. Is there a way to force an hyperlink to such pdf form file to only allow its downloading? In this way, the user could open it with his local Adobe Reader.
Let’s say you have a PDF that you want to let people download. The file will be like this:
Download Receipt
In most browsers, clicking on the link will open the file directly in the browser.
But, if you add the download attribute to the link, it will tell the browser to download the file instead.
<a href="/path/to/your/receipt.pdf" download>Download Receipt</a>
The download attribute works in all modern browsers, including MS Edge, but not Internet Explorer.
In the latest versions of Chrome, you cannot download cross-origin files (they have to be hosted on the same domain).
To make the hyperlink to download the pdf file when clicked, you should use download property inside the anchor tag. For example you can see the code below:
Download the pdf file
You can also give your own name to the downloadable pdf file in the download property that I provided as 'Document' in the code above.
Yes, it is possible. First download the file and then you'll see a link when it downloaded(it disappears quite quickly) just copy it and use:
hyperlink

Embedded PDF Issue in Edge Browser

When using the Microsoft Edge browser, by default when you open a PDF it will open the PDF in a new tab using the built-in PDF viewer. To avoid this, you can adjust the browser's settings: Toggle on the "Always open PDF files externally" option. This works great. However, it presents a separate issue. Our internal applications use embedded PDFs in iframes. When the external toggle is set to on, these PDFs will not show in the iframes. This doesn't happen in Chrome. Has anyone else experienced this and know a work around?
I've tried removing the type="application/pdf" from the iframe tag to no avail. I can't find anything else online.
It looks like an expected result because you have enabled the option Always open PDF files externally.
So MS Edge browser is giving you an option to download the PDF file and open it using the desired app.
You said this doesn't happen in Chrome browser.
If you enabled the Download PDF files instead of automatically opening them in Chrome option then you will notice the same result in the Chrome browser.
Output in the Chrome browser:
If you click on the Open button then it will download the PDF file.
I did not get any solution or a workaround for this issue.
If you think that there should be an option to load the file in an iframe if Always open PDF files externally option is enabled then I suggest you click on the Send Feedback button in the MS Edge browser and try to provide your feedback about it to the Microsoft.
I posted feedback suggesting that an exclusion/inclusion list be in included but the simplest way would be to treat the frame as part of the session. But this is not Microsoft it is the Chrome projects issue.

How to load a PDF file embeded in an iFrame on electron browser

We have an app which launches Electron browser. In the Electron browser we load a third party website which has a link.
When we view this site in the Chrome or IE browsers, clicking on this link it renders a PDF in an iFrame but for electron browser it shows a save file dialogue. We want to display this PDF in the electron browser just the same way it works for Chrome and IE. As it is a third party website we don't have control over rendering or loading PDF file or we are not getting any events related with loading of this PDF.
For this scenario, if there is no way to display PDF in electron then it is OK to block it so the Save file dialogue will not show.(This app is actually in the KIOSK so we don't want to save a file if it doesn't render in browser.)
Thanks in advance for your comments!
Here is a discussion on an issue almost identical to yours. The answer does a decent job explaining why the download option is appearing. As for preventing the pdf from being downloaded, try using the <embed> tag as it detects compatibility. So embed the pdf using that tag and then load the html into the <iframe>. Here is some example code and description of how to set that up.

How to save rendered fonts?

How would I save rendered fonts from websites? I tried ctrl + s on Chrome then saved the page and it didn't save the rendered font... I used inspect element on the saved page and there's a lot of these errors that say "Failed to load resource: net::ERR_FILE_NOT_FOUND" about the fonts on console... Could someone please help me? I really want the fonts that htmlBurger uses on the text "YOUR CODING SERVICE" so that I can use it on my website.
On that page (htmlBurger), just open DevTools (In Chrome it's Ctrl+Shift+I) and go to Sources tab. From right navigation go to:
htmlburger.com > assets > fonts/tungsten-rounded
Then select font you want to download and right click it and choose Open in new tab. It should automatically download font.

Use Adobe reader instead of chrome pdf viewer to display a pdf

I'm outputting a pdf which has been made with scribus, and in all browsers except for chrome it outputs fine, however with chrome the letters are cut off and lower than usual. I found that disabling the chrome pdf viewer fixes the issue locally. But what about users who do not have it disabled? Is there some way I can make adobe reader show it instead of the chrome pdf viewer in my code?
Any help is appreciated,
Thanks
Edit: I can't make the user download the pdf as it is somewhat a preview before they send it in.
One option would be to use a Content-Disposition header to force the PDF to download as an attachment. When the user clicked on the downloaded file, it would then open in their registered PDF viewer rather than in Chrome.
I ended up flattening the pdf using the flatten option, it unified the result accross all browsers.