Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to Deal with Annotations

Jorj X. McKie edited this page Dec 3, 2020 · 2 revisions

With PyMuPDF you can add, delete and modify most annotation types. This includes changing colors, borders, content of attached files, rotating, resizing and relocating annotations, and more.

In version 1.18.4 we have also added Popup annotation support.

Demoscript new-annots.py creates a page with all supported annotation types, which looks like so: new-annots-0.pdf.

"FreeText" annotations, by the PDF books also support a "callout" variant, with an arrow pointing to some place. This is currently not supported by us, but may be implemented in a future version.

For 'FreeText', multiple languages are now also supported, and the respective font is automatically deployed: Japanese, Chinese and Korean. See this script and its result.

Depending on the PDF viewer you use, not all languages are always visible. So best verify using the "standard" viewer Adobe Acrobat for a start.

PyMuPDF also fully supports BlendMode and setting the opacity of annotation types 'Line', 'Circle', 'Square', 'Polygon', and 'PolyLine'. Here is an example script and its result.

Recipes

HOWTO Button annots with JavaScript

HOWTO extract images

HOWTO join PDFs

HOWTO work with PDF embedded files

HOWTO Convert Images

HOWTO extract text from inside rectangles

HOWTO extract text in natural reading order

HOWTO add PDF form fields

HOWTO deal with annotations

HOWTO convert to PDF

HOWTO show PDF Form fields

HOWTO work with vector images

HOWTO create or extract graphics

HOWTO create your own PDF Drawing

HOWTO add pages, images, text

HOWTO extract fonts

HOWTO rearrange pages

HOWTO GUI PDF display

Algebra with geometry objects

Rectangle inclusion & intersection

Hyperlink maintenance

Visual table extraction

Incremental saves

Metadata & bookmark maintenance

Wrapping FileOptimizer

Installation

Ubuntu

Ubuntu Installation Experience

Windows Binaries

Windows Binaries Generation

Windows Binaries Installation

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /