A file being converted to PDF

Convert to PDF

Convert to PDF is a REST API tool that accepts a wide range of file types as input and reliably converts each into a standardized PDF document. It's designed to provide developers with robust, high-quality document conversion capabilities, ensuring seamless integration and consistent, compliant PDF output for diverse applications.

Key Benefits of Convert to PDF API

  • Support robust format conversion for Word, Excel, PowerPoint, images (JPEG, TIF, BMP, PNG), Email (.eml), PostScript, HTML, Markdown, plain text, JSON, XML, and CSV.
  • Generate standardized PDF documents optimized with high-quality Adobe® PDF Library™ technology, ensuring consistent and reliable compliance with PDF ISO 32000 specifications.
  • Create tagged PDF output from supported Office and structured-text input to support accessible document workflows and downstream processing.
  • Fine-tune file size, image quality, and page presentation with controls for compression, downsampling, page size, margins, orientation, HTML web layouts, and profiles for PostScript conversion.
  • Generate styled PDFs from structured text with format-specific options for fonts, colors, headings, tables, JSON and XML views, and Markdown images.
  • Streamline content-standardization workflows by converting diverse source files into a consistent PDF format for sharing, review, and downstream processing.
Build Your Solution

You have document processing problems, we have Solutions. Explore the many ways pdfRest can align your documents with your business objectives.

Browse all solutions
Many different file type icons (XLS, PNG, HTML, etc) are all marging with arrows into a large PDF file icon
Convert and Merge Multiple Types of Files Together
Access PDF Processing Power with AI Magic
Access PDF Processing Power with AI Magic
Microsoft Work, Powerpoint, and XLS icons corkscrew towards a PDF/A labelled document icon.
Optimize Word, Excel, and PowerPoint Files for Long-Term Preservation
Graphic showing how converting HTML Newsletters can preserve content in PDF format
Convert HTML Newsletter to PDF to Preserve Content
Expedite Litigation Workflows with PDF and Word Conversions
Expedite Litigation Workflows with PDF and Word Conversions
The pdfRest logo is added to the Microsoft Power Automate logo with a representation of a PNG to PDF conversion workflow
Integrate pdfRest with Microsoft Power Automate
Why is pdfRest the best API to convert files to PDF?
pdfRest's Convert to PDF API combines broad format support, reliable PDF output, and granular control over conversion results in a single REST API tool. It supports both traditional document conversion and PDF generation from structured content.

Seamlessly Convert Office, Image, Email, HTML, and Structured Text Files

pdfRest's Convert to PDF API accepts a broad range of input formats and converts each submitted file into a professional PDF document. A single REST API endpoint provides a consistent conversion workflow across supported document, image, email, web, and structured-text formats.

Supported input formats include:

  • Office documents: Word (.doc, .docx), Excel (.xls, .xlsx), and PowerPoint (.ppt, .pptx)
  • Image files: JPEG (.jpg, .jpeg), TIF (.tif, .tiff), BMP (.bmp), and PNG (.png)
  • Email messages: Email (.eml)
  • Print formats: PostScript (.ps) and Encapsulated PostScript (.eps)
  • Web content: HTML (.html), including web pages from URLs
  • Structured content: Markdown (.md, .markdown), plain text (.txt), JSON (.json), XML (.xml), and CSV (.csv)

Whether an application is processing business documents, converting web content, or generating reports from structured data, developers can use the same Convert to PDF endpoint and a consistent request pattern for each file they process.

Generate High-Quality, ISO-Compliant PDFs for Professional Workflows

Not all PDFs are created equal. Inconsistent conversion can lead to rendering differences, compatibility issues, and long-term archival risks.

With pdfRest's Convert to PDF Tool, files are optimized using high-quality Adobe® PDF Library™ technology to provide consistent and reliable compliance with the PDF ISO 32000 specifications. This supports PDFs that are structurally sound and suitable for:

  • Long-term archiving: Preserve documents in a standardized format for retention and future access.
  • Consistent rendering: Maintain a dependable viewing experience across devices and PDF software.
  • Workflow interoperability: Exchange documents reliably between systems, applications, and business processes.
  • Standardized delivery: Produce consistent PDF output from varied source formats and content types.

By producing dependable, standards-based PDF output, pdfRest helps organizations reduce conversion risk and maintain a consistent document experience across systems, devices, and long-term retention workflows.

Fine-Tune Your PDF Output with Customizable Conversion Parameters

The Convert to PDF API gives developers control over the final PDF output for a range of conversion and PDF generation workflows. Parameters can be selected according to the input format and the intended use of the resulting document.

Available options include:

  • Create tagged PDFs from supported Office and structured-text input.
  • Control compression and downsampling to optimize file size and image quality.
  • Set page size, margins, and orientation for HTML and structured-text conversions.
  • Customize HTML output with desktop, tablet, or mobile web layouts.
  • Apply structured-text styling with fonts, text sizes, colors, headings, code blocks, tables, borders, fills, padding, and alternating row colors.
  • Choose JSON and XML presentation as source text or readable hierarchy views, and map Markdown images to uploaded files or existing resource IDs.

These controls let developers tailor conversion results to their application requirements while keeping document processing within a single, consistent API workflow. See our documentation for full details on the available parameters.

Customize Your Solution

Learn about the parameters for this tool to create your custom solution.

Tagged PDF

Compatible with Microsoft Office and structured-text conversion.

The tagged_pdf parameter controls whether supported input files produce tagged PDF output. Set the value to on to enable tagged output or off to disable it.

For Markdown, plain text, JSON, XML, and CSV input, tagged PDF output is enabled by default. Use structured_text_options.enable_tagging when you need to control tagging inside the structured-text configuration. When both parameters are supplied, structured_text_options.enable_tagging takes precedence.

Tagging adds logical document structure that can improve accessibility and downstream processing. Tagged output alone does not guarantee conformance with a specific accessibility standard.

Safe & Secure

Confidently process your sensitive data with pdfRest. Our platform is built for robust, Enterprise-grade security and compliance. We meet rigorous standards for GDPR and HIPAA, and our controls are independently audited to ensure strict SOC 2 Type 2 compliance. Your data's protection is our commitment.

Frequently Asked Questions
Need more help? Contact Us or visit our documentation.

The Convert to PDF API is a REST API tool that converts a wide range of source files into standardized PDF documents. It supports traditional document conversion for Microsoft Office files, images, email, PostScript, EPS, and HTML, as well as PDF generation from Markdown, plain text, JSON, XML, and CSV files.

Each request processes one primary input file through the same /pdf endpoint. Developers can upload that file, submit an existing pdfRest resource ID, or provide a public web-page URL for HTML conversion.

Structured-text conversion supports document styling, page setup, tables, tagged output, JSON and XML source or hierarchy views, and Markdown images. This makes the tool useful for both converting existing files and generating reports, summaries, data exports, and other PDFs from application content.

The Convert to PDF API supports the following input formats:

  • Office documents: .doc, .docx, .xls, .xlsx, .ppt, .pptx
  • Image files: .jpg, .jpeg, .tif, .tiff, .bmp, .png
  • Email: .eml
  • Print formats: .ps, .eps
  • Web content: .html, submitted as a local file or public web-page URL
  • Structured text: .md, .markdown, .txt, .json, .xml, .csv

The API determines structured-text input type from the submitted file extension. Markdown, plain text, JSON, XML, and CSV files can be converted with optional structured_text_options for presentation, styling, page setup, tagging, and format-specific behavior.

Yes. Available options depend on the input format, allowing you to customize image handling, page setup, tagged output, and structured-text presentation.

For PostScript, Microsoft Office, and HTML conversion, use compression and downsample to balance PDF file size and image quality. For HTML conversion, use page_size, page_margin, page_orientation, and web_layout to control the rendered page and responsive layout.

For Markdown, plain text, JSON, XML, and CSV conversion, use structured_text_options to configure page size, custom dimensions, margins, orientation, fonts, fallback fonts, text size, colors, heading scale, code formatting, and tagged output.

Markdown and CSV tables can be styled with column widths, borders, colors, header fills, body-row fills, alternating row colors, padding, alignment, wrapping, and repeated headers on overflow pages. JSON and XML can be presented as source syntax or readable hierarchy views, while plain text can be reflowed or rendered with source line breaks preserved.

For PostScript and EPS conversion, you can also supply an optional .joboptions profile through job_options or job_options_id. This applies Adobe Distiller-compatible conversion settings for workflows that need a managed, reusable profile. Without a supplied profile, pdfRest uses its standard PostScript and EPS conversion settings.

Yes, pdfRest prioritizes the security and privacy of your data. The platform is fortified for robust, enterprise-grade security and compliance, including GDPR and HIPAA. All files are secured with encryption in transit and at-rest, and are permanently deleted at the end of the stated file retention period (30 minutes for most plans). For more details, please see our Data Processing Agreement (DPA).

pdfRest can handle data processing under GDPR compliance by processing your data within the European Union and meeting other strict data protection requirements. To ensure full compliance, simply send your API calls to the dedicated EU endpoint at http://eu-api.pdfrest.com/pdf. Note that a GDPR usage fee may apply for some plans. For more details on how we process your data, please review our Data Processing Agreement.

Convert to PDF can create tagged PDFs from supported Microsoft Office and structured-text input. For Office conversion, set tagged_pdf to on.

For Markdown, plain text, JSON, XML, and CSV conversion, tagged output is enabled by default. Use structured_text_options.enable_tagging to explicitly enable or disable it. When this property is supplied, it takes precedence over the top-level tagged_pdf parameter.

For tagged Markdown output, use structured_text_options.markdown.image_alt_text to provide alternate text for mapped images. You can also set missing_image_alt_text to continue with a warning, fail conversion, or mark images without alternate text as artifacts.

Tagged output adds logical document structure that can improve accessibility and downstream processing. It does not by itself guarantee WCAG, PDF/UA, or other accessibility conformance; the accessibility of the source content and the complete PDF workflow still matter.

Integrating pdfRest's Convert to PDF API is straightforward. You can use our comprehensive API documentation and code samples available in many programming languages. The API Lab allows you to test and generate code snippets directly from your browser, simplifying the setup and ensuring a smooth integration experience.

Yes, pdfRest offers two self-hosted options. The pdfRest API Toolkit on AWS allows you to deploy and manage your own backend processing infrastructure within your AWS environment with pay-as-you-go pricing through the AWS Marketplace. Alternatively, the pdfRest API Toolkit Container offers ultimate environmental control as a Docker Container, giving you the flexibility to run the API in on-premises data centers or public/private cloud environments with a flexible, custom licensing model.

Yes, you can convert files to PDF without writing any code by using our API Lab. This online tool allows you to upload files, choose parameters, and send API calls directly from your browser. For an even more convenient workflow, convert files to PDF with pdfAssistant.ai, an AI Assistant that automates PDF tasks. You simply chat in natural language to describe what you want, and the assistant will handle the processing for you.

The Convert to PDF API can convert a web page directly from its URL. Instead of uploading a file, you can send the web page's URL using the url parameter in your API request. This is a powerful feature for automating the archiving of web content or generating PDFs from responsive web designs.

Yes. Convert to PDF accepts an optional .joboptions profile for PostScript and EPS input only. Upload the profile with job_options, or reference a previously uploaded profile with job_options_id.

A .joboptions file contains Adobe Distiller-compatible conversion settings. pdfRest applies a supplied profile with Datalogics PDF Converter SDK, maintained in partnership with Adobe using the same Adobe technology that powers Distiller.

The profile must be readable, non-empty, no larger than 5 MB, and valid for conversion. Do not send both job_options and job_options_id in the same request. When neither is supplied, pdfRest uses its standard PostScript and EPS conversion settings.

When converting HTML from a file or URL, you have granular control over the output. You can use parameters to set the page size, page margin, and page orientation. Additionally, for web pages with responsive designs, you can set the web layout to desktop, tablet, or mobile to ensure the correct rendering of the content in the output PDF.

Yes, for Excel file conversions, the API includes a locale parameter. This parameter allows you to specify a UTF-8 Locale, such as US or Germany. Using this ensures that regional numerical and monetary values, as well as date and time formats, are correctly displayed in the final PDF document.

Yes. Convert to PDF supports Markdown, plain text, JSON, XML, and CSV input files. The API determines the input type from the submitted file extension, then uses the optional structured_text_options JSON object to control the resulting PDF.

Markdown can include headings, emphasis, links, lists, code blocks, tables, and images. CSV files can be rendered as formatted tables. JSON and XML can be presented as source syntax or as readable hierarchy views. Plain text can be reflowed into readable paragraphs or rendered while preserving source line breaks.

You can also configure page size, margins, orientation, fonts, colors, heading styles, table borders, fills, padding, and alternating row colors.

Yes. Markdown images can use supported public HTTPS image URLs, images uploaded with the same multipart request, or existing pdfRest image resource IDs.

For uploaded or existing image resources, map each Markdown image target through structured_text_options.markdown.image_sources. Uploaded images use a zero-based upload_index, while existing resources use a zero-based image_id_index.

When tagged output is enabled, you can provide alternate text for Markdown images through structured_text_options.markdown.image_alt_text. You can also choose whether images without alternate text should generate a warning, fail conversion, or be treated as artifacts.

Yes. The structured_text_options parameter lets you customize PDF generation from Markdown, plain text, JSON, XML, and CSV files.

For Markdown and CSV tables, you can configure relative column widths, header handling, repeated headers on overflow pages, borders, border thickness, colors, header and row fills, alternating row colors, cell padding, and column alignment. You can also set document fonts, fallback fonts, text size, text color, heading scale, page size, orientation, and margins.

This makes Convert to PDF useful for application-generated reports, data exports, summaries, and other structured-content workflows in addition to traditional file conversion.

Generate a self-service API Key now!
Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.