PHP code example of darkdarin / lowrapper

1. Go to this page and download the library: Download darkdarin/lowrapper 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/ */

    

darkdarin / lowrapper example snippets


use DarkDarin\Lowrapper\Converter;
use DarkDarin\Lowrapper\LowrapperParameters;
use DarkDarin\Lowrapper\Format\TextFormatEnum;

// Create converter
$converter = new Converter();

// Describe parameters for converter
$parameters = (new LowrapperParameters(TextFormatEnum::DOCX))
    // HTML document
    ->setInputFile('test.html')
    // Result file name
    ->setOutputFile('path-to-result-docx.docx');

// Run converter
$converter->convert($parameters);