How to convert PDF to HTML from file for PDF to HTML API in cURL using PDF.co Web API
How to convert PDF to HTML from file for PDF to HTML API in cURL: Step By Step Instructions
These simple tutorials explain the code material for beginners and advanced programmers who are using cURL. PDF.co Web API helps with PDF to HTML API in cURL. PDF.co Web API is the flexible Web API that includes full set of functions from e-signature requests to data extraction, OCR, images recognition, pdf splitting and pdf splitting. Can also generate barcodes and read barcodes from images, scans and pdf.
Want to learn quickly? These fast application programming interfaces of PDF.co Web API for cURL plus the instruction and the code below will help to learn how to convert PDF to HTML from file. For implementation of this functionality, please copy and paste the code below into your app using code editor. Then compile and run your app. Want to see how it works with your data then code testing will allow the function to be tested and work properly.
Free! Free! Free! ByteScout free trial version is available for FREE download from our website. Programming tutorials along with source code samples are assembled.
@echo off :: Path of the cURL executable set CURL="curl.exe" :: The authentication key (API Key). :: Get your own by registering at https://app.pdf.co/documentation/api set API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :: PDF file. set SOURCE_FILE=sample.pdf :: Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'. set PAGES= :: PDF document password. Leave empty for unprotected documents. set PASSWORD= :: Result HTML file name set RESULT_FILE_NAME=result.html :: Set to `true` to get simplified HTML without CSS. Default is the rich HTML keeping the document design. set PLAIN_HTML=false :: Set to `true` if your document has the column layout like a newspaper. set COLUMN_LAYOUT=false :: Prepare URL for `PDF To HTML` API call set QUERY="https://api.pdf.co/v1/pdf/convert/to/html?name=%RESULT_FILE_NAME%&password=%PASSWORD%&pages=%PAGES%&simple=%PLAIN_HTML%&columns=%COLUMN_LAYOUT%" echo %QUERY% :: Perform request and save response to a file %CURL% -# -X GET -H "x-api-key: %API_KEY%" -F "file=@%SOURCE_FILE%" %QUERY% >response.json :: Display the response type response.json :: Use any convenient way to parse JSON response and get URL of generated file(s) echo. pause
ON-PREMISE OFFLINE SDK
ON-DEMAND REST WEB API
Get Your API Key