Skills· Operations & Project Management

    The PDF Workbench

    The PDF Workbench bundles the full range of PDF work into one executable skill with real code execution, from merging and splitting to watermarking, encryption, form filling, and OCR on scanned pages.

    executablestructuring

    Description

    Example scenario

    Ahead of sending a contract package, five separate documents, one scanned attachment and one signed page need to be combined. The PDF Workbench merges every file into a single PDF, makes the scanned attachment searchable through OCR, adds a watermark, and finally protects the document with a password before it is sent.

    Steps

    Every step shows who carries it out: icon, colour and label together indicate whether a person acts, whether it runs automatically, whether a result is produced, or whether an approval is required.

    01Person

    The operation and the PDF file or files involved are named, together with any additional details the operation requires, such as field values, a password, or a language.

    02Automated

    03Automated

    04Result

    05Approval

    Key
    PersonAutomatedResultApproval

    In use

    Task and desired operation (read, merge, split, rotate, watermark, encrypt, fill form, OCR)

    Required

    The PDF file or files involved

    Required

    For forms: the field values to fill in

    Optional

    For encryption: desired user and owner password

    Optional

    For OCR: language of the scanned document, if not German or English

    Optional

    Output

    the processed PDF file, for example merged, split, rotated, watermarked, encrypted, with a filled form, or as a searchable version after OCR, depending on the task with extracted text or extracted tables as an intermediate result.

    Skill Text

    # ROLE
    You are an executable skill for everything related to PDF files. You run with real code execution in Claude Code or in Claude.ai with code execution enabled, not as a plain text prompt. You read and extract text and tables, merge multiple PDFs, split them, rotate pages, add watermarks, create new PDFs, fill in PDF forms, encrypt and decrypt, extract images, and make scanned PDFs searchable through OCR.
    
    # QUICK START
    For most reading tasks, the Python library pypdf is enough: open a file, iterate over the pages, extract text. For more complex tasks, choose the appropriate library from the overview below.
    
    # LIBRARIES AND TOOLS
    
    ## pypdf, for basic operations
    Merging: create a new Writer instance, append all pages from each source file, save them together.
    Splitting: create a separate Writer instance for each page containing exactly that one page, and save each individually.
    Reading metadata: title, author, subject and creator are found in the Reader's metadata object.
    Rotating pages: call the rotate method on the desired page, then add it to the new file.
    Password protection: writer.encrypt with a user and owner password before saving.
    Watermarking: load or generate a watermark page and apply it to each target page with merge_page before saving.
    
    ## pdfplumber, for text and table extraction with layout
    Extract text with the layout preserved page by page using extract_text. Extract tables per page using extract_tables; for structured further processing, convert each table into a pandas DataFrame (first row as column headers), and you can merge several tables into one Excel file.
    
    ## reportlab, for creating new PDFs
    For simple content, the Canvas API is enough (text and line positions in point coordinates, origin at the bottom left). For multi-page documents with running text, use SimpleDocTemplate instead, with a story made of Paragraph, Spacer and PageBreak elements and the standard style sheets.
    
    Critical rule: never use Unicode superscript or subscript characters in reportlab PDFs. The built-in fonts do not contain these glyphs; they render as black boxes. Use the XML markup tags sub and super inside Paragraph objects instead. For text drawn directly on the canvas, adjust font size and position manually instead.
    
    ## Command line tools
    pdftotext extracts plain text, with the layout option to preserve the layout, and with the f and l options for a page range.
    qpdf merges PDFs (empty, pages, then the files), splits by page range, rotates individual pages with the rotate option, and removes passwords with password and decrypt.
    pdftk, where available, offers the same basic operations (cat for merging, burst for splitting, rotate for rotating) in its own syntax.
    
    # COMMON TASKS
    
    ## Extracting text from scanned PDFs
    First convert the pages into images, then run OCR on each image using pytesseract and assemble the recognized text page by page. Requires the pytesseract and pdf2image packages.
    
    ## Adding watermarks
    Load the watermark page, apply it to every page of the target document using merge_page, save the result as a new file.
    
    ## Extracting images
    Use pdfimages from poppler-utils; the tool extracts all embedded images with sequential numbering.
    
    ## Setting password protection
    Add all pages to a new Writer, call encrypt with a user and owner password, save the file encrypted.
    
    # QUICK REFERENCE
    | Task | Preferred tool |
    | --- | --- |
    | Merging PDFs | pypdf |
    | Splitting PDFs | pypdf, one page per file |
    | Extracting text | pdfplumber |
    | Extracting tables | pdfplumber |
    | Creating PDFs | reportlab, Canvas or Platypus |
    | Merging via command line | qpdf |
    | Making scanned PDFs readable via OCR | pytesseract, convert to images first |
    | Filling PDF forms | pdf-lib or pypdf, see the separate form guide |
    
    # LIMITS AND NOTES
    Filling in PDF forms is covered by its own, more detailed guide, which you should consult before starting. A separate reference exists for advanced functions, JavaScript libraries and more detailed examples.
    
    # DEFINITION OF DONE
    [ ] Desired operation carried out with the appropriate tool, not with a mismatched substitute
    [ ] For new PDFs: no Unicode superscript or subscript characters used
    [ ] For forms: the separate form guide followed
    [ ] Result file opened and spot-checked for completeness
    [ ] For OCR: recognized text checked for plausibility, not accepted blindly

    Setup

    Step-by-step guides for ChatGPT, Claude, Copilot Studio and Langdock.

    ChatGPT

    OpenAI

    1. Copy the skill text above using the copy button.
    2. Click your profile picture and select "Skills".
    3. Click "Create skill" and paste the copied text as the instruction.
    4. Adjust inputs, outputs and format where your case requires it.
    5. Save the skill. It is available in all chats from that point on.
    Documentation

    Anthropic

    1. Copy the skill text above using the copy button.
    2. Open claude.ai and go to "Skills" in your profile.
    3. Create a new skill and paste the copied text as the instruction.
    4. The skill works in claude.ai, in Claude Code and through the API.
    5. Available on the Pro, Max, Team and Enterprise plans.
    Documentation

    Microsoft

    1. Copy the skill text above using the copy button.
    2. Open Copilot Studio and create a new agent.
    3. Paste the copied text as the instruction.
    4. Connect knowledge sources and tools where needed.
    5. Publish the agent for yourself or for your organisation.
    Documentation

    1. Copy the skill text above using the copy button.
    2. Open the sidebar and click "Add skill".
    3. Paste the copied text directly as the instruction.
    4. Connect the skill to integrations such as Gmail or Slack where needed.
    5. Save the skill and release it for yourself or your team.
    Documentation

    Implementation

    1. Make sure the execution environment is ready

      The skill needs an environment with real code execution where the Python libraries pypdf, pdfplumber and reportlab, as well as the command line tools qpdf and pdftotext, are available.

    2. Start with a simple operation

      The best way in is a single, manageable task, for example merging two files, to get familiar with the working method and tool choice.

    3. Use it for recurring tasks

      The skill is particularly suited to routine work such as merging receipts on a monthly basis or encrypting contracts before they are sent.

    4. Treat forms and OCR separately

      Complex PDF forms and poorly scanned originals are covered by their own, more detailed guides, which should be consulted before use.

    5. Always spot-check the result

      Before passing a file on, it is worth a quick look at the result, especially for OCR text and filled form fields.

    Last reviewed:

    In the workshop this becomes your method.

    A single prompt becomes a repeatable method. We show that in the workshop From Prompt to Method.

    View workshops

    Related resources

    Browse all resources

    Conversation, not pitch

    Understand first, then decide. We take time for an initial conversation, without sales pressure, without obligation.

    Schedule a call