The API2PDF blog

Tutorials

Step-by-step guides for generating PDFs, images and documents with API2PDF in Python, PHP, Node, C#, Java, Go, Ruby and more.

PHP Tutorial – Convert PDF to HTML

Extract the text of a PDF as HTML from PHP with the pdf-to-html endpoint, useful for indexing and search. Sample code.

Node / Javascript – take a screenshot of a website

Convert any URL to a PNG screenshot from Node.js with Headless Chrome through the Api2Pdf REST API. Sample code included.

Add bookmarks to PDF with Nodejs / Javascript

Add a navigable bookmark outline to an existing PDF from Node.js with the PdfSharp bookmarks endpoint. Sample code included.

Add bookmarks to PDF with PHP

Add a navigable bookmark outline to an existing PDF from PHP with the PdfSharp bookmarks endpoint. Sample code included.

PHP – take a screenshot of a website

Convert any URL to a PNG screenshot from PHP with Headless Chrome through the Api2Pdf REST API. Sample code included.

C# / .NET Tutorial – Convert PDF to HTML

Extract the text of a PDF as HTML from .NET with the pdf-to-html endpoint, useful for indexing and search. Sample C# code.

Nodejs / Javascript Tutorial – Convert PDF to HTML

Extract the text of a PDF as HTML from Node.js with the pdf-to-html endpoint, useful for indexing and search. Sample code.

Convert HTML to Docx with Nodejs / Javascript

Generate a Microsoft Word document from HTML in Node.js with the LibreOffice html-to-docx endpoint, without installing LibreOff...

C# / .NET – Convert HTML to Xlsx

Turn an HTML table into an Excel workbook from C# with the LibreOffice html-to-xlsx endpoint. Sample .NET code included.

Add a Password to a PDF with PHP

Add a user and owner password to an existing PDF from PHP with the PdfSharp password endpoint. A few lines of code.

Python Tutorial – Convert PDF to HTML

Extract the text of a PDF as HTML from Python with the pdf-to-html endpoint, useful for indexing and search. Sample code.

PHP – Generate thumbnail image of PDF or Office file

Create an image preview of a PDF, Word, Excel or PowerPoint file from PHP with the /libreoffice/thumbnail endpoint. Sample code.

Add a Password to a PDF with Nodejs / Javascript

Add a user and owner password to an existing PDF from Node.js with the PdfSharp password endpoint. A few lines of JavaScript.

Page 2 of 5 · 61 posts

Generate your first PDF in minutes

Create an account, grab an API key, and send one POST request. Pay only for what you use.