Skip to content

Add email, PostScript, and refry endpoint examples - #133

Merged
datalogics-jacksonm merged 5 commits into
pdfrest:mainfrom
datalogics-erics:add-email-postscript-refry-examples
Sep 2, 2026
Merged

Add email, PostScript, and refry endpoint examples#133
datalogics-jacksonm merged 5 commits into
pdfrest:mainfrom
datalogics-erics:add-email-postscript-refry-examples

Conversation

@datalogics-erics

Copy link
Copy Markdown
Contributor

Why this change

Developers need practical, language-specific examples for converting email and
PostScript content to PDF, generating PostScript from PDF, and combining the
two operations into a PDF refrying workflow. These examples make the supported
request patterns and conversion options easier to adopt without changing the
API itself.

What changed

This adds JSON and multipart endpoint examples for Email-to-PDF,
PDF-to-PostScript, and PostScript-to-PDF in C#, Java, JavaScript, PHP, Python,
and cURL. The PostScript-to-PDF examples include an optional Adobe
Distiller-compatible .joboptions profile. A complex workflow example in each
language demonstrates the PDF -> PostScript -> PDF roundtrip and downloads the
final PDF.

The .NET dispatcher and usage help expose the new .NET examples alongside the
existing sample commands.

Why not split further: the feature commits are organized by conversion
capability, and each language needs a corresponding example set so developers
can find equivalent request patterns in their preferred language.

Behavior changes

The repository gains new opt-in examples only; existing samples and API
behavior are unchanged. The refry examples explain that the roundtrip is
intentionally lossy and may remove PDF-specific features such as tags, forms,
layers, annotations, transparency, metadata, and editability.

Validation

Validated all 42 new examples against the production API: JSON and multipart
Email-to-PDF, PDF-to-PostScript, and PostScript-to-PDF calls in all six
languages, plus each language's refry workflow. The six generated refry PDFs
passed qpdf --check.

Also verified the .NET project builds successfully and performed syntax or
package validation for the remaining language samples.

Risks and follow-ups

These are illustrative samples and use placeholder API keys and local file
paths that developers replace for their own environment. Refrying should be
used only when a workflow accepts its intentionally lossy conversion model.

- Add JSON and multipart Email-to-PDF examples for C#, Java,
  JavaScript, PHP, Python, and cURL.
- Show both resource-ID and direct-upload request patterns so developers
  can choose the approach that fits their workflow.

Assisted-by: Codex
- Add JSON and multipart PDF-to-PostScript examples for C#, Java,
  JavaScript, PHP, Python, and cURL.
- Demonstrate Level 3 output and commonly used page, scaling, and
  annotation settings.

Assisted-by: Codex
- Add JSON and multipart PostScript-to-PDF examples for C#, Java,
  JavaScript, PHP, Python, and cURL.
- Include a Distiller-compatible .joboptions profile in each workflow
  to demonstrate supported conversion settings.

Assisted-by: Codex
- Add PDF-to-PostScript-to-PDF examples for C#, Java, JavaScript,
  PHP, Python, and cURL.
- Document the intentionally lossy roundtrip and its print and
  prepress use cases.

Assisted-by: Codex
- Expose Email-to-PDF, PostScript conversion, and refry commands in
  the .NET sample dispatcher and its usage help.

Assisted-by: Codex
@datalogics-jacksonm
datalogics-jacksonm merged commit d26cc7d into pdfrest:main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants