1
How to read a Word file without losing formatting the same?
Status: Client wants to upload a Word file and we store all this within the database as text (for future searches and similar).
Note: Using PHP only.
1
How to read a Word file without losing formatting the same?
Status: Client wants to upload a Word file and we store all this within the database as text (for future searches and similar).
Note: Using PHP only.
1
To read without losing formatting, save the record in the database with a field containing the extracted content in plain text format and the original file in a specific location using the registry ID.
Use the field for content searches and if the user wants to recover the file via download you can read the original file by ID and send to it via PHP.
Browser other questions tagged php upload file-system microsoft-word
You are not signed in. Login or sign up in order to post.
Has two ways, can save the file on file system or as blob in database.
– Rafael Mena Barreto
I never looked how Wordpress does it, but it has a function of
paste from Word
that can be interesting.– brasofilo
I don’t understand the question, especially given the situation you described. Want to know how to extract text from doc to save in the bank?
– bfavaretto
This however without losing formatting.
– Iago Leão
Ah, so it looks like you want to convert to HTML and save as HTML in the database. There are libraries for this, but it is impossible to ensure that no formatting is lost. A part ends up losing.
– bfavaretto