o
    Zh0h  ã                   @   s0   d Z ddlZddlmZ dd„ Zdei fiZdS )z&PDF generation with debug information.é    Né   )ÚMatrixc                 C   s  t | jd ddd… |j|ƒ}|D ]p\}}}	|jsq| j| }
d|
vr)t ¡ |
d< |j ¡ D ]R\}\}}}}tddddƒ|	j }| 	||¡\}}| 	||¡\}}t 
ddt ||||g¡t 
d	di¡|
jt |¡d
œ¡}t |¡|d< |  |¡ |
d  |j¡ q.qdS )zSet debug PDF metadata.ÚKidsNé   ÚAnnotsg      è?r   z/Annotz/LinkÚW)ÚTypeÚSubtypeÚRectÚBSÚPÚTÚDest)ÚzipÚpagesÚanchorsÚobjectsÚpydyfÚArrayÚitemsr   ÚctmÚtransform_pointÚ
DictionaryÚ	referenceÚStringÚ
add_objectÚappend)ÚpdfÚmetadataÚdocumentÚpage_streamsÚattachmentsÚcompressr   Úpdf_page_numberÚdocument_pageÚstreamÚpageÚidÚx1Úy1Úx2Úy2ÚmatrixÚ
annotation© r.   úJ/var/www/html/rh/venv/lib/python3.10/site-packages/weasyprint/pdf/debug.pyÚdebug   s0   
ú
íør0   )Ú__doc__r   r,   r   r0   ÚVARIANTSr.   r.   r.   r/   Ú<module>   s
    #