A
A
Anton Shamov2015-05-04 20:59:15
PHP
Anton Shamov, 2015-05-04 20:59:15

How to save a part of html code into an image?

Good day!
I am writing a small php application that generates an html page with barcodes designed as stickers. Please advise how to save all the code from a certain block as a picture. Google, but I came across the option to get a screenshot, but you need to save everything from a certain block for subsequent printing on A4. Is there a library or plugin?
The output is a regular html page with pictures and barcodes drawn using css.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Demin, 2015-05-04
@keksmen

Of course, this is unlikely to help, but each DOM element has a print method that prints the contents of this element.

A
Alexander Alexandrovich, 2015-05-04
@tatu

There is a cool php barcode library that generates in various formats. If you still want to use your code, then in order to save the text as an image, there is a function imagefttext

M
Mike, 2015-05-05
@Mike77

wkhtmltopdf.org

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question