
    '	4j6                     r     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y
)c                       e Zd Zy)FPDFExceptionN)__name__
__module____qualname__     8/DATA/.local/lib/python3.12/site-packages/fpdf/errors.pyr   r      s    r   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 givenargumentunknownonereturnNc                 j    t         |           |r|rt        d      || _        || _        || _        y )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                     | j                   j                   d| j                  d| j                  d| j                  dS )N(z, ))r   r   r   r   r   r   s    r	   __repr__z FPDFPageFormatException.__repr__   s@    ~~&&' 4<<"2"TXXL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__   sX    <<)$--9CXX-dmm_<QRC--C..))+2cU33r   )FF)
r   r   r   __doc__strboolr   r   r   __classcell__r   s   @r	   r   r      s@    9	 	t 	$ 	SW 	
# 
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                 L    t         |           || _        || _        || _        y )N)r   r   r%   r&   r'   )r   r%   r&   r'   r   s       r	   r   z%FPDFUnicodeEncodingException.__init__&   s#    $""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__,   sH    ..))*!D,A4CWY]^b^l^lYm,m+nnoppr   c                 V    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__/   s8    $..)T__4E F--1^^,< =55	
r   )
r   r   r   r   intr   r   r   r   r!   r"   s   @r	   r$   r$   #   sA    c#3 #3 #3 #4 #q# q
 
r   r$   c                       e Zd ZdZy)ComplianceErrorzDBase class for standards-compliance violations (PDF/A, PDF/X, etc.).Nr   r   r   r   r   r   r	   r.   r.   7   s    Nr   r.   c                       e Zd ZdZy)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      sE   	I 	4m 4<
= 
(Om Oa/ ar   