Creating HTML from .docx and .pdf files

162 views
Skip to first unread message

maninder singh Kumar

unread,
Jun 26, 2020, 3:20:16 AM6/26/20
to ang...@googlegroups.com
I need help in figuring out how to convert a .docx and .pdf file uploaded to the server into HTML format.  
The eventual aim is to be able to store the displayed file back into a mysql database using django backend.

Upload --> Display in frontend --> Modify in frontend --> store in db using django

Any answers would be appreciated.

regards .. willy

Sander Elias

unread,
Jun 29, 2020, 12:26:54 AM6/29/20
to Angular and AngularJS discussion
Hi,

Your question is quite loose. Convert to HTML in the frontend? What do you want to convert? Also, what about fonts, styling, images, borders, padding, margins, colors and so on?
Does it needs to be pixel-perfect, or just the raw test-content? What would happen if the PDF doesn't have text, but only graphs? (the same for docx btw)

The list of questions only starts here.
Yes, it can be done, no it's not available for free.

Regards
Sander

maninder singh Kumar

unread,
Jun 29, 2020, 1:43:28 AM6/29/20
to ang...@googlegroups.com
Want to code it and not buy it !
--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/435421e9-0fa7-4919-a880-12cc6b8fc4f7o%40googlegroups.com.

Sander Elias

unread,
Jun 29, 2020, 2:27:24 AM6/29/20
to Angular and AngularJS discussion
Hi Maninder,

Cool, First step would be decoding the files:
After decoding the above, create a dom node, write the parsed information into it, by creating all needed nodes, make sure to cater for the fonts, colors and styles. Then its just a case of grabbing the `innerHTML` of that document, and send it to the server.

Regards
Sander

maninder singh Kumar

unread,
Jun 29, 2020, 5:00:23 AM6/29/20
to ang...@googlegroups.com
Thanks will work it out !
--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

Mark Giffin

unread,
Jun 29, 2020, 1:44:40 PM6/29/20
to Angular and AngularJS discussion
Hey this is great info Sander! I'm getting all kinds of ideas from this. Thanks!

Mark

maninder singh Kumar

unread,
Jun 29, 2020, 1:59:46 PM6/29/20
to ang...@googlegroups.com
This is what I have achieved so far :

1.  Checked out the logic for encoding and decoding
2.  Have a btoa code worked out
3.  Wondering if I can get an editable html file as an output

Regds.....Willy

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages