pdftools_toolbox.pdf.annotations.highlight
Classes
|
An text highlighting annotation |
- class pdftools_toolbox.pdf.annotations.highlight.Highlight(handle)[source]
Bases:
TextMarkup
An text highlighting annotation
- static create_from_quadrilaterals(target_document: Document, markup_area: QuadrilateralList, paint: Paint) Highlight [source]
Create a new highlight with defined area
The highlight area is defined by the given markupArea. The returned object is associated with the targetDocument but not yet part of any page. It can be added to a page’s list of annotations.
- Parameters:
targetDocument (pdftools_toolbox.pdf.document.Document) – The document in which the links is used
markupArea (pdftools_toolbox.geometry.real.quadrilateral_list.QuadrilateralList) – The area on the page to be highlighted.
paint (pdftools_toolbox.pdf.content.paint.Paint) – The highlight paint
- Returns:
The newly created object
- Return type:
- Raises:
ValueError – if the targetDocument has already been closed
ValueError – if the targetDocument is read-only
ValueError – if the markupArea is empty
ValueError – if the paint argument is not associated with targetDocument
ValueError – if the paint argument has a
pdftools_toolbox.pdf.content.paint.Paint.color_space
other than a device color spaceValueError – if the paint argument has a non-None
pdftools_toolbox.pdf.content.paint.Paint.transparency
withpdftools_toolbox.pdf.content.transparency.Transparency.blend_mode
other thanpdftools_toolbox.pdf.content.blend_mode.BlendMode.NORMAL