ScreenshotNeo

BlogHTML to image & PDF

How to troubleshoot PDFCrowd PDFs that have blank pages or clipped content

Fix PDFCrowd blank pages and clipped content by checking page geometry, content fitting, print CSS, pagination, and header or footer space.

By the ScreenshotNeo team4 October 20268 min read

To troubleshoot blank pages or clipped content in a PDFCrowd PDF, check three things in order: the PDF page geometry (size, orientation, margins), how the webpage is fitted to that page (content viewport width and fit mode), and how the source content flows across page breaks. Check header and footer space separately because their reserved heights are added to the page margins.

Start by identifying whether the problem affects the main content, a header or footer, or one wide component. Change one setting at a time and compare the resulting page count, legibility, and layout. PDFCrowd’s controls and available values can depend on converter version, so confirm that your client and converter support an option before relying on it. PDFCrowd FAQ · HTTP API reference

1. Check page size, orientation, and margins

First determine whether the content is being cut off at the physical edge of the PDF page. Verify the requested paper size, portrait or landscape orientation, and each margin. The PDFCrowd HTTP reference lists A4 and 0.4in individual margins as defaults; those are reference defaults, not necessarily the right geometry for your document.

Increase the margin on the clipped side if content is too close to the edge. If the document is wide, test landscape orientation or an appropriate paper size. Remember that changing page size does not choose the responsive layout of the source webpage. A page can still render at a narrow, mobile-like width or overflow horizontally even when the PDF sheet is large.

2. Fix wide or unexpectedly responsive content

When the PDF shows a narrow responsive layout, or the right side of a wide page is missing, adjust the content viewport width. PDFCrowd’s FAQ suggests trying large or a specific width such as 1024px. This controls the width used to lay out the webpage; it is different from the PDF paper width.

If the layout uses the intended desktop width but still does not fit the sheet, test the content fit mode. PDFCrowd suggests smart-scaling as a first value to try for many wide pages. Its reference lists these fit modes:

  • auto
  • smart-scaling
  • no-scaling
  • viewport-width
  • content-width
  • single-page
  • single-page-ratio

Fit modes can change content size and page composition. Check that the result remains readable and has an acceptable page count. no-scaling can leave content cut off if it exceeds the page boundaries. Use scale_factor only for a small size adjustment after the layout is otherwise correct; it is not a substitute for choosing a suitable viewport or fit mode. PDFCrowd’s reference says content fit modes are available with converters version 24.04 and later.

3. Remove unwanted blank pages

Choose blank-page removal based on where the empty pages occur and whether blank separators are intentional:

Value Behavior Use when
none Removes no blank pages. Blank pages are intentional or should be inspected without cleanup.
trailing Removes blank pages at the end. Only the final pages are unwanted.
all Removes blank pages throughout the document. Unwanted empty pages occur between content pages as well as at the end.

The API reference says this option is available for converters version 20.10 and later. Before using all, check whether internal blank pages are deliberate—for example, a document may use them as section separators.

If blank pages remain, inspect the source document and PDF-specific CSS for large vertical gaps, fixed-height sections, and page-break rules. A section whose height nearly fills a page can push following content onto a new page. When a stylesheet change should affect only the PDF, use conversion-specific CSS if your PDFCrowd workflow supports it.

4. Review page-break rules and complex layouts

Print page-break CSS can start an element on a new page or help keep an element together, but PDFCrowd warns that page-break rules may not work as expected inside complex layouts. If a break behaves strangely, simplify the affected section’s PDF layout. In particular, try removing flexbox or grid from that section in the conversion-specific styling, then check pagination again.

A useful diagnostic sequence is:

  1. Temporarily remove custom page-break rules from the affected section.
  2. Check for fixed heights, large margins, padding, or empty elements that add vertical space.
  3. Try a simpler block layout for the affected flexbox or grid section.
  4. Reintroduce page-break rules one at a time and inspect where the next page starts.

If the desired output is one continuous page rather than a printable, paginated document, PDFCrowd documents setting page_height=-1 to expand the page vertically. This avoids conventional page breaks by creating a single tall page. It is not a general fix for ordinary documents intended to print on standard sheets.

5. Check print media and print styles

If the website has a print stylesheet that produces a good document layout, enable PDFCrowd’s Use Print Media option so the converter uses print CSS. If that stylesheet hides content needed in the PDF, leave the option disabled and adjust the viewport, fit mode, margins, or conversion-specific CSS instead. Compare the output with the source page to find whether the missing material is being hidden by CSS or clipped during fitting.

6. Diagnose clipped headers, footers, and logos separately

Header and footer clipping has its own geometry. PDFCrowd explains that header and footer heights are added to the margins and reserve space for those elements. The reserved area does not automatically expand if the template’s text, logo, borders, padding, or image is taller than the configured height.

  • If header content is clipped, increase the header height or reduce the header template’s dimensions.
  • If footer content is clipped, increase the footer height or reduce the footer template’s dimensions.
  • Account for the reserved header and footer areas when assessing how much space remains for the main content.
  • If a URL-based image or template is missing, check that the converter can reach the URL and that its response contains the expected image or HTML.
  • If template styling differs from the document, include the required CSS in the header or footer template; the main document’s styles do not automatically carry over.

7. A practical troubleshooting checklist

  1. Locate the defect: main content, a wide component, header, or footer?
  2. Check page geometry: paper size, orientation, and the margin on the affected edge.
  3. Check webpage layout width: try a larger content viewport such as large or 1024px if the page is unexpectedly responsive.
  4. Check fitting: try smart-scaling for wide content; treat scale_factor as a later fine adjustment.
  5. Check blank-page policy: use trailing for final blanks or all for internal blanks, if supported and appropriate.
  6. Inspect flow: look for oversized spacing, fixed-height blocks, and page-break rules; simplify a complex flexbox or grid section if needed.
  7. Check print CSS: enable print media only if the print stylesheet retains the content you need.
  8. Check header and footer reservations: adjust their configured heights or template dimensions independently of the main content.
  9. Change one variable at a time: record the settings and compare clipping, readability, and page count.

8. Common symptoms and fixes

Symptom Likely cause What to try
The right side of a wide page is cut off. The content viewport is too narrow or content exceeds the page boundary without suitable fitting. Set a wider content viewport, then try smart-scaling. Confirm that the scaled result is legible.
The PDF uses a mobile layout even though the page is wide. The source webpage is being laid out at a narrow content viewport. Try large or an explicit width such as 1024px.
Blank pages appear at the end. Trailing blank pages are not being removed, or the content flow creates an extra page. Try blank-page removal set to trailing; inspect extra spacing and fixed heights if a page remains.
Blank pages appear inside the document. An internal page break, layout behavior, or intentional blank separator may be involved. Check whether separators are intentional; if not, try all and inspect page-break CSS and complex layouts.
Text or a logo is clipped in the header or footer. The reserved header or footer height is smaller than its template content. Increase that reserved height or reduce the template’s content dimensions.
The header image is missing. The converter cannot reach the template URL, or the response does not contain the expected image or HTML. Check URL reachability from the converter and verify the response content.
Header or footer styling is missing. The main document’s CSS is not included in the separate template. Add the necessary CSS to the header or footer template.
Page-break CSS is ignored or produces unexpected breaks. The rules may be interacting with a complex layout. Simplify the affected PDF layout, including replacing flexbox or grid in that section, and retest.

9. Performance, reliability, and cost considerations

Use the smallest change that addresses the observed defect, then compare the produced PDF at its intended reading size and page format. Aggressive fitting can reduce page count while making text too small; a larger viewport can restore the intended layout but may make the content wider relative to the paper. Blank-page removal can clean output, but removing all blanks may also remove intentional separators. These are output tradeoffs to evaluate against the document’s purpose.

For repeatable generation, keep a record of the page size, orientation, margins, viewport, fit mode, blank-page policy, print-media choice, and header/footer heights used for each document type. Confirm option support against the converter version documented for that setting. This helps distinguish a source CSS change from a conversion-configuration change when a previously stable PDF shifts.

Or skip the browser setup

If your next step is capturing a webpage as an image or PDF and you do not want to manage browser rendering setup, ScreenshotNeo provides a website screenshot API and MCP server. Its PDF options include paper size, margins, landscape, and page ranges. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

# Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

// Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Get 1,000 free screenshots a month with no card.

FAQ

Should I use smart-scaling or no-scaling?

For wide content that does not fit, PDFCrowd’s FAQ suggests trying smart-scaling. no-scaling may leave content cut off at page boundaries. Check the result’s readability and page composition.

Will a larger PDF page fix a mobile-looking layout?

Not necessarily. Paper size and content viewport width control different things. Set the webpage viewport to the intended layout width, then assess how that layout fits the paper.

When should I use page_height=-1?

Use it when a single vertically expanding page is the intended output. It is not intended as a general solution for a regular printable PDF.

Why is the header clipped when the body fits?

Header and footer templates use separately reserved heights. Increase the relevant height or reduce the template dimensions, and include any CSS the template needs.