ReflowPDF API api.reflowpdf.com/v1

    PDF/UA, PDF/A, PDF/X

    Accessible, archival and print-ready files: the engine writes what a claim requires and keeps it, or refuses it with the reason.

    curl https://api.reflowpdf.com/v1/pdf \
      -H "Authorization: Bearer $REFLOWPDF_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"html": "…", "options": {"pdf_a": "3a", "pdf_x": {"output_intent": "FOGRA39"}}}' -o print-and-archive.pdf

    What each claims#

    OptionStandardPDFForPlans
    pdf_ua: 1PDF/UA-1 (ISO 14289-1)1.7Accessibility: the structure in reading order, headings, lists, tables with their headers, alternative texts, the language and the title. Every tagged PDF is written to it.all
    pdf_ua: 2PDF/UA-2 (ISO 14289-2)2.0The same on PDF 2.0, with its structure namespaces.Pro, Max
    pdf_a: "3a"PDF/A-3a (ISO 19005-3, level A)1.7Archiving: every font embedded, colour defined by an output intent, XMP metadata, tagged (with PDF/UA-1); attachments as associated files.Pro, Max
    pdf_a: "1b"PDF/A-1b (ISO 19005-1, level B)1.4Archives that accept only PDF/A-1: transparency flattened to opaque images, text kept selectable and searchable.Pro, Max
    pdf_x: { standard: "x-4" }PDF/X-4 (ISO 15930-7)1.6Print: the press's characterization as the output intent, trim and bleed boxes, every font embedded; transparency and RGB kept for the press to convert.Pro, Max
    pdf_x: { standard: "x-1a" }PDF/X-1a:2003 (ISO 15930-4)1.4Presses that take only X-1a: all colour converted to the condition's CMYK inks, transparency flattened.Pro, Max

    Check a file yourself with veraPDF, the PDF Association's reference validator for PDF/UA and PDF/A. The engine is developed against it.

    Which go together#

    TogetherAllowedWhy
    pdf_ua: 1 with pdf_a or pdf_xyesPDF/UA-1 is tagging; it holds in any of them. pdf_a: "3a" carries it.
    pdf_a: "3a" + pdf_x X-4yesOne PDF 1.6 file, archival and print-ready.
    pdf_a: "1b" + pdf_x X-1ayesBoth PDF 1.4, without transparency.
    pdf_a: "1b" + pdf_x X-4noPDF/X-4 keeps transparency; PDF/A-1 allows none.
    pdf_a: "3a" + pdf_x X-1anoPDF/A-3 is PDF 1.7, PDF/X-1a PDF 1.4.
    pdf_ua: 2 + pdf_a or pdf_xnoPDF/UA-2 is PDF 2.0; neither is.
    encryption + pdf_a or pdf_xnoAn archive or a print file opens without a password.
    attachments + pdf_x or pdf_a: "1b"noTheir standards forbid embedded files.

    A pair that cannot go together is 400 invalid_request, before anything prints.

    A PDF/X file names the press it is made for: its output intent, the ICC characterization of the printing condition (the paper and process) that colours are meant for. Name one the API has:

    curl https://api.reflowpdf.com/v1/output-intents -H "Authorization: Bearer $REFLOWPDF_API_KEY"
    output_intentProfilePrinting
    FOGRA39Coated FOGRA39 (ReflowPDF), built from Fogra's FOGRA39L dataOffset on coated paper, ISO 12647-2:2004: the common condition in Europe
    CGATS21-2-CRPC5CGATS21-2-CRPC5 (ReflowPDF), built from ISO 15339-2 dataTypical publication coated (ISO/PAS 15339-2): the successor of SWOP in North America
    CGATS21-2-CRPC6CGATS21-2-CRPC6 (ReflowPDF), built from ISO 15339-2 dataTypical premium coated (ISO/PAS 15339-2): the condition of GRACoL
    CGATS TR 001U.S. Web Coated (SWOP) v2 (Adobe)Web offset on coated paper, SWOP as of 1993: still named by many North American printers

    Or bring your printer's own: its ICC output profile (class prtr; gray, RGB or CMYK; up to 8 MB) in profile, base64, named by output_intent (the name is written as the file's OutputConditionIdentifier):

    import { readFile } from 'node:fs/promises'
    import { base64 } from '@reflowpdf/sdk'
    
    const pdf = await reflow.pdf.create({ html, options: { pdf_x: {
      standard: 'x-1a', output_intent: 'PSO Coated v3', profile: base64(await readFile('PSOcoated_v3.icc')),
    } } })

    PDF/X-1a prints in process inks only: its condition is a CMYK one.

    When a document cannot keep a claim#

    A claim is kept or refused, never written over a file that breaks it. When the document itself stands in the way, the response is 422 unfulfillable and detail says what:

    {
      "type": "https://api.reflowpdf.com/docs/errors#unfulfillable",
      "title": "Not possible for this document",
      "status": 422,
      "detail": "PDF/X cannot be claimed for this document: the document keeps transparency that flattening could not remove (PDF/X-1a allows none)",
      "code": "unfulfillable",
      "request_id": "req_x7Kq2mVb9TcA3pLw"
    }

    Nothing is counted for it. On a plan without the claim, the response is 403 plan_required.