alphafold2
Predict protein structure for monomers and multimers with AlphaFold2 via the ColabFold runner (Mirdita et al. 2022,…
Use when creating a PDF report, handout, or poster with Python, or when merging, splitting, rotating, watermarking, encrypting, filling forms in, or extracting tables from an existing PDF inside the Notebook. Covers ReportLab layout with embedded Unicode/CJK fonts, pypdf and
Claude Code
$ npx -y skills add aipoch/open-science --skill pdf-generation --agent claude-code
Codex
$ npx skills add aipoch/open-science --skill pdf-generation -a codex -y
Cursor
$ npx skills add aipoch/open-science --skill pdf-generation -a cursor -y
Gemini CLI
$ npx skills add aipoch/open-science --skill pdf-generation -a gemini-cli -y
GitHub Copilot
$ npx skills add aipoch/open-science --skill pdf-generation -a github-copilot -y
OpenCode
$ npx skills add aipoch/open-science --skill pdf-generation -a opencode -y
Windsurf
$ npx skills add aipoch/open-science --skill pdf-generation -a windsurf -y
name: pdf-generation description: Use when creating a PDF report, handout, or poster with Python, or when merging, splitting, rotating, watermarking, encrypting, filling forms in, or extracting tables from an existing PDF inside the Notebook. Covers ReportLab layout with embedded Unicode/CJK fonts, pypdf and pdfplumber processing, page rendering for visual QA, and Artifact delivery. For reading or citing a library paper, prefer read_document, list_pdf_elements, and read_library_pdf. license: Apache-2.0
Create new PDFs with ReportLab. Process existing PDFs with pypdf (pages, metadata, forms, encryption), pdfplumber (text with layout, tables), and pypdfium2 (rendering to images). User requirements for content, page size, and design take precedence over the defaults below.
| Task | Use | | ----------------------------------------------------- | --------------------------------------------------------------------------------------------- | | Read, quote, or summarize a paper or attached PDF | `read_document`, `list_pdf_elements`/`read_pdf_element`, `read_library_pdf`; no code needed | | Create a report or handout | ReportLab Platypus (`SimpleDocTemplate`, `Paragraph`, `Table`, `Image`) | | Precise one-page layouts (poster, certificate, label) | ReportLab `canvas` | | Merge, split, rotate, crop, watermark, encrypt | pypdf | | Extract tables or positioned text | pdfplumber | | Fill a form | `pdf_form_fields` and `fill_pdf_form`, then follow [references/forms.md](references/forms.md) | | Look at pages | `render_pdf_pages` + `host.viewImage` |
Advanced recipes (cropping, bookmarks, links, table styling, pdfplumber settings, OCR, troubleshooting) are in [references/processing.md](references/processing.md).
Run all PDF code with `notebook_execute`, not the shell. Check packages with `inspect_packages`; install missing ones with `manage_packages` (`language: "python"`, packages `reportlab`, `pypdf`, `pdfplumber`, `pypdfium2`, `pillow`). Never run `pip` in a cell. Poppler, qpdf, pdftk, and LibreOffice are not bundled; do not plan on `pdftotext`, `pdftoppm`, or `qpdf` commands.
Attached files are under `inputs/` relative to the Notebook working directory. Use the exact `notebookPath` shown for each input. Write outputs to the working directory or a subdirectory of it, never into this skill's directory and never over an input.
The registered helpers are injected with `kernelSkillIds`. Call them directly without importing, and repeat `kernelSkillIds` in every cell that uses them:
{
"kernelSkillIds": ["pdf-generation"],
"code": "fonts = register_pdf_fonts(cjk=True)\nprint(fonts)"
}| Helper | Purpose | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `register_pdf_fonts(path=None, bold_path=None, *, cjk=False)` | Registers an embedded TrueType family `OSBody`/`OSBody-Bold` and returns its names. `cjk=True` finds a Chinese/Japanese/Korean system font or raises. Without it, DejaVu Sans (Latin, Greek, math symbols) is used | | `render_pdf_pages(pdf_path, out_dir="pdf-pages", *, pages=None, max_long_edge=1568)` | Writes `page-001.png` and so on for visual QA, returns the paths | | `inspect_pdf(pdf_path)` | Page count and sizes, text-layer presence, outline size, form fields, unembedded fonts | | `pdf_form_fields(pdf_path)` | Fillable fields with page, rect, and allowed values | | `fill_pdf_form(input_pdf, values, output_pdf)` | Validates every value, then writes a new filled PDF |
Fonts come first. ReportLab's built-in fonts (Helvetica, Times) cover only Western European text: Chinese, Greek letters, `±`, `≥`, and `µ` render as black boxes or vanish. Call `register_pdf_fonts` once per cell before building styles. Use `cjk=True` whenever the text may contain CJK characters. If it raises, ask the user for a TrueType font file rather than switching to an unembedded CID font; the Open Science preview may not display unembedded CJK text.
from reportlab.lib import colors from reportlab.lib.pagesizes i
The open-source AI research workbench for scientific research and agent workflows. Local-first, model-agnostic desktop app with extensible skills, MCP tools and connectors, Python/R execution and traceable artifacts for reproducible research on macOS, Windows and Linux.
Predict protein structure for monomers and multimers with AlphaFold2 via the ColabFold runner (Mirdita et al. 2022,…
Structure prediction for protein, nucleic-acid, and small-molecule complexes with Boltz-2 (Passaro & Wohlwend et al. 2025,…
Predict genome-wide functional tracks (RNA-seq, CAGE, DNase, ChIP) from DNA sequence with Borzoi. Use this skill when: (1)…
Structure prediction for protein, nucleic-acid, and small-molecule complexes with the Chai-1 foundation model (Chai Discovery…
Prepare reproducible setup instructions and validate a user-managed named software environment on an Open-Science SSH Compute…
Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Search literature across sources, verify or manage citations, and build MeSH strategies or citation-impact audits. Use for…