I want to edit a pdf contract using PHP, or JS, or any web solution that serves

Asked

Viewed 260 times

0

I am developing a management system for a company, there they have several contracts for various services. I already have the contracts in hand and already know where my system will have to change in them (the specific places) but how I do this via PHP, or JS or any other web solution ?

1 answer

0


You will need to develop the PDF template in HTML, then save it to PDF.

There is a plug-in for the wysiwyg editor Tinymce that converts html to a pdf

https://www.api2pdf.com/tinymce-save-to-pdf-plugin/

This is a basic example of how to use it

<!DOCTYPE html>
<html>
<head>
    <script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    <script>
        tinymce.init({
            selector: 'textarea',
            external_plugins:
                {
                    'saveToPdf': 'https://cdn.rawgit.com/Api2Pdf/api2pdf.tinymce/master/save-to-pdf/dist/save-to-pdf/plugin.js'
                },
            toolbar: 'saveToPdf',
            saveToPdfHandler: '/REPLACE-WITH-HANDLER-URL'
    });
    </script>
</head>
<body>
    <textarea>Testing saveToPdf</textarea>
</body>
</html>
  • Thank you very much Erlon, you really helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.