Anything To Pdf
Convert an uploaded file of (almost) any format to PDF.
File-based only (no URLs). Auto-detects the input format by extension and dispatches to the right engine: LibreOffice (DOC/DOCX/XLS/XLSX/PPT/PPTX/ODF/ Pages/Numbers/RTF/CSV), WeasyPrint (HTML/Markdown/plain text/EPUB), Pillow (PNG/JPEG/GIF/BMP/TIFF/WebP/HEIC) or CairoSVG (SVG). A PDF upload is accepted and passed through, which — with pdf_options.grayscale — doubles as a PDF grayscale/normalise path.
Args: file: The document or image to convert. output_filename: Optional custom output name (defaults to input name .pdf). direct_download: If True (default), return the file; else JSON metadata. pdf_options: Optional JSON string. Page geometry (page_size, page_width/ height, orientation, margins, scale, header, footer) is honoured for HTML/Markdown/plain text/EPUB/image/SVG input. Office and PDF input support grayscale only — their page layout comes from the source document — and reject an explicitly-set geometry option with a 400.
Request
- Base URL: https://api.enconvert.com (the document declares no server; this is the origin it was published from)
- URL: https://api.enconvert.com/v1/convert/anything-to-pdf
- Auth: none declared
Headers
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.