2017 © Pedro Peláez
 

library docraptor

A wrapper for the DocRaptor HTML to PDF/XLS service.

image

docraptor/docraptor

A wrapper for the DocRaptor HTML to PDF/XLS service.

  • Thursday, January 25, 2018
  • by jqr
  • Repository
  • 4 Watchers
  • 12 Stars
  • 52,944 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 4 Forks
  • 6 Open issues
  • 12 Versions
  • 9 % Grown

The README.md

Build Status, (*1)

DocRaptor PHP Native Client Library

This is a PHP package for using DocRaptor API to convert HTML to PDF and XLSX., (*2)

Installation

composer require docraptor/docraptor

Basic Usage

$docraptor = new DocRaptor\DocApi();
$docraptor->getConfig()->setUsername("YOUR_API_KEY_HERE");             // this key works for test documents
// $docraptor->getConfig()->setDebug(true);

$doc = new DocRaptor\Doc();
$doc->setTest(true);                                                   // test documents are free but watermarked
$doc->setDocumentContent("<html><body>Hello World</body></html>");     // supply content directly
// $doc->setDocumentUrl("http://docraptor.com/examples/invoice.html"); // or use a url
$doc->setName("docraptor-php.pdf");                                    // help you find a document later
$doc->setDocumentType("pdf");                                          // pdf or xls or xlsx
// $doc->setJavascript(true);                                          // enable JavaScript processing
// $prince_options = new DocRaptor\PrinceOptions();                    // pdf-specific options
// $doc->setPrinceOptions($prince_options);
// $prince_options->setMedia("screen");                                // use screen styles instead of print styles
// $prince_options->setBaseurl("http://hello.com");                    // pretend URL when using document_content

$create_response = $docraptor->createDoc($doc);

Next Steps

  • Optionally store and get a URL for your converted document with document hosting
  • View more code examples with error handling, asynchronous creation, file saving, and document hosting.
  • Perfect your document styling with our style and formatting reference, and API reference. Easily add headers and footers, page breaks, page numbers, table of contents, and much more!

More Help

Stuck? We're experts at turning HTML into PDFs so please email us if you run into trouble., (*3)

Development

The majority of the code in this repo is generated using openapi-generator on docraptor.yaml. You can modify this file and regenerate the client using script/generate_language., (*4)

Release Process

  1. Pull latest master
  2. Merge feature branch(es) into master
  3. script/test
  4. Increment version: generator-config.json
  5. Run script/generate_language to update generated version numbers:
    • composer.json
    • lib/Configuration.php (2 places)
  6. Update CHANGELOG.md
  7. Commit "Release version vX.Y.Z"
  8. Push to GitHub
  9. Tag version: git tag 'vX.Y.Z' && git push --tags (GitHub packagist integration will tell packagist to release a new version)
  10. Verify update on https://packagist.org/packages/docraptor/docraptor
  11. Refresh documentation on docraptor.com

Version Policy

This library follows Semantic Versioning 2.0.0., (*5)

Contributors

  • Matthew Gordon
  • Joel Meador
  • Elijah Miller
  • James Paden
  • Jason Gladish
  • Nikola Nikolov

The Versions

25/01 2018

dev-master

9999999-dev https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

MIT Apache V2

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api xls html pdf xlsx docraptor

21/11 2017

1.3.0

1.3.0.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

03/11 2016

v1.1.0

1.1.0.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

21/10 2016

dev-next

dev-next https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

18/10 2016

v1.0.0

1.0.0.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

14/10 2016

dev-pipeline

dev-pipeline https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

27/09 2016

v0.4.0

0.4.0.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

12/03 2016

v0.3.0

0.3.0.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

30/01 2016

v0.2.1

0.2.1.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

27/01 2016

0.1.0

0.1.0.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

17/01 2016

0.0.2

0.0.2.0 https://github.com/docraptor/docraptor-php

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor

16/01 2016

0.0.1

0.0.1.0 https://docraptor.com

A wrapper for the DocRaptor HTML to PDF/XLS service.

  Sources   Download

Apache V2

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api xls html pdf xlsx docraptor