...
See the new Filestack Workflows 2.0 in action with our sales engineer. Book a Walkthrough
We are aware of the recently disclosed PHP2Shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619) and can confirm Filestack is not impacted by these vulnerabilities.

PDF to Image for Coursework, a Page Your App Can Mark

PDF to image on Filestack renders any page of a handed-in PDF as a PNG, so lecturers mark it in the browser.

Fairmount College, a fictional coursework portal on FilestackOpen
The Fairmount College demo home page: Set the work. Hand it in. Mark it on the page., with lecturer and student buttons.
Page 2 as a PNG for marking
https://cdn.filestackcontent.com/output=format:png,page:2,density:150/resize=width:1600,fit:max/HANDLE
Use case

Fairmount College is a fictional company. It was made up to show how Filestack works in education, so the firm, its people and its figures are invented.

Live Filestack API

What powers it is real. Every upload, page count, page render and marks file in Fairmount College is a real call to the Filestack API.

View source on GitHub

What Is PDF to Image Conversion for Marking?

PDF to image conversion turns one page of a PDF into a picture a browser can draw on. Filestack renders any page of a stored PDF as a PNG when your app asks for it by URL, the lecturer marks it on a canvas, and the marks save to Filestack as their own transparent file.

Two Ways to Mark a Handed-In PDF

Download and annotate

  1. DownloadA copy on the lecturer's disk
  2. Desktop editorMarks written into the file
  3. Re-uploadA second version to track

Mark the page image

  1. Page as PNGRendered by URL
  2. CanvasMarks drawn in the browser
  3. Marks fileSaved on its own handle
Hand-in
The picker, from the device, a link, Google Drive, Dropbox or OneDrive
Page count
pdfinfo returns the pages, paper size and encryption of a stored PDF
Page image
output=format:png,page:N,density:150 renders one page
Display size
resize=width:1600,fit:max caps the width for the marking screen
Marks
A transparent PNG the size of the page, uploaded with client.upload
Original
The submission keeps the bytes the student uploaded
Plans
Format conversion and resize on every plan. Pricing
Demo source
Fairmount College, a Next.js app. View on GitHub

The Page Is a URL

To convert a PDF page to an image with Filestack, write the page number into an output task in front of the file’s handle. Filestack renders it on the first request and serves it from the edge cache after that, with one stored PDF behind every page.

  1. cdn.filestackcontent.comThe Filestack CDN
  2. output=format:png,page:1,density:150Page 1 as a PNG at 150 DPI
  3. resize=width:1600,fit:maxCapped at 1600 pixels wide
  4. HANDLEThe handed-in PDF
pages
How many page URLs the marking screen offers.
pagesize
The paper and its size in points, for laying the canvas over the page.
encrypted
Whether the PDF is locked, so the app can ask for an open copy.
Sample pdfinfo response
{
  "pages": 2,
  "pagesize": { "paper": "A4", "width": 595.276, "height": 841.89 },
  "encrypted": false,
  "protected": false
}

Inside Fairmount College, a Coursework Portal Built on Filestack

Fairmount College is a demo coursework portal built on Filestack and Next.js. The college is invented and every file call is real: work is handed in through the picker, each page renders as an image, the lecturer marks it, and the marks save as a file.


  1. The picker takes a phone photo, a scan or a PDF from the device, a link, Google Drive, Dropbox or OneDrive, and returns the stored file's handle.


  2. pdfinfo on the stored PDF returns its page count, so the marking screen knows how many pages to offer. The count is cached, since a handle's pages stay fixed.


  3. A PDF page is written into an output task and capped in width; an image is resized. The lecturer draws on a canvas laid over the result.


  4. The canvas exports a transparent PNG the size of the page and uploads it to Filestack. The submission keeps one handle, the marks get another, and the browser stacks the two.

components/file-picker.tsx
const client = await filestackClient();

const picker = client.picker({
  accept,
  maxFiles: 1,
  fromSources: ['local_file_system', 'url', 'googledrive', 'dropbox', 'onedrive'],
  onUploadDone: (response) => setFile(toStoredFile(response.filesUploaded[0])),
});
await picker.open();
lib/filestack.ts
export async function getPdfPageCount(handle) {
  const response = await fetch(cdnUrl(handle, ['pdfinfo']), {
    cache: 'force-cache',
  });
  if (!response.ok) return null;
  const { pages } = await response.json();
  return typeof pages === 'number' && pages > 0 ? pages : null;
}
lib/filestack.ts
export function pageImageUrl(file, page = 1) {
  if (isPdf(file.mimetype)) {
    return cdnUrl(file.handle, [
      `output=format:png,page:${page},density:150`,
      'resize=width:1600,fit:max',
    ]);
  }
  return cdnUrl(file.handle, ['resize=width:1600,fit:max']);
}
components/annotation-editor.tsx
const blob = await new Promise((resolve) => canvas.toBlob(resolve, 'image/png'));
const overlay = await uploadImageBlob(blob, `marks-page-${page}.png`);

// lib/filestack-client.ts
export async function uploadImageBlob(blob, filename) {
  const client = await filestackClient();
  const file = new File([blob], filename, { type: 'image/png' });
  return client.upload(file);
}

What In-Browser Marking Needs Behind Every Page

Marking in the browser needs intake from phones and drives, a PDF renderer, page images at screen size, thumbnails, storage for every mark layer and a CDN. Filestack renders and stores; your app keeps the canvas, the score and the class list.

Build a PDF Renderer

6 parts your team builds and runs
01 An upload endpoint for phones, scans and drives
02 A PDF renderer for each page
03 Page counts for every PDF
04 Resizing for screens and thumbnails
05 Storage for submissions and mark layers
06 A CDN in front of every page image

Ask for the Page by URL

1 URL per page, rendered on the first request
Page 2
https://cdn.filestackcontent.com/output=format:png,page:2,density:150/HANDLE

Your app keeps the canvas, the score and the comments.

Tour the Fairmount College Portal

Hand work in to Fairmount College as a student, then sign in as the lecturer and mark it on the page.

  1. 1

    The portal /

    Choose lecturer or student. Sign-in is emulated, with demo accounts ready.

  2. 2

    A student's assignments /student

    Open an assignment and hand in a photo, a scan or a PDF.

  3. 3

    The lecturer's desk /lecturer

    Hand-ins arrive under each assignment, with a thumbnail of page one.

  4. 4

    Marking /lecturer/submissions/ID

    Draw on the page, enter a score and a comment, and save.

Open Fairmount College in your browser and follow the route, or read the Next.js code it runs.

Fairmount College marking screen
Fairmount College's marking screen: a handed-in PDF page with a drawing toolbar above it and score and comment fields beside it.
Fairmount College's marking screen: the page image from Filestack, the lecturer's tools above it and the score beside it.

Run In-Browser Marking in Production

In production, submissions sit behind signed URLs, page images are requested as the lecturer turns each page, and every mark layer is stored against its submission and page number.

  • Sign every submission URL

    Policies scope a file to a user, a session or an expiry.

  • One mark layer per page

    Store the overlay's handle against the submission and the page number.

  • Keep the strokes

    Save the strokes as JSON beside the overlay, so a page can be edited later.

  • Page through by hand

    When pdfinfo is unavailable on the account, the editor lets the lecturer page through by hand.

  • Thumbnails from page one

    output at density 72, cropped square, for list rows.

  • Straighten phone photos

    Transformations UI crops a photo of a handwritten page before the upload, as a marketplace add-on.

marked-page.html
<div class="page">
  <img src="https://cdn.filestackcontent.com/output=format:png,page:1,density:150/resize=width:1600,fit:max/SUBMISSION_HANDLE"
       alt="Page 1 of the submission" />
  <img class="marks" src="https://cdn.filestackcontent.com/MARKS_HANDLE"
       alt="The lecturer's marks on page 1" />
</div>
Sample file sizes behind one marked page, in KB
{
  "submission_png": 179,
  "page_for_marking_png": 194,
  "marks_layer_png": 69,
  "list_thumbnail": 1.8
}

Ways to Mark Student Work Compared

Filestack page images let lecturers mark in your own app while the student’s file stays as uploaded. A desktop PDF editor writes marks into a downloaded copy, and an LMS annotation tool marks work inside the LMS.

Desktop PDF editorLMS annotation toolFilestack page images
Where marking happensThe lecturer's computerInside the LMSYour app, in the browser
The student's fileA marked copy replaces itStored by the LMSKept as uploaded, marks on their own handle
Phone photos and scansConverted by handSet by the LMSPhotos, scans and PDFs through one picker
Pages on a phoneThe full PDFThe LMS viewerA page image at the width you request
TurnaroundDownload, mark, uploadInside the LMSMark and save on one screen

An LMS annotation tool suits a course that runs entirely inside one LMS.

Page-Image Marking Beyond Coursework

Exam boards, tutoring platforms, legal teams and architects mark up documents in the browser, and each takes the same page image and mark layer.

Exam script marking

Mark each scanned page and keep the script as written.

  • output
  • resize

Tutoring feedback

Return a student's worksheet with the tutor's marks on it.

  • output

Contract redlines

Mark clauses on the page and keep the signed original.

  • output
  • preview

Drawing markups

Circle a detail on a drawing sheet for the site team.

  • output
  • rotate

Form review

Check a scanned form behind a signed link.

  • output
  • security

Proofreading

Mark corrections on a typeset page for the author.

  • output

Turn any page of any PDF into an image your app can mark.

  • SOC 2 compliant
  • Most teams ship their first upload within minutes
  • Trusted by 100,000+ applications

PDF to Image for Coursework FAQs

How do I convert a PDF page to an image?

Write the page into an output task in the CDN URL, such as output=format:png,page:2,density:150, in front of the file’s handle. Filestack renders that page as a PNG on the first request and caches it at the edge.

Can students hand in work from a phone?

Yes. The picker uploads photos, scans and PDFs from a phone or a laptop, and it also reaches Google Drive, Dropbox and OneDrive. Uploads are chunked and resumable, so a large scan survives a weak connection.

Does marking change the student's original file?

The original stays as uploaded. Marks are drawn on a canvas over the page image and saved to Filestack as a separate transparent PNG, and the browser stacks the two, so a mark can be cleared or redrawn later.

How many pages can one submission have?

The page count comes from pdfinfo on the stored PDF. The app requests and saves each page separately, so a multi-page document is marked one page at a time.

How is student work kept private?

Signed URLs and access policies scope a file to a user, a session or an expiry. Filestack’s published compliance is SOC 2; institutions that need FERPA, COPPA or HIPAA terms in the contract request them through Filestack.

Does this work with an LMS like Canvas or Moodle?

Filestack is an HTTP API with SDKs, called from your own code, including code an LMS integration runs. The demo is a standalone app. Filestack for EdTech covers integration across a platform.

Is Fairmount College a real company or a Filestack customer?

Fairmount College is a fictional college, created to show how Filestack works in education. The college, its people and its figures are invented, and the demo runs on the real Filestack API.

Can I see the code behind the Fairmount College demo?

Yes. Fairmount College is open source on GitHub in the filestack-use-cases repository, under apps/fs-education. It is a Next.js app with the picker, the page renderer, the marking editor and the overlay upload.