
    +gZ                         d Z ddlZddlZddlZddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZ dxZZd Z G d	 d
      Z G d dee      Z G d de      Z G d de      Z G d dee      Z G d d      Zy)z
A low-level PDF generator.

    N)BOM_UTF16_BE)md5)ceillog)warnz0.11.0c                 \   t        | t              r| S t        | t              rU| j                         r#t	        t        |             j                  d      S | dj                  d      j                  d      S t        | t              r| j                  S t	        |       j                  d      S )zConvert item to bytes.asciif0)

isinstancebytesfloat
is_integerstrintencoderstripObjectdata)items    f/home/viktor/gitlab-persoonlijk/factuur-applicatie/venv/lib/python3.12/site-packages/pydyf/__init__.py	_to_bytesr      s    $	D%	 ??s4y>((111X%%c*11'::	D&	!yyt9G$$    c                   V    e Zd ZdZd Zed        Zed        Zed        Zed        Z	y)r   zBase class for PDF objects.c                 <    d | _         d| _        d| _        d| _        y )Nr   n)numberoffset
generationfreeselfs    r   __init__zObject.__init__!   s      	r   c                 z    | j                    d| j                   dj                         }|| j                  z   dz   S )z%Indirect representation of an object. z obj
s   
endobj)r   r   r   r   )r"   headers     r   indirectzObject.indirect,   s<     KK=$//!2&9@@B		!K//r   c                 V    | j                    d| j                   dj                         S )zObject identifier.r%   z R)r   r   r   r!   s    r   	referencezObject.reference2   s)     ++a03::<<r   c                     t               )z@Data contained in the object. Shall be defined in each subclass.)NotImplementedErrorr!   s    r   r   zObject.data7   s     "##r   c                 B    | j                    xr t        | t               S )z7Whether the object can be included in an object stream.)r   r   Streamr!   s    r   compressiblezObject.compressible<   s      ??"C:dF+C'CCr   N)
__name__
__module____qualname____doc__r#   propertyr'   r)   r   r.    r   r   r   r      s\    %	 0 0
 = = $ $ D Dr   r   c                   (    e Zd ZdZddZed        Zy)
DictionaryzPDF Dictionary object.Nc                 b    t         j                  |        t        j                  | |xs i        y N)r   r#   dict)r"   valuess     r   r#   zDictionary.__init__D   s     dFLb)r   c                     | j                         D cg c]"  \  }}dt        |      z   dz   t        |      z   $ }}}ddj                  |      z   dz   S c c}}w )N   /       <<r      >>)itemsr   join)r"   keyvalueresults       r   r   zDictionary.dataH   sc     #jjl,U 9S>!D(9U+;;, , sxx''%//,s   'Ar8   r/   r0   r1   r2   r#   r3   r   r4   r   r   r6   r6   B   s     * 0 0r   r6   c                   N    e Zd ZdZd0 fd	Zd1dZd Zd2dZd Zd2dZ	d Z
d	 Zd
 Zd Zd Zd Zd Zd2dZd2dZd2dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd2dZd2dZd2dZd Z d Z!d  Z"d! Z#d" Z$d# Z%d$ Z&d% Z'd& Z(d' Z)d( Z*d) Z+d* Z,d+ Z-d, Z.d- Z/d. Z0e1d/        Z2 xZ3S )3r-   zPDF Stream object.c                 \    t         |           |xs g | _        |xs i | _        || _        y r8   )superr#   streamextracompress)r"   rI   rJ   rK   	__class__s       r   r#   zStream.__init__R   s+    l[b
 r   c                     | j                   j                  d|        || j                   j                  d       y| j                   j                  |       | j                   j                  d       y)zBegin marked-content sequence./Ns   BMCs   BDCrI   append)r"   tagproperty_lists      r   begin_marked_contentzStream.begin_marked_content[   sV    Qse9% KKv&KK}-KKv&r   c                 :    | j                   j                  d       y)zBegin a text object.s   BTNrO   r!   s    r   
begin_textzStream.begin_textd       5!r   c                 L    | j                   j                  |rd       yd       y)a  Modify current clipping path by intersecting it with current path.

        Use the nonzero winding number rule to determine which regions lie
        inside the clipping path by default.

        Use the even-odd rule if ``even_odd`` set to ``True``.

        s   W*   WNrO   r"   even_odds     r   clipzStream.cliph   s     	H57$7r   c                 :    | j                   j                  d       y)zClose current subpath.

        Append a straight line segment from the current point to the starting
        point of the subpath.

           hNrO   r!   s    r   closezStream.closes   s     	4 r   c                 x    t        t        j                  j                  t               | j                  ||       y)z7color_space is deprecated, use set_color_space instead.N)r   r-   color_spacer2   DeprecationWarningset_color_spacer"   spacestrokes      r   r`   zStream.color_space|   s)    V'');<UF+r   c                     | j                   j                  dj                  t        |      t        |      t        |      t        |      t        |      t        |      df             y)u   Add cubic Bézier curve to current path.

        The curve shall extend from ``(x3, y3)`` using ``(x1, y1)`` and ``(x2,
        y2)`` as the Bézier control points.

        r=      cNrI   rP   rA   r   )r"   x1y1x2y2x3y3s          r   curve_tozStream.curve_to   sO     	499bM9R=bM9R=bM9R=$&0 1 	2r   c           
          | j                   j                  dj                  t        |      t        |      t        |      t        |      df             y)u   Add cubic Bézier curve to current path

        The curve shall extend to ``(x3, y3)`` using the current point and
        ``(x2, y2)`` as the Bézier control points.

        r=      vNrh   )r"   rk   rl   rm   rn   s        r   curve_start_tozStream.curve_start_to   B     	499bM9R=bM9R=$&0 1 	2r   c           
          | j                   j                  dj                  t        |      t        |      t        |      t        |      df             y)u   Add cubic Bézier curve to current path

        The curve shall extend to ``(x3, y3)`` using `(x1, y1)`` and ``(x3,
        y3)`` as the Bézier control points.

        r=      yNrh   )r"   ri   rj   rm   rn   s        r   curve_end_tozStream.curve_end_to   rs   r   c                 X    | j                   j                  dt        |      z   dz          y)zDraw object given by reference.r<   s    DoNrI   rP   r   )r"   r)   s     r   draw_x_objectzStream.draw_x_object   s#    4)I"66?@r   c                 :    | j                   j                  d       y)z%End path without filling or stroking.   nNrO   r!   s    r   endz
Stream.end       4 r   c                 :    | j                   j                  d       y)zEnd marked-content sequence.s   EMCNrO   r!   s    r   end_marked_contentzStream.end_marked_content   s    6"r   c                 :    | j                   j                  d       y)zEnd text object.s   ETNrO   r!   s    r   end_textzStream.end_text   rV   r   c                 L    | j                   j                  |rd       yd       y)znFill path using nonzero winding rule.

        Use even-odd rule if ``even_odd`` is set to ``True``.

        s   f*   fNrO   rY   s     r   fillzStream.fill        	H57$7r   c                 L    | j                   j                  |rd       yd       y)zyFill and stroke path usign nonzero winding rule.

        Use even-odd rule if ``even_odd`` is set to ``True``.

        s   B*   BNrO   rY   s     r   fill_and_strokezStream.fill_and_stroke   r   r   c                 L    | j                   j                  |rd       yd       y)zFill, stroke and close path using nonzero winding rule.

        Use even-odd rule if ``even_odd`` is set to ``True``.

        s   b*   bNrO   rY   s     r   fill_stroke_and_closezStream.fill_stroke_and_close   r   r   c                 |   | j                   rt        j                   |      n|}t        j                  |      dz   }| j                  j                  dj                  ddt        |      dt        |      dt        |      ddt        |      z   d	| j                   rd
nddt        t        |            d|df             y)a  Add an inline image.

        :param width: The width of the image.
        :type width: :obj:`int`
        :param height: The height of the image.
        :type height: :obj:`int`
        :param colorspace: The color space of the image, f.e. RGB, Gray.
        :type colorspace: :obj:`str`
        :param bpc: The bits per component. 1 for BW, 8 for grayscale.
        :type bpc: :obj:`int`
        :param raw_data: The raw pixel data.

        s   ~>r=   s   BIs   /Ws   /Hs   /BPCs   /CSs   /Devices   /Fs
   [/A85 /Fl]s   /A85s   /Ls   IDs   EIN)	rK   zlibbase64	a85encoderI   rP   rA   r   len)r"   widthheightr`   bpcraw_datar   a85_datas           r   inline_imagezStream.inline_image   s     +/--t}}X&X##D)E14999U#9V$Ys^;//!]]M9S]+&
  	r   c                     | j                   j                  dj                  t        |      t        |      df             y)z0Add line from current point to point ``(x, y)``.r=      lNrh   r"   xys      r   line_tozStream.line_to   ,    499ilIaL$%GHIr   c                     | j                   j                  dj                  t        |      t        |      df             y)z8Begin new subpath by moving current point to ``(x, y)``.r=      mNrh   r   s      r   move_tozStream.move_to   r   r   c                     | j                   j                  dj                  t        |      t        |      df             y)zAMove text to next line at ``(x, y)`` distance from previous line.r=   s   TdNrh   r   s      r   move_text_tozStream.move_text_to   s,    499ilIaL%%HIJr   c                 v    t        t        j                  j                  t               | j                  |       y)z1shading is deprecated, use paint_shading instead.N)r   r-   shadingr2   ra   paint_shadingr"   names     r   r   zStream.shading   s%    V^^##%784 r   c                 X    | j                   j                  dt        |      z   dz          y)z@Paint shape and color shading using shading dictionary ``name``.r<   s    shNrx   r   s     r   r   zStream.paint_shading   s"    4)D/1F:;r   c                 :    | j                   j                  d       y)zRestore graphic state.   QNrO   r!   s    r   	pop_statezStream.pop_state   r}   r   c                 :    | j                   j                  d       y)zSave graphic state.   qNrO   r!   s    r   
push_statezStream.push_state  r}   r   c           
          | j                   j                  dj                  t        |      t        |      t        |      t        |      df             y)zAdd rectangle to current path as complete subpath.

        ``(x, y)`` is the lower-left corner and width and height the
        dimensions.

        r=   s   reNrh   )r"   r   r   r   r   s        r   	rectanglezStream.rectangle  sD     	499aL)A,ei/&8 9 	:r   c           	          | j                   j                  dj                  t        |      t        |      t        |      |rdndf             y)zSet RGB color for nonstroking operations.

        Set RGB color for stroking operations instead if ``stroke`` is set to
        ``True``.

        r=   s   RGs   rgNrh   )r"   rgbre   s        r   set_color_rgbzStream.set_color_rgb  s@     	499aL)A,	!U%&* + 	,r   c                 t    | j                   j                  dt        |      z   dz   |r	dz          ydz          y)zwSet the nonstroking color space.

        If stroke is set to ``True``, set the stroking color space instead.

        r<   r=   s   CSs   csNrx   rc   s      r   rb   zStream.set_color_space  s<     	9U##d*veI	KCHI	Kr   c                     |rg |dt        |      z   }| j                  j                  dj                  d |D              dz   |r	dz          ydz          y)zSet special color for nonstroking operations.

        Set special color for stroking operation if ``stroke`` is set to ``True``.

        r<   r=   c              3   2   K   | ]  }t        |        y wr8   r   ).0operands     r   	<genexpr>z+Stream.set_color_special.<locals>.<genexpr>/  s     AWi(A   s   SCNs   scnN)r   rI   rP   rA   )r"   r   re   operandss       r   set_color_specialzStream.set_color_special&  s_     ::4)D/#9:HIIAAADHV+	,#)+	,r   c                     | j                   j                  dj                  t        |      j                  t        |      df             y)zSet dash line pattern.

        :param dash_array: Dash pattern.
        :type dash_array: :term:`iterable`
        :param dash_phase: Start of dash phase.
        :type dash_phase: :obj:`int`

        r=      dN)rI   rP   rA   Arrayr   r   )r"   
dash_array
dash_phases      r   set_dashzStream.set_dash2  s@     	499*""Ij$94&A B 	Cr   c                 v    | j                   j                  dt        |      z   dz   t        |      z   dz          y)zSet font name and size.r<   r=   s    TfNrx   )r"   fontsizes      r   set_font_sizezStream.set_font_size>  s4    9T?"T)IdO;fD	Fr   c                 R    | j                   j                  t        |      dz          y)zSet text rendering mode.s    TrNrx   )r"   modes     r   set_text_renderingzStream.set_text_renderingC  s    9T?V34r   c                 R    | j                   j                  t        |      dz          y)zSet text rise.s    TsNrx   )r"   r   s     r   set_text_risezStream.set_text_riseG  s    9V,v56r   c                 R    | j                   j                  t        |      dz          y)zSet line cap style.s    JNrx   )r"   line_caps     r   set_line_capzStream.set_line_capK  s    9X.67r   c                 R    | j                   j                  t        |      dz          y)zSet line join style.s    jNrx   )r"   	line_joins     r   set_line_joinzStream.set_line_joinO  s    9Y/%78r   c                 R    | j                   j                  t        |      dz          y)zSet line width.s    wNrx   )r"   r   s     r   set_line_widthzStream.set_line_widthS  s    9U+e34r   c                     | j                   j                  dj                  t        |      t        |      t        |      t        |      t        |      t        |      df             y)am  Set current transformation matrix.

        :param a: Top left number in the matrix.
        :type a: :obj:`int` or :obj:`float`
        :param b: Top middle number in the matrix.
        :type b: :obj:`int` or :obj:`float`
        :param c: Middle left number in the matrix.
        :type c: :obj:`int` or :obj:`float`
        :param d: Middle middle number in the matrix.
        :type d: :obj:`int` or :obj:`float`
        :param e: Bottom left number in the matrix.
        :type e: :obj:`int` or :obj:`float`
        :param f: Bottom middle number in the matrix.
        :type f: :obj:`int` or :obj:`float`

        r=   s   cmNrh   r"   ar   cder
   s          r   
set_matrixzStream.set_matrixW  N    " 	499aL)A,	!aL)A,	!e&= > 	?r   c                 R    | j                   j                  t        |      dz          y)zSet miter limit.s    MNrx   )r"   miter_limits     r   set_miter_limitzStream.set_miter_limitl  s    9[1E9:r   c                 X    | j                   j                  dt        |      z   dz          y)zkSet specified parameters in graphic state.

        :param state_name: Name of the graphic state.

        r<   s    gsNrx   )r"   
state_names     r   	set_statezStream.set_statep  s%     	4)J"77&@Ar   c                     | j                   j                  dj                  t        |      t        |      t        |      t        |      t        |      t        |      df             y)a  Set current text and text line transformation matrix.

        :param a: Top left number in the matrix.
        :type a: :obj:`int` or :obj:`float`
        :param b: Top middle number in the matrix.
        :type b: :obj:`int` or :obj:`float`
        :param c: Middle left number in the matrix.
        :type c: :obj:`int` or :obj:`float`
        :param d: Middle middle number in the matrix.
        :type d: :obj:`int` or :obj:`float`
        :param e: Bottom left number in the matrix.
        :type e: :obj:`int` or :obj:`float`
        :param f: Bottom middle number in the matrix.
        :type f: :obj:`int` or :obj:`float`

        r=   s   TmNrh   r   s          r   set_text_matrixzStream.set_text_matrixx  r   r   c                     t        t        j                  j                  t               | j                  ||||||       y)z7text_matrix is deprecated, use set_text_matrix instead.N)r   r-   text_matrixr2   ra   r   r   s          r   r   zStream.text_matrix  s1    V'');<Q1aA.r   c                     t        t        j                  j                  t               | j                  ||||||       y)z0transform is deprecated, use set_matrix instead.N)r   r-   	transformr2   ra   r   r   s          r   r   zStream.transform  s/    V%%'9:1aAq)r   c                 X    | j                   j                  dt        |      z   dz          y)z4Show text strings with individual glyph positioning.   [s   ] TJNrx   r"   texts     r   	show_textzStream.show_text  s"    4)D/1G;<r   c                 f    | j                   j                  t        |      j                  dz          y)zShow single text string.s    TjN)rI   rP   Stringr   r   s     r   show_text_stringzStream.show_text_string  s#    6$<,,v56r   c                 :    | j                   j                  d       y)zStroke path.   SNrO   r!   s    r   re   zStream.stroke  r}   r   c                 :    | j                   j                  d       y)zStroke and close path.   sNrO   r!   s    r   stroke_and_closezStream.stroke_and_close  r}   r   c                 |   dj                  d | j                  D              }t        | j                  j	                               }| j
                  r?d|d<   t        j                  d      }|j                  |      }||j                         z  }t        |      |d<   dj                  |j                  d|d	f      S )
N   
c              3   2   K   | ]  }t        |        y wr8   r   )r   r   s     r   r   zStream.data.<locals>.<genexpr>  s     DIdODr   z/FlateDecodeFilter	   )levelLengths   streams	   endstream)rA   rI   r6   rJ   copyrK   r   compressobjflushr   r   )r"   rI   rJ   r   s       r   r   zStream.data  s    DDD4::??,-==,E(O**3K ))&1Fk''))Ff+hzz5::y&,GHHr   )NNFr8   )F)4r/   r0   r1   r2   r#   rS   rU   r[   r^   r`   ro   rr   rv   ry   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rb   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   re   r   r3   r   __classcell__rL   s   @r   r-   r-   P   s   !'"	8!,

2	2	2A!#"888>JJK!
<!!	:	,K
,
CF
57895?*;B?*/
*
=7!! 	I 	Ir   r-   c                   4     e Zd ZdZd fd	Zed        Z xZS )r   zPDF String object.c                 0    t         |           || _        y r8   )rH   r#   string)r"   r  rL   s     r   r#   zString.__init__  s    r   c                 $   	 t        j                  ddt        | j                              }d|z   dz   S # t        $ rR t
        t        | j                        j                  d      z   }d|j                         j                         z   dz   cY S w xY w)Ns
   ([\\\(\)])s   \\\1   (   )z	utf-16-be   <   >)	resubr   r  UnicodeEncodeErrorr   r   r   hex)r"   escapedencodeds      r   r   zString.data  s    		8
 ff^Xy7MNG'>D((! 	8"S%5%<%<[%IIG'++-..00477	8s   14 ABB) )r/   r0   r1   r2   r#   r3   r   r  r  s   @r   r   r     s    
 
8 
8r   r   c                   (    e Zd ZdZddZed        Zy)r   zPDF Array object.Nc                 b    t         j                  |        t        j                  | |xs g        y r8   )r   r#   list)r"   arrays     r   r#   zArray.__init__  s     dEKR(r   c                 >    ddj                  d | D              z   dz   S )Nr   r=   c              3   2   K   | ]  }t        |        y wr8   r   )r   childs     r   r   zArray.data.<locals>.<genexpr>  s     CU	% 0Cr      ])rA   r!   s    r   r   z
Array.data  s!    diiCdCCCdJJr   r8   rE   r4   r   r   r   r     s     ) K Kr   r   c                   @    e Zd ZdZd Zd Zd Zed        Zd Z	d	dZ
y)
PDFzPDF document.c                    g | _         t               }d|_        d|_        | j	                  |       t        dt        g       dd      | _        | j	                  | j                         t        i       | _        | j	                  | j                         t        d| j                  j                  d      | _
        | j	                  | j                         d| _        d| _        y)	zCreate a PDF document.i  r
   z/Pagesr   )TypeKidsCountz/Catalog)r  PagesN)objectsr   r   r    
add_objectr6   r   pagesinfor)   catalogcurrent_positionxref_position)r"   zero_objects     r   r#   zPDF.__init__  s     h!&$  "I!
 

 	

# rN			" "ZZ))#
  	% !"!r   c                     | j                   dxx   dz  cc<   | j                  |       | j                   d   j                  |j                  ddg       y)zfAdd page to the PDF.

        :param page: New page.
        :type page: :class:`Dictionary`

        r      r  r   RN)r$  r#  extendr   )r"   pages     r   add_pagezPDF.add_page  sF     	

7q 

6!!4;;3"78r   c                 n    t        | j                        |_        | j                  j                  |       y)zAdd object to the PDF.N)r   r"  r   rP   )r"   object_s     r   r#  zPDF.add_object  s$    T\\*G$r   c                 L    t        d | j                  d   d d d   D              S )Nc              3   D   K   | ]  }| d j                  d        yw)z 0 Rr	   N)r   )r   object_numbers     r   r   z&PDF.page_references.<locals>.<genexpr>  s*      : oT"))'2:s    r     )tupler$  r!   s    r   page_referenceszPDF.page_references	  s.     :!%F!3CaC!8: : 	:r   c                 n    | xj                   t        |      dz   z  c_         |j                  |dz          y)zWrite line to output.

        :param content: Content to write.
        :type content: :obj:`bytes`
        :param output: Output stream.
        :type output: binary :term:`file object`

        r+  r   N)r'  r   write)r"   contentoutputs      r   
write_linezPDF.write_line  s.     	W!11Wu_%r   c           
         t        |xs d      }|dvrt        |      }| j                  d|z   |       | j                  d|       |dk\  r|rg }| j                  D ]]  }|j                  dk(  r|j                  r|j                  |       1| j                  |_        | j                  |j                  |       _ g g}d}t        |      D ]e  \  }	}|j                  }
|j                  |
       |d   j                  |j                         |d   j                  |       |t        |
      dz   z  }g d	j                  d
 |d   D              |d<   dt        |      t        |d         dz   d}t        |||      }| j                  |_        | j                  |       | j                  |j                  |       g }d}| j                  D ]m  }|j                  r$|j                  d|j                  |f       |dz  }3|j                  t!        |j                        |j                  |j"                  f       o |j                  d| j                  df       t%        t'        | j                  dz   d            }t)        d | j                  D              }t%        t'        t)        |t        |            dz   d            }d||fdj                  fd|D              }dt+        dt        | j                        dz   f      t+              t        | j                        dz   | j,                  j.                  | j0                  j.                  d}|rdj                  d | j                  D              }
t3        |
      j5                         j7                         }|du r|}t+        t9        |      j                  t9        |      j                  f      |d<   t        |g||      }| j                  x| _        |_        | j                  |       | j                  |j                  |       nT| j                  D ]?  }|j                  dk(  r| j                  |_        | j                  |j                  |       A | j                  | _        | j                  d|       | j                  dt        | j                         j7                         |       | j                  D ]K  }| j                  |j                  dd	|j"                  dd	|j                   d	j7                         |       M | j                  d|       | j                  d|       | j                  dt        | j                         j7                         |       | j                  d| j,                  j.                  z   |       | j                  d| j0                  j.                  z   |       |rdj                  d  | j                  D              }
t3        |
      j5                         j7                         }|du r|}| j                  d!t9        |      j                  z   d"z   t9        |      j                  z   d#z   |       | j                  d$|       | j                  d%|       | j                  | j:                   j7                         |       | j                  d&|       y')(a  Write PDF to output.

        :param output: Output stream.
        :type output: binary :term:`file object`
        :param bytes version: PDF version.
        :param identifier: PDF file identifier. Default is :obj:`False`
          to include no identifier, can be set to :obj:`True` to generate an
          automatic identifier.
        :type identifier: :obj:`bytes` or :obj:`bool`
        :param bool compress: whether the PDF uses a compressed object stream.

           1.7)FTNs   %PDF-s   %🖤s   1.5r
   r   r+  r%   c              3   2   K   | ]  }t        |        y wr8   )r   )r   is     r   r   zPDF.write.<locals>.<genexpr>F  s      ;AQ ;r   z/ObjStm)r  NFirst      c              3   4   K   | ]  }|j                     y wr8   )r   )r   r1  s     r   r   zPDF.write.<locals>.<genexpr>_  s      !@'.""!@s   r   c              3   j   K   | ]*  }t        |      D ]  \  }}|j                  |d         , yw)bigN)zipto_bytes)r   linelengthrC   xref_lengthss       r   r   zPDF.write.<locals>.<genexpr>d  sE      #Oc,6M#O%2VU vu-#O-#Os   03z/XRef)r  IndexWSizeRootInfoc              3   T   K   | ]   }|j                   d k7  s|j                   " ywr
   Nr    r   r   objs     r   r   zPDF.write.<locals>.<genexpr>p  %       I!$CCHH I   ((TIDs   xrefz0 01005s   trailerr>   z/Size s   /Root s   /Info c              3   T   K   | ]   }|j                   d k7  s|j                   " ywrS  rT  rU  s     r   r   zPDF.write.<locals>.<genexpr>  rW  rX  s   /ID [r=   r  r?   s	   startxrefs   %%EOFN)r   r<  r"  r    r.   rP   r'  r   r'   	enumerater   r   r   rA   r-   r#  boolr   r   r   maxr   r&  r)   r%  r   	hexdigestr   r   r(  )r"   r;  version
identifierrK   compressed_objectsr1  rI   positionr@  r   rJ   object_streamxref
dict_indexfield2_sizemax_generationfield3_sizexref_stream	data_hashdict_streamrL  s                        @r   r9  z	PDF.write  s#    G-v.00":.J 	7*F3,f5f!#<< ><<3&''&--g6%)%:%:GNOOG$4$4f=> TFH'(:; *
7||d#q	  0q	  *CIM)*  ; ;;F1I!+,VAY!+E
 #65(;M#'#8#8M OOM*OOM22F; DJ<< -''KKM$8$8* EF!OJKKW^^,gnn**!, -- KKD11156s4#8#81#<cBCK  !@26,,!@ @NsNC(:$;<q@# G HK{K8L(( #O #O OK  3t||#4q#89:<(DLL)A-..		++E xx  I(, I II//188:	%!*J#:&++VI->-C-C%E Fd +x@K6:6K6KKD!3OOK(OOK00&9  << :<<3&!%!6!6 0 0&9	: "&!6!6DOOGV,OObT\\!2 34;;=vF<< ;s+1W-?-?,C1~Q()/6;; OOJ/OOE6*OOfS%6$78??A6JOOI(>(>>GOOI		(;(;;VDxx  I(, I II//188:	%!*Jvj1666=9%**+-1239; OOE6*f-4--.668&A&)r   N)r>  FF)r/   r0   r1   r2   r#   r/  r#  r3   r7  r<  r9  r4   r   r   r  r    s4    !"F	9%
 : :

&D*r   r  )r2   r   r  r   codecsr   hashlibr   mathr   r   warningsr   VERSION__version__r   r   r9   r6   r-   r   r  r   r  r4   r   r   <module>rt     s   
  	        +% D  DF0 0aIV aIH8V 8*KFD KK* K*r   