📜 ⬆️ ⬇️

We print Flash in Firefox correctly

Since ancient times, Flash and Firefox have a lot of problems.
One of them is that Flash content is not printed in Firefox .

We found a workaround a long time ago and laid it out with a free download.
Three years have passed, and the bug still exists and the fix is ​​still relevant.

So, I present to you flash-print-fix. A small library that allows for the normal printing of Flash content in Firefox:
code.google.com/p/flash-print-fix

Problem


This is how the Flex application is printed in Firefox without dancing with a tambourine:

')
And this is the case when using flash-print-fix:


How it works


The principle is very simple:
1. Get a screenshot from swf in png
2. Encode png in base64 string
3. Add a picture to the page with src = "data: img / png; base64, ..."
4. Register css-ohm hiding Flash when printing and displaying images:
@media screen .flashScreenshot { display: none; } @media print .printableFlashObj { display: none; }; .flashScreenshot { display: block; border: 0; outline: none; } 


How to use flash-print-fix




Everything! About a headache at the press it is possible to forget.

UPD:
Library license changed from LGPL to MIT

Source: https://habr.com/ru/post/114342/


All Articles