logo

Development Preview Mode

Development preview mode is a feature that allows you to preview PDF generation in real-time during development. When you specify preview: true in your API request, the generated PDF will be displayed in the preview screen of your dashboard.

Features

  • Real-time Preview: Generated PDFs are instantly reflected in the preview screen
  • Free for Development: API requests with preview: true are not counted towards your usage quota

How to Use

  1. Open Dashboard > Preview.

  2. Specify preview: true in your API request.

curl -X POST 'https://api.pdfg.net/v1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{"html": "<h1>Hello World</h1>", "preview": true}'
  1. The generated PDF will be instantly reflected in the preview screen.

Preview

PDFs generated in preview mode will display a "pdfg.net preview" watermark, but this will not appear in actual PDF output.

Preview Settings

You can customize how PDFs are displayed using the settings icon in the top-right corner of the preview screen.

Preview Settings

OptionDescriptionSupported BrowsersValues
ToolbarShow or hide the PDF viewer toolbarChromeHide, Show
ViewAdjust zoom level to fit the screenChromeFitV: Fit vertically, FitH: Fit horizontally, Fit: Fit both
ZoomSpecify zoom level as a percentageChrome, FirefoxNumber (e.g., 100)
PageSpecify the initial page to displayChrome, Firefox, SafariPage number (e.g., 1)

These settings are particularly useful in scenarios such as:

  • Checking specific pages while editing multi-page PDFs
  • Optimizing layout verification by adjusting display size

Settings are saved per project and persist even after closing the browser.