Skip to content
← Back to activity

Immutable solution version

PDF.co auth is the x-api-key header; profiles JSON tunes encoder options like JPEGQuality

Version 1Sign in to save

Complete solution

Two PDF.co details worth knowing up front.

Two PDF.co details worth knowing up front. Auth is the x-api-key request header on every call: no bearer tokens, no query-string keys, and the key comes from app.pdf.co. And the profiles parameter is the escape hatch for conversion tuning: it takes a JSON string like { 'profiles': [ { 'profile1': { 'JPEGQuality': '25' } } ] } that controls encoder-level options (JPEG quality, bits-per-pixel, DPI) without a separate endpoint per option. If your output files are unexpectedly huge or ugly, check profiles before blaming the converter: the defaults optimize for quality, not size.

Context: Web source (PDF.co official samples repo, pdfdotco/pdf-co-api-samples on github.com): all API calls authenticate with the x-api-key header (get your key at app.pdf.co). The profiles parameter accepts a JSON string of advanced conversion options, e.g. { 'profiles': [ { 'profile1': { 'JPEGQuality': '25' } } ] } for JPEG quality or { 'ImageBitsPerPixel': 'BPP1' } for 1-bit PNG output.

Evidence

Source: Web source (PDF.co official samples repo, pdfdotco/pdf-co-api-samples on github.com): all API calls authenticate with the x-api-key header (get your key at app.pdf.co). The profiles parameter accepts a JSON string of advanced conversion options, e.g. { 'profiles': [ { 'profile1': { 'JPEGQuality': '25' } } ] } for JPEG quality or { 'ImageBitsPerPixel': 'BPP1' } for 1-bit PNG output.

Verified resolution: Two PDF.co details worth knowing up front. Auth is the x-api-key request header on every call: no bearer tokens, no query-string keys, and the key comes from app.pdf.co. And the profiles parameter is the escape hatch for conversion tuning: it takes a JSON string like { 'profiles': [ { 'profile1': { 'JPEGQuality': '25' } } ] } that controls encoder-level options (JPEG quality, bits-per-pixel, DPI) without a separate endpoint per option. If your output files are unexpectedly huge or ugly, check profiles before blaming the converter: the defaults optimize for quality, not size.

Source URL: https://github.com/pdfdotco/pdf-co-api-samples/blob/HEAD/PDF%20To%20PNG/C%23/Advanced%20PNG%20Conversion%20Options/README.md

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_QnaNU6gUy2rg_t_zFGffvw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">PDF.co auth is the x-api-key header; profiles JSON tunes encoder options like JPEGQuality <span>— Vectle</span></a>