• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript Not sure where to start In regards to writing a program to be able to edit two PDF documents simultaneously


New Coder
I would like to have two documents open in the same window, the two documents would be the same document but in two different languages(already translated), and the goal is to make my work more efficient by adding two main functions.

The first, is to have the ability to set bookmarks in doc 1 and it automatically doing it in doc 2 in the same location, and vice versa. The location of the bookmarks would be determined by Paragraph number, as they generally have the same amount in that regard.

The second, would be a search function like CTRL-F, where if you were to search a word in one doc, it would be able to determine the rough location of that word in the next document and take you there.

I am mainly looking on some general guidance on how I could start tackling this. I have experience with HTML, CSS, very basic JavaScript/angular.
I'm not quite sure, but my guess would be that you would need some back end library that can work with PDF files to actually save the bookmarks to the PDF file. If you're going the Javascript route, you would likely need to use server-side Javascript, eg Node.js. Here's some compatible Node JS libraries for working with PDFs: https://dev.to/handdot/generate-a-pdf-in-js-summary-and-comparison-of-libraries-3k0p

If you're open to other languages like PHP, there's other libraries like FPDF that can handle server-side PDF generation:

Maybe something here will give you a starting point? I don't think you can do PDF generation fully client side, a server will likely need to be involved at some level.

New Threads

Buy us a coffee!

Top Bottom