
    TAi                     *    S r SSKJr   " S S\5      rg)zCCreates a ghostscript backend class to convert a pdf to a png file.    )ConversionBackendc            	       6    \ rS rSrSrS
S\S\S\SS4S jjrS	rg)GhostscriptBackend   z/Classmethod to create GhostscriptScriptBackend.pdf_pathpng_path
resolutionreturnNc                      SSK nSSSSUSU 3U/nUR                  " U6   g! [         a  n[        S5      UeSnAff = f)	zConvert a PDF to a PNG image using Ghostscript .

Parameters
----------
pdf_path : str
    [description]
png_path : str
    [description]
resolution : int, optional
    [description], by default 300

Raises
------
OSError
    [description]
r   NzGhostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/latest/user/install-deps.htmlgsz-qz-sDEVICE=png16mz-oz-r)ghostscriptModuleNotFoundErrorOSErrorGhostscript)selfr   r   r	   r   ex
gs_commands          `/var/www/html/land-ocr/venv/lib/python3.13/site-packages/camelot/backends/ghostscript_backend.pyconvertGhostscriptBackend.convert	   si    "	 

 	, # 	\ 	s   " 
=8= )i,  )	__name__
__module____qualname____firstlineno____doc__strintr   __static_attributes__r       r   r   r      s+    9"- "-s "- "-d "- "-r    r   N)r   camelot.backends.baser   r   r   r    r   <module>r"      s    I 3%-* %-r    