)EjP:dZddlZddlmZddlmZmZmZmZmZddl m Z ddl m Z m Z mZmZddlmZmZmZmZmZmZmZmZmZmZerdd lmZe j fZ!Gd d Z"Gd d e"eZ#Gdde"Z$GddeZ%GddeZ&dS)zK Usage documentation at: N)datetime) TYPE_CHECKINGAnyOptionalSequenceUnion)Action)AnnotationFlagAnnotationNameAssociatedFileRelationshipFileAttachmentAnnotationName) DestinationNamePDFContentStreamPDFDate PDFObject PDFStringbuild_obj_dictcreate_dictionary_stringcreate_list_stringiobj_ref)StandardSecurityHandlerc+eZdZeddddddddddddddfdedededededeeezd fd eed ee e zd ee d eeeeefdee deedee ededeeedfdeeed fdeedefdeedeedeeddf*dZdS)AnnotationMixinNrsubtypexywidthheightflags.contentsdestactioncolormodification_timetitle quad_points border_widthnameink_list file_specFileSpec field_typevaluedefault_appearancereturnc td|_t||_d|dd||z dd||zdd|dd |_d|d|_|rt|nd|_||_ttd|D|_ |rt|d nd|_ | |_ ||_ | rd| d d| d d| d dnd|_| rt| d nd|_| rt!| d nd|_| rt%d | Dnd|_d|_||_|rdt%d|Dzdznd|_||_||_dS)NAnnot[.2f ]z[0 0 c3>K|]}tj|VdSN)r coerce).0flags BC:\PYTHON\MyICR_Suite\python\Lib\site-packages\fpdf/annotations.py z+AnnotationMixin.__init__..Bs-II4>066IIIIIIT)encryptrr cg|]}|dSr5)r; quad_points r= z,AnnotationMixin.__init__..JsHHHj))HHHr?cg|]}|dSrCrD)r;coords r=rFz,AnnotationMixin.__init__..QsBBB^^BBBr?)rtyperrectborderf_tvsumtuplefrr"ar#ctrmpdf_listr(pr*r+f_sd_a)selfrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r.r/r0s r=__init__zAnnotationMixin.__init__%s.MM G}} IIIIF IIIUIIIIIII -l--- '1;4 ###tUII5IIIIIJJ=EO (D99994  :?I6U1X66a66586666T38B5$////d=NX*D9999TX HHHKHHH I I I    S8BBBBBCC Cc I I %r?)__name__ __module__ __qualname__DEFAULT_ANNOT_FLAGSstrfloatrOr rrrr rrrr rrZrDr?r=rr$s3F"&26#'6:04#15JN046:$(#,0+1&1&1& 1&  1&  1&  1&^c)3./1&3-1&{Y./1& 1&eUE1231&$H-1&}1&huo.1&1& N$@$FG!1&"5,-#1&$E*c/23%1&&SM'1&(})1&*%SM+1&, -1&1&1&1&1&1&r?rc0eZdZdZdededdffd ZxZS) PDFAnnotationz?A PDF annotation that get serialized as an obj<>endobj blockargskwargsr1Nc:tj|i|dSr9)superrZ)rYrcrd __class__s r=rZzPDFAnnotation.__init__\s%$)&)))))r?)r[r\r]__doc__rrZ __classcell__rgs@r=rbrbYsXEE*c*S*T**********r?rbcTeZdZdZdZ d deddeedefdZdefd Z dS) AnnotationDictz@A PDF annotation that get serialized as an inline <>)rIrrJrKrLrMrPr"rQr#rRrSr(rVr*r+rWrXN_security_handlerr_obj_idr1cxtfdtD||}t|S)Nc2i|]}|t|SrDgetattrr;keyrYs r= z,AnnotationDict.serialize..~s% : : :S'$$$ : : :r?)rmrn)rdirpdf_dict)rYrmrnobj_dicts` r= serializezAnnotationDict.serializexsL " : : : :D : : :/    !!!r?cdtD}fd|D}d|D}d|dS)Nc<g|]}|d|S)__) startswith)r;rts r=rFz+AnnotationDict.__repr__..s)EEEt0D0DEEEEr?c2i|]}|t|SrDrqrss r=ruz+AnnotationDict.__repr__..s% 5 5 5S'$$$ 5 5 5r?c8i|]\}}t|||SrD)callable)r;rtr/s r=ruz+AnnotationDict.__repr__..s) K K KJC8E?? KS% K K Kr?zAnnotationDict(**))rvitems)rYkeysds` r=__repr__zAnnotationDict.__repr__saEEs4yyEEE 5 5 5 5 5 5 5 K K!'')) K K K'1''''r?NN) r[r\r]rh __slots__rintr_ryrrDr?r=rlrl`sFFI.BF!% " "#$=> "# " " " " "(#((((((r?rlceZdZ ddedededeedeed eed eed ed effd Z defdZ deddfdZ defdZ ddZ xZS)PDFEmbeddedFileNFbasenamer"desc creation_datemodification_date mime_typeaf_relationshipcompresschecksumc pt||td|_dt |i} |r&t |d| d<|r&t |d| d<| rMtjdd } | |j | } d | d | d <|rt||_ t| |_||_||_d|_||_d|_dS)N)r"r EmbeddedFilez/SizeT)with_tzz /CreationDatez/ModDatemd5F)usedforsecurity<>z /CheckSum)rfrZrrIlenrryhashlibnewupdate _contents hexdigestrrwparams _basename_desc_globally_enclosed_af_relationship _file_spec)rYrr"rrrrrrrr file_hashhash_hexrgs r=rZzPDFEmbeddedFile.__init__s< (X>>>(( %,c(mm$<  W&-mT&J&J&J&T&T&V&VF? #  V!():D!I!I!I!S!S!U!UF:   2 E5AAAI   T^ , , , **,,H"1h///F;   + ??DLv&& & (,FU.2r?r1c|jSr9rrYs r=globally_enclosedz!PDFEmbeddedFile.globally_encloseds &&r?r/c||_dSr9r)rYr/s r=set_globally_enclosedz%PDFEmbeddedFile.set_globally_encloseds"'r?c|jSr9)rrs r=rzPDFEmbeddedFile.basenames ~r?r-cj|js&t||j|j|j|_|jSr9)rr-rrrrs r=r,zPDFEmbeddedFile.file_specs7 &dndj$2GDOr?)rNNNNFF)r1r-)r[r\r]r_bytesrrr boolrZrrrr,rirjs@r=rrs2 ,004#'@D3333 3  ) 3 $H- 3C=3""<=33333333B'4''''(4(D((((#r?rc jeZdZ d dededeedeeffd ZedefdZ xZ S) r-N embedded_filerrrc0ttd|_t ||_t ||_|rt ||_|rt|j|_ ||_ dS)NFilespec) rfrZrrIrrPu_frr/a_f_relationship_embedded_file)rYrrrrrgs r=rZzFileSpec.__init__s $$ 8$$X&&  (!$DI  @$()>$?$?D !+r?r1cRtdt|jjiS)Nz/F)rwpdf_refridrs r=e_fz FileSpec.e_fs#wt':'=>>?@@@r?r) r[r\r]rr_rr rZpropertyrrirjs@r=r-r-s #@D ,,&,,sm , ""<= ,,,,,,"ASAAAXAAAAAr?r-)'rhrrtypingrrrrractionsr enumsr r r rsyntaxrrrrrrrrrwrrUrr encryptionrPRINTr^rrbrlrr-rDr?r=rs0@@@@@@@@@@@@@@                        4333333&+-2&2&2&2&2&2&2&2&j*****OY***((((((((((_((((((V00000&000fAAAAAyAAAAAr?