Convert various image formats to PDF from the command line using the Pdfcrowd API v2.
pip install pdfcrowd
Learn more about other install options.
Authentication is needed in order to use the Pdfcrowd API. The credentials
used for accessing the API are your Pdfcrowd username and the API key.
Sign up for a Free Trial
image2pdf -user-name "your_username" -api-key "your_apikey" \ "/path/to/logo.png" > "logo.pdf"
image2pdf -user-name "your_username" -api-key "your_apikey" \ "http://pdfcrowd.com/static/images/logo.png" > "logo.pdf"
-debug-logto get detailed info about the conversion, such as conversion errors, time, console output.
Conversion from an image to PDF.
usage: image2pdf [options] source Conversion from an image to PDF. positional arguments: source Source to be converted. It can be URL, path to a local file or '-' to use stdin as an input text. optional arguments: -user-name USER_NAME Your user name at pdfcrowd.com. -api-key API_KEY Your API key at pdfcrowd.com. -resize RESIZE Resize the image. The resize percentage or new image dimensions. Default is 100%. -rotate ROTATE Rotate the image. The rotation specified in degrees. -debug-log Turn on the debug logging. Details about the conversion are stored in the debug log. -tag TAG Tag the conversion with a custom value. The tag is used in conversion statistics. A value longer than 32 characters is cut off. A string with the custom tag. -http-proxy HTTP_PROXY A proxy server used by Pdfcrowd conversion process for accessing the source URLs with HTTP scheme. It can help to circumvent regional restrictions or provide limited access to your intranet. The value must have format DOMAIN_OR_IP_ADDRESS:PORT. -https-proxy HTTPS_PROXY A proxy server used by Pdfcrowd conversion process for accessing the source URLs with HTTPS scheme. It can help to circumvent regional restrictions or provide limited access to your intranet. The value must have format DOMAIN_OR_IP_ADDRESS:PORT. -converter-version CONVERTER_VERSION Set the converter version. Different versions may produce different output. Choose which one provides the best output for your case. The version identifier. Allowed values are latest, 20.10, 18.10. Default is 20.10. -use-http Specifies if the client communicates over HTTP or HTTPS with Pdfcrowd API. Warning: Using HTTP is insecure as data sent over HTTP is not encrypted. Enable this option only if you know what you are doing. -user-agent USER_AGENT Set a custom user agent HTTP header. It can be useful if you are behind some proxy or firewall. The user agent string. -proxy PROXY Specifies an HTTP proxy that the API client library will use to connect to the internet. PROXY must contain 4 values separated by a semicolon. The proxy hostname. The proxy port. The username. The password. -retry-count RETRY_COUNT Specifies the number of retries when the 502 HTTP status code is received. The 502 status code indicates a temporary network issue. This feature can be disabled by setting to 0. Number of retries wanted. Default is 1. produced by: www.pdfcrowd.com