P
P
PQR2012-01-20 16:12:34
PHP
PQR, 2012-01-20 16:12:34

PHP: how to include image inside .doc?

You need to generate a doc file using php. This document should contain pictures (logitp, print, etc...).

One solution is to generate an html layout and save it with the .doc extension - Word opens such files perfectly. Question: how to insert a picture there so that it is not a separate file?

Tried img src="data:image/png;base64,..." - works in the browser, but Word 2010 doesn't display the image.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
vaniapooh, 2012-01-20
@vaniapooh

Doc is a purely binary format. There is a clear Microsoft format specification on this, which was posted a few years ago. However, I still advise you to use docx. There is a PHPWord library for this.

S
stg34, 2012-01-20
@stg34

>One of the solutions: generate html version and save with .doc extension

O
Oleg Matrozov, 2012-01-20
@Mear

Look at the mht file format and try to open it with Word.

P
png, 2012-01-20
@png

Try ready bibles. for example, like this .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question