PHP code example of ryan-junio-oliveira / document-visualizer

1. Go to this page and download the library: Download ryan-junio-oliveira/document-visualizer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ryan-junio-oliveira / document-visualizer example snippets


    



use RyanJunioOliveira\DocumentVisualizer\DocumentViewer;


echo $viewer->visualize();



use RyanJunioOliveira\DocumentVisualizer\DocumentViewer;

 bg-gray-800 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded-md shadow transition-transform transform hover:scale-105">
        <i class="fas fa-print"></i>
    </button>
    <script>
        document.getElementById("print").addEventListener("click", () => {
            window.print();
        });
    </script>
';

$viewer = new DocumentViewer('teste2.pdf', $addtionalContent);