![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
FREE3OF9 barcode font not displaying in Firefox's new built-in PDF viewer
I have a PHP web app that uses FPDF (v1.53) and the FREE3OF9 barcode font to dynamically generate a PDF which includes a barcode in it. The font is imported into the document using the FPDF AddFont method (http://fpdf.org/en/doc/addfont.htm). In versions of Firefox prior to 19, the PDF opened in a new tab, was displayed by the Adobe Acrobat plugin, and the barcode showed up perfectly fine.
Now that Firefox 19.0 is using its own built-in PDF viewer, the barcode no longer displays at all -- there's just a blank spot where it should be. It continues to display fine in IE and Chrome. How I can get the font to display correctly in the newest version of Firefox?
I understand that I can change the Action for the PDF content type to 'Use Adobe Reader' in the options, but I'd prefer to fix this so that my users don't have to change their browser settings. Or at the very least, it would be nice if they could only change the Action for PDFs originating from my site and not globally.
Thanks.
All Replies (5)
You can set the pdfjs.disabled pref to true on the about:config page to disable the build-in PDF viewer and use the Adobe Reader instead.
See also:
I've only used the PDF viewer a couple times so far, so I can't answer your question about whether it can be enabled/disabled on a site-specific basis.
On one PDF I opened, I saw had an infobar saying it might not display correctly and offering the option to open in another viewer. I'm assuming Firefox doesn't detect that it has a problem with your PDF.
As a short-run workaround, what do you think about changing the file disposition from inline to attachment? I think this might bypass the viewer by forcing a download.
header("Content-Disposition: attachment; filename=".$fname);
Thanks for the suggestion. However, I think the users would prefer to change the Content Type Action rather than downloading the file. They're a fickle bunch.
If there isn't a MIME (content) type send yb the server or specified then Firefox may use the Adobe Reader plugin instead.
I'm studying about SDKs dealing with ***** generating Barcodes recently. I do hope there are more plugins for us to choose from.
moderator removed spam link
Forum rules and guidelines
An gyara