Skip to main content

PDF Reader

Documents skill, available on Zeplik

PDF Reader is a ready-to-run documents skill on Zeplik. You apply it in the sandbox and never hand the user a script. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.

The PDF Reader skill loads automatically when your request matches it, or you can invoke it directly by typing /view-pdf in any chat. It works with attachments, connectors, and any model that supports the task, so you get the same expert method every time without setting anything up.

What the PDF Reader skill can do

Try these prompts on Zeplik

Pick a prompt to open it in the Zeplik app. If you are not signed in yet, your prompt is waiting for you the moment you do.

How the PDF Reader skill works

PDF Markup (perform, do not advise)

You APPLY the markup yourself. Every PDF the user uploaded in this conversation is already staged in the sandbox working directory under its (sanitized) filename: characters outside A-Za-z0-9._- become _, so Lease (final).pdf is staged as Lease__final_.pdf. List the directory if unsure:

import os; print(sorted(os.listdir(".")))

The canonical workflow for EVERY markup job:

  1. Find the target text or region - search the text layer rather than guessing coordinates.
  2. Apply the annotation with code_execution (python) using pymupdf (fitz); pikepdf, pypdf, reportlab and Pillow are also preinstalled.
  3. Render the affected pages to PNG and look at them - confirm the markup landed on the right text and nothing important is covered.
  4. export_file the annotated PDF to hand the user a download card.

The sandbox has NO internet: never try pip install; everything you need is preinstalled. Never paste a script for the user to run locally.

There is no live viewer the user can scroll and click. Do not promise one. What you can give them is the marked-up PDF plus page-preview images - which is usually what they actually wanted.

Step 1 - Find the target

Search the text layer; it returns a rect per hit, which is exactly what the annotation calls take:

import fitz
doc = fitz.open("contract.pdf")
for page in doc:
    hits = page.search_for("payment terms")
    if hits: print("page", page.number + 1, hits)

Nothing found on any page usually means one of two things. Either the wording differs - search a shorter distinctive fragment, and check page.get_text() to see what is actually written. Or the PDF is a scan with no text layer, in which case tell the user you can stamp, sign and redact by region but cannot auto-locate phrases, and ask which page/area they mean (or OCR it first via pdf-processing).

Step 2 - Apply the markup

Highlight, underline, strike through

import fitz
doc = fitz.open("contract.pdf")
page = doc[2]
for r in page.search_for("net 30 days"):
    a = page.add_highlight_annot(r)
    a.set_colors(stroke=(1, 0.92, 0.23))     # yellow
    a.set_info(content="Payment window")      # shows on hover
    a.update()
doc.save("contract_marked.pdf")

add_underline_annot(r) and add_strikeout_annot(r) take the same rects.

Sticky note / visible callout

page.add_text_annot(fitz.Point(72, 300), "Confirm this clause with legal")
a = page.add_freetext_annot(fitz.Rect(72, 320, 300, 360),
                            "Renewal is automatic - flag it",
                            fontsize=10, text_color=(0.7, 0, 0))
a.update()

A text_annot is a collapsed pin the reader clicks; a freetext_annot is printed on the page. Use freetext when the user wants the comment visible in the exported file.

Stamp / watermark across the page

import fitz
page = doc[0]
tw = fitz.TextWriter(page.rect, color=(0.75, 0, 0))
tw.append(fitz.Point(110, 520), "CONFIDENTIAL",
          font=fitz.Font("hebo"), fontsize=52)
tw.write_text(page, morph=(fitz.Point(306, 396), fitz.Matrix(45)), opacity=0.3)

fitz.Matrix(45) is a 45-degree rotation about the pivot point (the page centre for US Letter). Keep opacity around 0.3 so the text underneath stays readable. To stamp every page, loop for page in doc: and rebuild the TextWriter per page.

Signature or initials image

page = doc[2]
rect = fitz.Rect(90, 640, 260, 690)          # x0, y0, x1, y1 in points
page.insert_image(rect, filename="signature.png", keep_proportion=True,
                  overlay=True)

Anchor it to the printed signature line instead of guessing:

line = page.search_for("Signature")[0]
rect = fitz.Rect(line.x1 + 10, line.y1 - 34, line.x1 + 190, line.y1 + 2)

A transparent PNG looks right; a JPEG paints a white box over the line. If the user's image has a white background, drop it with Pillow before inserting.

This is a visual signature image, not a certified or cryptographic digital signature. Say that in your reply every time you place one. Only place one if the user supplied the image and asked you to.

Redact (genuinely removes the text)

for r in page.search_for("4111 1111 1111 1111"):
    page.add_redact_annot(r, fill=(0, 0, 0))
page.apply_redactions()
doc.save("contract_redacted.pdf")

apply_redactions() deletes the underlying characters, which a black rectangle drawn on top does not - always use redaction annotations for anything actually sensitive, and re-extract the text afterwards to prove it is gone:

assert "4111" not in doc[page.number].get_text()

Step 3 - Verify before you deliver

import fitz
out = fitz.open("contract_marked.pdf")
for n in (2,):                                   # the pages you touched
    print(n + 1, "annots:", [a.type[1] for a in out[n].annots()])
    out[n].get_pixmap(dpi=150).save(f"check{n+1}.png")

Look at each check*.png. The highlight must cover the phrase and not the line above it; the signature must sit on the line, not through it; a stamp must not obscure a figure or a clause. Adjust and re-run until it is right.

Step 4 - Deliver

export_file the annotated PDF, then say in chat:

  • what you marked and on which page, in a short list
  • anything you could not locate, and what you need from the user to place it
  • for a signature: that it is a visual image, not a certified signature
  • for a redaction: that the text was removed from the file, not just covered

If the user is reviewing rather than distributing, export_file a page preview PNG alongside the PDF so they can see the result without opening anything.

Out of scope

  • Summarizing or extracting the PDF's contents - that is pdf-processing.
  • Filling in form fields - that is pdf-forms.
  • Certified/cryptographic digital signatures - image placement only.
  • A clickable in-app viewer - it does not exist. Deliver the marked-up file and page previews instead, and never describe a viewer the user cannot open.

Zeplik output presentation

Present the final deliverable as a single polished artifact: clear headings, tables where the content is tabular, fenced code where it is code. Lead with the deliverable itself; keep process commentary to a single short line. If the skill produced multiple files or sections, end with a compact list of them with one-line purposes.

How to use the PDF Reader skill

  1. Sign in to Zeplik

    Create a free Zeplik account or sign in. New accounts start with free credits, so you can try the PDF Reader skill right away.

  2. Describe your documents task

    Ask in plain language, or type /view-pdf to invoke the skill directly. Zeplik recognizes the PDF Reader skill and applies its method.

  3. Review and refine the result

    Zeplik returns a clear, structured answer. Ask follow-ups in the same chat to refine it or take the next step.

Source and credit

Author
zeplik (operational rewrite; originally adapted from anthropics/knowledge-work-plugins, Apache-2.0)
License
Apache-2.0

Adapted from the open-source anthropics/knowledge-work-plugins project and tuned to run natively on Zeplik. View source on GitHub.

Frequently asked questions

What is the PDF Reader skill?
PDF Reader is a ready-to-run documents skill on Zeplik. You apply it in the sandbox and never hand the user a script. Ask in plain language and Zeplik applies the skill's method for you inside the conversation, on whichever AI model you prefer.
How do I use PDF Reader on Zeplik?
Sign in to Zeplik and ask in plain language, or type /view-pdf in any chat to invoke it directly. The skill applies its method and returns a result you can refine in the same conversation.
Which AI model does the PDF Reader skill use?
Any model you choose. Zeplik works across every model in one chat, so the PDF Reader skill runs on your preferred model for the task.
Where does the PDF Reader skill come from?
The PDF Reader skill is adapted from the open-source anthropics/knowledge-work-plugins project (Apache-2.0) and tuned to run natively on Zeplik. The original source is linked on this page.
How much does the PDF Reader skill cost?
Using the skill is free to start. You only spend Zeplik credits when the assistant runs, and new accounts begin with free credits.

Related documents skills

More on Zeplik

Try PDF Reader on Zeplik

Every model, one chat. Bring the PDF Reader skill into your next conversation and let the assistant do the work.

Browse all skills
PDF Reader - Documents skill for Zeplik AI | Zeplik Chat