Answer the question
In order to leave comments, you need to log in
How to convert pdf to html and vice versa?
There is such a task, on the server there is a bunch of files in pdf format (there are links to them in the database), also a user with rights can add new ones ...
The task of the application is this:
1. A certain file is taken from the database and converted to html;
2. The necessary sections of the file are replaced with those selected by the user, also the date, full name, etc. are filled in automatically.
3. At the request of the user, the resulting file is downloaded in PDF or HTML format.
4. This file is saved on the server in the form of pdf (it is desirable, but it is also possible in the form of html code);
there are only two questions: how to covect a pdf file to html and html to pdf?
Answer the question
In order to leave comments, you need to log in
The work algorithm is built incorrectly, because it proceeds from the erroneous premise of the possibility of 100% correct conversion of PDF to HTML.
It would be better for you to return to the TOR and state it.
There is, for example, the possibility to use a PDF as a background for a new PDF.
In addition, the PDF format provides fields for filling (forms in PDF are usually made using them).
And your idea is a collective farm on crutches, it will not give a normal result, just waste your time.
PDF to HTML https://packagist.org/packages/gufy/pdftohtml-php
HTML to PDF https://packagist.org/packages/tecnickcom/tcpdf
with this, I'm sure there will be big problems, given that the source data is provided in PDF.
It seems to me that this is an attempt to mix a bulldog with a rhinoceros. The end user does not care what form information is stored on the server, so why PDF? You can convert HTML to PDF quite correctly, but there will be big difficulties with PDF. Do not smack the fever and store data in a more formalized form.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question