2017 © Pedro Peláez
 

library selectpdf

PHP Client library for the SelectPdf HTML to PDF REST API.

image

selectpdf/selectpdf

PHP Client library for the SelectPdf HTML to PDF REST API.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

HTML To PDF API

SelectPdf HTML To PDF Online REST API is a professional solution that lets you create PDF from web pages and raw HTML code in your applications. The API is easy to use and the integration takes only a few lines of code., (*1)

Features

  • Create PDF from any web page or html string.
  • Full html5/css3/javascript support.
  • Set PDF options such as page size and orientation, margins, security, web page settings.
  • Set PDF viewer options and PDF document information.
  • Create custom headers and footers for the pdf document.
  • Hide web page elements during the conversion.
  • Automatically generate bookmarks during the html to pdf conversion.
  • Support for partial page conversion.
  • Easy integration, no third party libraries needed.
  • Works in all programming languages.
  • No installation required.

Sign up for for free to get instant API access to SelectPdf HTML to PDF API., (*2)

PHP Client Library

This code converts a web page and sends the generated PDF as an HTTP response:, (*3)

availableConversions();
    echo("Available conversions: $conv");
    exit();
    */

    /*
    // get service usage details
    $usage = $client->usageDetails(true);
    echo("
");
    var_dump($usage);
    echo("
"); exit(); */ // set some conversion parameters $client->setPageSize("A4"); $client->setPageOrientation("Portrait"); $client->setAllMargins(10); // convert a web page and store the generated PDF into a $pdf variable $pdf = $client->convertUrl('https://selectpdf.com/'); //$pdf = $client->convertHtmlString('Hello!'); // set HTTP response headers header("Content-Type: application/pdf"); header("Cache-Control: max-age=0"); header("Content-Disposition: attachment; filename=\"Document.pdf\""); // send the generated PDF echo $pdf; } catch(SelectPdfException $ex) { echo "SelectPdf API Error: " . $ex; } ?>

The Versions

18/10 2017

dev-master

9999999-dev https://selectpdf.com/html-to-pdf-api/

PHP Client library for the SelectPdf HTML to PDF REST API.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-curl *

 

api html converter client pdf web service convert web page html to pdf