o
    @@i                     @   sz   d Z ddlZddlZddlmZ ddlmZ ddlmZ	 ddl
mZ ddlmZ ddlmZ ddlmZ G d	d
 d
ZdS )a5  
    The Portable Document Format (PDF) is a file format developed by Adobe in 1993 to present documents,
    including text formatting and images, in a manner independent of application software, hardware, and operating systems.
    Based on the PostScript language, each PDF file encapsulates a complete description of a fixed-layout flat document,
    including the text, fonts, vector graphics, raster images and other information needed to display it.
    PDF was standardized as ISO 32000 in 2008, and no longer requires any royalties for its implementation.
    N)AnyObjectTransformer)ReadTransformerState)WriteTransformerState)&AsyncUsageStatisticsWithFairUseWarning)EventListener)Documentc                
   @   sv   e Zd ZdZedejejej	f de
ddfddZeg dfdejejej	f deje d	eje de
fd
dZdS )PDFa  
    The Portable Document Format (PDF) is a file format developed by Adobe in 1993 to present documents,
    including text formatting and images, in a manner independent of application software, hardware, and operating systems.
    Based on the PostScript language, each PDF file encapsulates a complete description of a fixed-layout flat document,
    including the text, fonts, vector graphics, raster images and other information needed to display it.
    PDF was standardized as ISO 32000 in 2008, and no longer requires any royalties for its implementation.

    PDF files may contain a variety of content besides flat text and graphics including logical structuring elements,
    interactive elements such as annotations and form-fields, layers, rich media (including video content),
    and three-dimensional objects using U3D or PRC, and various other data formats.

    The PDF specification also provides for encryption and digital signatures,
    file attachments, and metadata to enable workflows requiring these features.
    filedocumentreturnNc                 C   s,   t j|dd t j|t|| d| d dS )z
        This function writes a Document to a byte-stream output (which may be presented as an io.BufferedIOBase o io.RawIOBase)
        	PDF.dumpsr
   
event_name)root_objectdestination)object_to_transformcontextr   N)r   send_usage_statisticsWriteAnyObjectTransformer	transformr   )r	   r
    r   J/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/borb/pdf/pdf.pydumps7   s   
r   event_listenerspasswordc                 C   s,   t  j| dt|d|d}tj|dd |S )z
        This function reads a byte-stream input (which may be presented as an io.BufferedIOBase o io.RawIOBase)
        and returns a Document.
        N)r   )parent_objectr   r   	PDF.loadsr   )ReadAnyObjectTransformerr   r   r   r   )r	   r   r   r
   r   r   r   loadsK   s   
r   )__name__
__module____qualname____doc__staticmethodtypingUnionioBufferedIOBase	RawIOBaser   r   Listr   Optionalstrr   r   r   r   r   r      s,    r   )r"   r&   r$   #borb.io.read.any_object_transformerr   r   borb.io.read.transformerr   $borb.io.write.any_object_transformerr   borb.io.write.transformerr   9borb.license.async_usage_statistics_with_fair_use_warningr   $borb.pdf.canvas.event.event_listenerr   borb.pdf.document.documentr   r   r   r   r   r   <module>   s   