+
    f0i`                         R t ^ RIt^ RIt^ RIHtHt ^ RIHt ^ RIH	t	H
t
Ht ^ RIHtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHtHt ^ R	IHt ^ R
IHtHt ^ RIH t  ^ RI!H"t"H#t#H$t$ RR R llt%RR R llt&RR R llt'R# )zIFunctions that can be used for the most common use-cases for pdfminer.sixN)	ContainerIterator)StringIO)AnyBinaryIOcast)HOCRConverterHTMLConverterPDFPageAggregatorTextConverterXMLConverter)ImageWriter)LAParamsLTPage)	PDFDeviceTagExtractor)PDFValueError)PDFPageInterpreterPDFResourceManager)PDFPage)AnyIO
FileOrNameopen_filenamec          "         V ^8  d   QhR\         R\        R\        R\        R\        R,          R\        R\
        \        ,          R,          R	\        R
\        R\        R\        R\        R,          R\        R\        R\        R\        RR/# )   infoutfpoutput_typecodeclaparamsNmaxpagespage_numberspasswordscalerotation
layoutmode
output_dirstrip_controldebugdisable_cachingkwargsreturn)	r   r   strr   intr   floatboolr   )formats   "Y/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/pdfminer/high_level.py__annotate__r2      s     w w	ww w 	w
 ow w C.4'w w w w w d
w w w w  !w" 
#w    c           
     V   V'       d3   \         P                  ! 4       P                  \         P                  4       RpV'       d   \	        V4      p\        V'       * R7      pRpVR8w  d0   V\        P                  8X  d   \        P                  P                  pVR8X  d   \        VVVVVR7      pMVR8X  d   \        VVVVVVR7      pMfVR8X  d   \        VVVVV
VVR7      pMLVR	8X  d   \        VVVVVR
7      pM4VR8X  d   \        V\        \        V4      VR7      pMRV 2p\!        V4      hVf   Q h\#        VV4      p\$        P&                  ! V VVVV'       * R7       F3  pVP(                  V	,           R,          Vn        VP+                  V4       K5  	  VP-                  4        R# )a  Parses text from inf-file and writes to outfp file-like object.

Takes loads of optional arguments but the defaults are somewhat sane.
Beware laparams: Including an empty LAParams is not the same as passing
None!

:param inf: a file-like object to read PDF structure from, such as a
    file handler (using the builtin `open()` function) or a `BytesIO`.
:param outfp: a file-like object to write the text to.
:param output_type: May be 'text', 'xml', 'html', 'hocr', 'tag'.
    Only 'text' works properly.
:param codec: Text decoding codec
:param laparams: An LAParams object from pdfminer.layout. Default is None
    but may not layout correctly.
:param maxpages: How many pages to stop parsing after
:param page_numbers: zero-indexed page numbers to operate on.
:param password: For encrypted PDFs, the password to decrypt.
:param scale: Scale factor
:param rotation: Rotation factor
:param layoutmode: Default is 'normal', see
    pdfminer.converter.HTMLConverter
:param output_dir: If given, creates an ImageWriter for extracted images.
:param strip_control: Does what it says on the tin
:param debug: Output more logging data
:param disable_caching: Does what it says on the tin
:param other:
:return: nothing, acting as it does on two streams. Use StringIO to get
    strings.
Ncachingtext)r   r   imagewriterxml)r   r   r8   stripcontrolhtml)r   r#   r%   r   r8   hocr)r   r   r:   tag)r   z1Output type can be text, html, xml or tag but is r    r"   r6   ih  )logging	getLoggersetLevelDEBUGr   r   sysstdoutbufferr   r   r	   r   r   r   r   r   r   r   	get_pagesrotateprocess_pageclose)r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r8   rsrcmgrdevicemsginterpreterpages   &&&&&&&&&&&&&&&,      r1   extract_text_to_fprO      s   ^ $$W]]3K!*- _)<=G#Ff#**!4

!!f#
 
	#&
 
	!#
 
	&
 
	gtHe'<EJ B+OC  $Wf5K!!## {{X-4  & LLNr3   c                    V ^8  d   QhR\         R\        R\        \        ,          R,          R\        R\        R\        R\
        R,          R	\        /# )
r   pdf_filer"   r!   Nr    r6   r   r   r+   )r   r,   r   r-   r/   r   )r0   s   "r1   r2   r2      se     (( (((((( C.4'(( 	((
 (( (( o(( 	((r3   c                   Vf   \        4       p\        V R4      ;_uu_ 4       p\        4       ;_uu_ 4       p\        \        V4      p\        VR7      p	\        WWVR7      p
\        W4      p\        P                  ! VVVVVR7       F  pVP                  V4       K  	  VP                  4       uuRRR4       uuRRR4       #   + '       g   i     M; iRRR4       R#   + '       g   i     R# ; i)aK  Parse and return the text contained in a PDF file.

:param pdf_file: Either a file path or a file-like object for the PDF file
    to be worked on.
:param password: For encrypted PDFs, the password to decrypt.
:param page_numbers: List of zero-indexed page numbers to extract.
:param maxpages: The maximum number of pages to parse
:param caching: If resources should be cached
:param codec: Text decoding codec
:param laparams: An LAParams object from pdfminer.layout. If None, uses
    some default settings that often work well.
:return: a string containing all of the text extracted.
Nrbr5   )r   r   r>   )r   r   r   r   r   r   r   r   r   rF   rH   getvalue)rQ   r"   r!   r    r6   r   r   fpoutput_stringrJ   rK   rM   rN   s   &&&&&&&      r1   extract_textrW      s    , :	x	&	&"hjjM(B$W5wUV(9%%
D $$T*
 %%' /9j	&	&jj	&	&	&	&s#   CA7C	-
CCCC0	c                    V ^8  d   QhR\         R\        R\        \        ,          R,          R\        R\        R\
        R,          R\        \        ,          /# )	r   rQ   r"   r!   Nr    r6   r   r+   )r   r,   r   r-   r/   r   r   r   )r0   s   "r1   r2   r2      s`     % %%% C.4'% 	%
 % o% f%r3   c           
   #    "   Vf   \        4       p\        V R4      ;_uu_ 4       p\        \        V4      p\	        VR7      p\        WuR7      p\        Wx4      p	\        P                  ! VVVVVR7       F(  p
V	P                  V
4       VP                  4       pVx  K*  	  RRR4       R#   + '       g   i     R# ; i5i)a  Extract and yield LTPage objects

:param pdf_file: Either a file path or a file-like object for the PDF file
    to be worked on.
:param password: For encrypted PDFs, the password to decrypt.
:param page_numbers: List of zero-indexed page numbers to extract.
:param maxpages: The maximum number of pages to parse
:param caching: If resources should be cached
:param laparams: An LAParams object from pdfminer.layout. If None, uses
    some default settings that often work well.
:return: LTPage objects
NrS   r5   )r   r>   )r   r   r   r   r   r
   r   r   rF   rH   
get_result)rQ   r"   r!   r    r6   r   rU   resource_managerrK   rM   rN   layouts   &&&&&&      r1   extract_pagesr]      s     ( :	x	&	&"(B-g>"#3G()9B%%
D $$T*&&(FL
 
'	&	&	&s   #B>A;B* 
B>*B;	5	B>)r7   utf-8N    N g      ?r_   normalNFFF)r`   Nr_   Tr^   N)r`   Nr_   TN)(__doc__r?   rC   collections.abcr   r   ior   typingr   r   r   pdfminer.converterr   r	   r
   r   r   pdfminer.imager   pdfminer.layoutr   r   pdfminer.pdfdevicer   r   pdfminer.pdfexceptionsr   pdfminer.pdfinterpr   r   pdfminer.pdfpager   pdfminer.utilsr   r   r   rO   rW   r]    r3   r1   <module>ro      sU    O  
 /  & &  ' , 6 0 E $ ; ;wt((V% %r3   