How to add text and images to PDF in cURL and PDF.co Web API
If you want to learn more then this tutorial will show how to add text and images to PDF in cURL
These sample source codes on this page below are displaying how to add text and images to PDF in cURL. Want to add text and images to PDF in your cURL app? PDF.co Web API is designed for it. PDF.co Web API is the Rest API that provides set of data extraction functions, tools for documents manipulation, splitting and merging of pdf files. Includes built-in OCR, images recognition, can generate and read barcodes from images, scans and pdf.
This prolific sample source code in cURL for PDF.co Web API contains various functions and other necessary options you should do calling the API to add text and images to PDF. Just copy and paste the code into your cURL application’s code and follow the instructions. Applying cURL application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.
The trial version of PDF.co Web API can be downloaded for free from our website. It also includes source code samples for cURL and other programming languages.
@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=*********************************** :: Direct URL of source PDF file. set SourceFileUrl=https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-edit/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= :: Destination PDF file name set DestinationFile=result.pdf :: Text annotation params set Type=annotation set X=400 set Y=600 set Text=APPROVED set FontName=Times%20New%20Roman set FontSize=24 set Color=FF0000 :: * Add Text * :: Prepare request to `PDF Edit` API endpoint set QUERY="https://api.pdf.co/v1/pdf/edit/add?name=%DestinationFile%&password=&pages=&url=%SourceFileUrl%&type=%Type%&x=%X%&y=%Y%&text=%Text%&fontname=%FontName%&size=%FontSize%&color=%Color%" :: Perform request and save response to a file %CURL% -# -X GET -H "x-api-key: %API_KEY%" %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