
    Rj6                          G d  de           Z G d de          Z G d de          Z G d de          Z G d d	e          Zd
S )c                       e Zd ZdS )FPDFExceptionN)__name__
__module____qualname__     L/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/fpdf/errors.pyr   r      s        Dr   r   c            	       N     e Zd ZdZddedededdf fdZdefd	Zdefd
Z xZ	S )FPDFPageFormatExceptionz/Error is thrown when a bad page format is givenFargumentunknownonereturnNc                     t                                                       |r|rt          d          || _        || _        || _        d S )Nz\FPDF Page Format Exception cannot be both for unknown type and for wrong number of arguments)super__init__	TypeErrorr   r   r   )selfr   r   r   	__class__s       r	   r   z FPDFPageFormatException.__init__   s[     	s 	A   !r   c                 P    | j         j         d| j        d| j        d| j        dS )N(z, ))r   r   r   r   r   r   s    r	   __repr__z FPDFPageFormatException.__repr__   sT    ~& C CC C#'<C C59XC C C	
r   c                 |    | j         rd| j         }n| j        rd| j         d}n| j        }| j        j         d| S )NzUnknown page format: zOnly one argument given: z. Need (height,width)z: )r   r   r   r   r   )r   ress     r	   __str__zFPDFPageFormatException.__str__   s[    < 	 9$-99CCX 	 RdmRRRCC-C.)33c333r   )FF)
r   r   r   __doc__strboolr   r   r   __classcell__r   s   @r	   r   r      s        99	 	 	t 	$ 	SW 	 	 	 	 	 	
# 
 
 
 
4 4 4 4 4 4 4 4 4r   r   c                   L     e Zd ZdZdedededdf fdZdefdZdefd	Z xZ	S )
FPDFUnicodeEncodingExceptionzYError is thrown when a character that cannot be encoded by the chosen encoder is provided
text_index	character	font_namer   Nc                 r    t                                                       || _        || _        || _        d S )N)r   r   r%   r&   r'   )r   r%   r&   r'   r   s       r	   r   z%FPDFUnicodeEncodingException.__init__&   s2    $""r   c                     | j         j         dt          | j                  t          | j                  t          | j                  f dS )Nr   r   )r   r   reprr%   r&   r'   r   s    r	   r   z%FPDFUnicodeEncodingException.__repr__,   sF    .)ppD,A,A4CWCWY]^b^lYmYm+nppppr   c                 8    d| j          d| j         d| j         dS )NzCharacter "z" at index zI in text is outside the range of characters supported by the font used: "z(". Please consider using a Unicode font.)r&   r%   r'   r   s    r	   r   z$FPDFUnicodeEncodingException.__str__/   s<    5$. 5 5T_ 5 5-1^5 5 5	
r   )
r   r   r   r   intr   r   r   r   r!   r"   s   @r	   r$   r$   #   s        cc#3 #3 #3 #4 # # # # # #q# q q q q
 
 
 
 
 
 
 
 
r   r$   c                       e Zd ZdZdS )ComplianceErrorzDBase class for standards-compliance violations (PDF/A, PDF/X, etc.).Nr   r   r   r   r   r   r	   r.   r.   7   s        NNNNr   r.   c                       e Zd ZdZdS )PDFAComplianceErrorzVRaised when an operation would produce a PDF that violates the selected PDF/A profile.Nr/   r   r   r	   r1   r1   ;   s        ````r   r1   N)	Exceptionr   r   r$   r.   r1   r   r   r	   <module>r3      s   	 	 	 	 	I 	 	 	4 4 4 4 4m 4 4 4<
 
 
 
 
= 
 
 
(O O O O Om O O Oa a a a a/ a a a a ar   