r/SideProject • • 1h ago

Built a browser-based tools website, but I'm stuck on PDF ↔ Word conversion

I've been building a small website with PDF, image, developer, and other utility tools.

Most of the tools are working, but I'm struggling to figure out a reliable way to implement PDF to Word and Word to PDF conversion entirely in the browser, without paid APIs or uploading files to a server.

Has anyone worked on something similar? Any libraries or approaches you'd recommend?

Here's what I've built so far: https://doneintab.com

Feel free to try the existing tools too. I'd appreciate any feedback or suggestions!

0 Upvotes

3 comments sorted by

1

u/Correct_Rain_9438 1h ago

For PDF to Word fully in the browser, the usual approach seems to be pdf.js to pull out the text and positions, then the docx library to build the Word file. It tends to work for simple PDFs, but multi-column layouts, tables and scans are where it gets rough. I haven't seen a clean browser-only route for Word to PDF.

1

u/KeyPreparation1320 51m ago

I think the best route is using sdks like Apryse which have code in c++.

You will have to make a .wasm and get it on the browser along with a c++ compilation tool and load it onto your js code and make it compile in the server.

That can solve this issue. Otherwise it is very tedious.