Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
©«jì* ã @ sn d dl mZmZmZ ddlmZmZmZmZm Z m
Z
ddlmZm
Z
ddlmZ ddlmZ G dd„ dƒZd S )
é )ÚOptionalÚTupleÚUnioné )Ú
BooleanObjectÚFloatObjectÚ
NameObjectÚ
NullObjectÚNumberObjectÚTextStringObject)ÚArrayObjectÚDictionaryObject)ÚRectangleObject)Ú
hex_to_rgbc
@ sP e Zd ZdZddlmZmZ edee e
eeeef f ee
eedœdd„ƒZedeee e
eeeef f ee
e
eeeeed
œ
dd„ƒZede
eef e
eef ee e
eeeef f eeedœdd„ƒZed ee e
eeeef f ee edœdd„ƒZeddddeƒ fee e
eeeef f ee ee ee ee
edf edœdd„ƒZdS )!ÚAnnotationBuildera>
The AnnotationBuilder creates dictionaries representing PDF annotations.
Those dictionaries can be modified before they are added to a PdfWriter
instance via `writer.add_annotation`.
See `adding PDF annotations <../user/adding-pdf-annotations.html>`_ for
it's usage combined with PdfWriter.
é )ÚFitTypeÚZoomArgTypeFr )ÚrectÚtextÚopenÚflagsÚreturnc C sT t tdƒtdƒtdƒtdƒtdƒt| ƒtdƒt|ƒtdƒt|ƒtdƒt|ƒiƒ}|S ) zÿ
Add text annotation.
:param Tuple[int, int, int, int] rect:
or array of four integers specifying the clickable rectangular area
``[xLL, yLL, xUR, yUR]``
:param bool open:
:param int flags:
z/Typez/Annotz/Subtypez/Textz/Rectz /Contentsz/Openz/Flags)r
r r r r r
)r r r r Ztext_obj© r ú=/tmp/pip-build-vnmlutbd/PyPDF2/PyPDF2/generic/_annotations.pyr s zAnnotationBuilder.textÚ HelveticaÚ14ptÚ000000Úffffff)
r r ÚfontÚboldÚitalicÚ font_sizeÚ
font_colorÚborder_colorÚbackground_colorr c
C sä d} |dkr| d } |dkr$| d } | | d | } | d | } d}
x t |ƒD ]}|
t|ƒ d }
qNW |
d }
tƒ }|jtd ƒtd
ƒtdƒtdƒtd
ƒt|ƒtdƒt| ƒtdƒt| ƒtdƒt|
ƒtdƒtdd„ t |ƒD ƒƒiƒ |S )a¡
Add text in a rectangle to a page.
:param str text: Text to be added
:param RectangleObject rect: or array of four integers
specifying the clickable rectangular area ``[xLL, yLL, xUR, yUR]``
:param str font: Name of the Font, e.g. 'Helvetica'
:param bool bold: Print the text in bold
:param bool italic: Print the text in italic
:param str font_size: How big the text will be, e.g. '14pt'
:param str font_color: Hex-string for the color
:param str border_color: Hex-string for the border color
:param str background_color: Hex-string for the background of the annotation
zfont: Tzbold zitalic ú z;text-align:left;color:#Ú Zrgz/Typez/Annotz/Subtypez /FreeTextz/Rectz /Contentsz/DSz/DAz/Cc S s g | ]}t |ƒ‘qS r )r )Ú.0Únr r r ú
n s z/AnnotationBuilder.free_text..)r Ústrr
Úupdater r r r )
r r r r r! r" r# r$ r% Zfont_strZbg_color_strÚstÚ free_textr r r r. : s, zAnnotationBuilder.free_textr' )Úp1Úp2r r Ú title_barr c C s² t tdƒtdƒtdƒtdƒtdƒt|ƒtdƒt|ƒtdƒtt| d ƒt| d ƒt|d ƒt|d ƒgƒtd
ƒttdƒtdƒgƒtdƒttd
ƒtd
ƒtd
ƒgƒtdƒt|ƒiƒ}|S )a
Draw a line on the PDF.
:param Tuple[float, float] p1: First point
:param Tuple[float, float] p2: Second point
:param RectangleObject rect: or array of four
integers specifying the clickable rectangular area
``[xLL, yLL, xUR, yUR]``
:param str text: Text to be displayed as the line annotation
:param str title_bar: Text to be displayed in the title bar of the
annotation; by convention this is the name of the author
z/Typez/Annotz/Subtypez/Linez/Rectz/Tz/Lr r z/LENz/ICg à?z /Contents)r
r r r r r )r/ r0 r r r1 Zline_objr r r Úlinet s&