ScreenshotNeo

BlogHow-to

How to Convert a Google Doc to PNG

Google Docs cannot export directly to PNG. Save the document as a PDF, then rasterize each page with a PDF-to-image tool.

By the ScreenshotNeo team1 October 20267 min read

Google Docs has no native document-to-PNG download. Export the document as a PDF, then convert the PDF pages to PNG with a local PDF application, image library or conversion service. This preserves the page layout more reliably than a screen capture.

If you only need a picture embedded in the document, extract that image instead of rasterizing every page. If a quick visual reference is enough, capture the rendered page on screen, but expect quality to depend on your display and capture tool.

1. Convert a Google Doc to PNG on a computer

  1. Open the document in Google Docs.
  2. Choose File > Print.
  3. In Chrome, set the destination to Save as PDF, then click Save. Google specifically documents this route for large Docs files.
  4. Open the saved PDF in a PDF application that can export pages as PNG.
  5. Choose all pages or a page range, select PNG, set the resolution if available, and export.

Google also provides File > Download > PDF Document (.pdf) when that option is shown. The downloaded PDF still requires a separate PNG rasterization step.

Google’s instructions for the download and print menus are in Google Docs Editors Help.

2. Choose the right output for your goal

Goal Best workflow Why
Turn every document page into an image Google Doc → PDF → PNG Maintains page dimensions, fonts and layout more consistently than a screen capture.
Save one picture that is inside the Doc Extract the embedded image Preserves the original image instead of reducing it to page pixels.
Quick visual reference Screenshot the rendered page Fast, but display scaling and one-page-at-a-time capture affect quality.
Automated or repeatable conversion Drive API PDF export → PDF rasterizer Runs without manually opening the editor.

3. Export a Google Doc as PDF with the Drive API

For automation, Google Drive’s files.export endpoint accepts a supported export MIME type. For Google Docs, use application/pdf, then rasterize the returned PDF with a separate library. Google documents that exported content is limited to 10 MB (Drive API download and export guide).

You need OAuth credentials with permission to read the document. Replace DOCUMENT_ID and provide an access token that can read the file.

Python: Drive API export and PNG conversion

import io
import os
import requests
from pdf2image import convert_from_bytes

DOCUMENT_ID = "DOCUMENT_ID"
ACCESS_TOKEN = os.environ["GOOGLE_ACCESS_TOKEN"]

pdf_response = requests.get(
    f"https://www.googleapis.com/drive/v3/files/{DOCUMENT_ID}/export",
    params={"mimeType": "application/pdf"},
    headers={"Authorization": f"Bearer {ACCESS_TOKEN}"},
    timeout=90,
)
pdf_response.raise_for_status()
pdf_bytes = pdf_response.content

# Choose a resolution appropriate for the use case.
pages = convert_from_bytes(pdf_bytes, dpi=150, fmt="png")
for number, page in enumerate(pages, start=1):
    page.save(f"page-{number}.png", "PNG")

Install the Python packages with pip install requests pdf2image. pdf2image also needs the Poppler command-line tools installed on your operating system. If your PDF exceeds the Drive export limit, reduce the document size or use the manual export flow.

cURL: export the PDF bytes

curl -L \
  -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
  "https://www.googleapis.com/drive/v3/files/DOCUMENT_ID/export?mimeType=application%2Fpdf" \
  -o document.pdf

Convert document.pdf with a local rasterizer. For example, a PDF application can export a selected page range as PNG while allowing you to choose resolution and transparency options.

Node.js: export the PDF bytes

import { writeFile } from "node:fs/promises";

const documentId = process.env.DOCUMENT_ID;
const token = process.env.GOOGLE_ACCESS_TOKEN;
const url = new URL(`https://www.googleapis.com/drive/v3/files/${documentId}/export`);
url.searchParams.set("mimeType", "application/pdf");

const response = await fetch(url, {
  headers: { Authorization: `Bearer ${token}` }
});
if (!response.ok) {
  throw new Error(`Drive export failed: ${response.status} ${await response.text()}`);
}
await writeFile("document.pdf", Buffer.from(await response.arrayBuffer()));

Use a PDF rendering package after this step to create one PNG per page. Keep the PDF in memory or write it to a protected temporary directory when documents contain sensitive data.

4. Control PNG quality, dimensions and file size

  • Resolution: Higher DPI creates sharper text and larger files. Around 150 DPI is often sufficient for previews; choose a higher value when the PNG will be printed or heavily zoomed.
  • Page range: Export only the pages you need instead of rasterizing the entire document.
  • Color and transparency: Most document PDFs have an opaque page background. Check your converter’s options if you need transparency.
  • Color mode: Use RGB for general web use and grayscale when color is unnecessary.
  • File naming: Number pages with zero padding, such as page-001.png, so lexical sorting matches document order.
  • Large documents: Process pages in batches if your rasterizer supports it, and avoid holding every full-resolution page in memory at once.

5. Extract an image embedded in a Google Doc

If “convert to PNG” means saving a photograph, chart or illustration placed inside the Doc, whole-page conversion is unnecessary. Try the editor’s image-copy workflow or export the document to HTML or DOCX and extract the media files. This can preserve the original dimensions and format. A page PNG contains the image after layout, scaling and surrounding text have been rendered.

6. Use a screenshot when layout fidelity is less important

A screenshot captures what the browser displays, not the document’s source. It is suitable for a quick reference or a single visible page. Zoom level, browser chrome, scroll position, font loading and display pixel density can change the result. Long documents require one capture per page or a separate full-page capture tool.

7. Or skip the browser setup

ScreenshotNeo can capture a rendered document URL through one API request. See the ScreenshotNeo API documentation for all options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' }); const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Before capture, ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

8. Troubleshooting

Problem Cause Fix
No PNG option in Google Docs Docs exports documents as PDF, DOCX and other formats; PNG is listed for Google Drawings, not Docs. Export PDF first, then rasterize it.
Print dialog hangs or fails on a large document The browser is rendering a large file. Use Chrome’s Save as PDF destination, or download the PDF from the File menu.
API returns 401 or 403 The token is missing, expired or lacks access to the file. Refresh OAuth credentials and confirm the account can open the document.
API export returns an oversized response Drive export content is limited to 10 MB. Reduce document size or use the manual export path.
PNG text looks blurry The rasterizer used a low DPI or the image was resized afterward. Increase DPI and avoid enlarging the PNG after export.
Only part of the document appears A screenshot captured the viewport rather than all pages. Export to PDF and rasterize each page, or use a full-page capture workflow.
Fonts or spacing differ Fonts were unavailable or the browser had not finished rendering. Use PDF export for layout fidelity and ensure required fonts finish loading before a screenshot.

9. Performance, reliability and privacy

  • Performance: PDF export is usually cheaper in memory than rendering many high-DPI PNGs. Rasterize only required pages and process large jobs in batches.
  • Reliability: The PDF is a stable intermediate artifact. Keep it until PNG output has been checked so you can rerun conversion without exporting the Doc again.
  • Privacy: Local PDF tools keep document contents on your device. Browser-based converters may upload files, so review their data handling before using confidential documents.
  • Cost: Google Docs export itself does not require a PNG-specific download feature. Costs depend on any third-party converter, storage or screenshot service you choose.

10. FAQ

Can I save a Google Doc directly as a PNG?

No documented Google Docs download produces PNG. Use PDF as the intermediate format.

How do I turn every page into an image?

Export the Doc as PDF, then export all PDF pages as PNG at your chosen resolution.

Is PDF or screenshot better?

PDF followed by rasterization is generally more faithful to the document layout. A screenshot is faster for a quick visual reference.

Can the Drive API return PNG?

The documented Docs export flow uses PDF. Request the PDF with files.export, then use a separate rasterization library.

What if I only need a picture from the document?

Extract the embedded image so you retain its original pixels and avoid rendering the entire page.