
    Csi
                         d dl mZ ddlmZmZ ddlmZmZ ddgZde	de	d	ed
e
de
de
fdZ	 dde	de	d	ed
e
de
de
fdZ	 dde	de	d	ed
e
de
de
de	fdZy)    )IncrementalPdfFileWriter   )QRStampQRStampStyle)	TextStampTextStampStyleqr_stamp_filetext_stamp_file
input_nameoutput_namestyle	dest_pagexyc                     t        | d      5 }t        |d      }	 |d|	|d|}
|
j                  |||       t        |d      5 }|	j                  |       d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)NrbF)strict)writerr   wb )openr   applywrite)r   r   r   stamp_classr   r   r   stamp_kwargsfinpdf_outstampouts               c/var/www/python-projects/worksol/worksolenv/lib/python3.12/site-packages/pyhanko/stamp/functions.py_stamp_filer!   	   s     
j$	 3*3u=H7%H<HIq!$+t$ 	MM#	 
	 	 s#   8A4A(A4(A1	-A44A=Nc           
      2    t        | ||t        ||||       y)a5  
    Add a text stamp to a file.

    :param input_name:
        Path to the input file.
    :param output_name:
        Path to the output file.
    :param style:
        Text stamp style to use.
    :param dest_page:
        Index of the page to which the stamp is to be applied (starting at `0`).
    :param x:
        Horizontal position of the stamp's lower left corner on the page.
    :param y:
        Vertical position of the stamp's lower left corner on the page.
    :param text_params:
        Additional parameters for text template interpolation.
    )text_paramsN)r!   r   )r   r   r   r   r   r   r#   s          r    r
   r
      s$    6 			    urlc                 4    t        | ||t        |||||	       y)aj  
    Add a QR stamp to a file.

    :param input_name:
        Path to the input file.
    :param output_name:
        Path to the output file.
    :param style:
        QR stamp style to use.
    :param dest_page:
        Index of the page to which the stamp is to be applied (starting at `0`).
    :param x:
        Horizontal position of the stamp's lower left corner on the page.
    :param y:
        Vertical position of the stamp's lower left corner on the page.
    :param url:
        URL for the QR code to point to.
    :param text_params:
        Additional parameters for text template interpolation.
    )r%   r#   N)r!   r   )r   r   r   r   r   r   r%   r#   s           r    r	   r	   C   s'    > 		
r$   )N)$pyhanko.pdf_utils.incremental_writerr   qrr   r   textr   r   __all__strintr!   r
   r	   r   r$   r    <module>r-      s    I % +-
. 
   4 $$$ $ 	$
 $ $^ ))) ) 	)
 ) ) 
)r$   