S
S
Seva2012-11-29 04:11:59
linux
Seva, 2012-11-29 04:11:59

Send page to print in Chrome from console?

Lord, good day.

The situation is as follows:
There is a thermonuclear captcha made on a flash, where letters appear only when you hover over them with the mouse and in turn, and plus garbage constantly “falls” from above to complicate recognition ( examples ).

It suddenly turned out that if we open the flash drive in chrome in a separate window and send it to print, we will get this:

Image #1637842, 102 KB

Next, we print “to the picture”, turn up the brightness, and we are left with only clean large letters that any OCR recognizes.

The only problem is chrome, which does not want to print without user intervention. Has anyone come across?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Goryachev, 2012-11-29
@Gordim

You can try this option.
Launch Chrome without preview.
Enabled with the --disable-print-preview option.

I
iStyx, 2012-11-29
@iStyx

Well, calling the print window is quite simple:

document.execCommand('print', false, null);

The second parameter is just responsible for suppressing a possible UI, but, apparently, does not work for printing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question