
    A j                     J    d dl Z d dlZd dlmZ d Zd Z G d de          ZdS )    Nfind_libraryc                  (    t          d          } | d uS )Ngsr   librarys    xC:\Users\Terasoftware\OneDrive\Desktop\faahhh\fyndo\fyndo\venv\Lib\site-packages\camelot/backends/ghostscript_backend.pyinstalled_posixr
      s    4  G$    c            
          t          d                    dt          t          j        t          j                  dz            df                    } | d uS )N gsdll   z.dll)r   joinstrctypessizeofc_voidpr   s    r	   installed_windowsr      sM    
#fmFN;;a?@@&IJJ G $r   c                       e Zd Zd ZddZdS )GhostscriptBackendc                     t           j        dv rt                      S t           j        dk    rt                      S t                      S )N)linuxdarwinwin32)sysplatformr
   r   )selfs    r	   	installedzGhostscriptBackend.installed   sE    <.. 	%"$$$\W$ 	%$&&&"$$$r   ,  c                     |                                  st          d          dd l}dddd|d| |g} |j        |  d S )NzGhostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.htmlr   r   z-qz-sDEVICE=png16mz-oz-r)r   OSErrorghostscriptGhostscript)r   pdf_pathpng_path
resolutionr#   
gs_commands         r	   convertzGhostscriptBackend.convert   sx    ~~ 	\  
 	 

 	 ,,,,r   N)r    )__name__
__module____qualname__r   r)    r   r	   r   r      s7        % % %- - - - - -r   r   )r   r   ctypes.utilr   r
   r   objectr   r-   r   r	   <module>r0      s}    


  $ $ $ $ $ $  
  - - - - - - - - - -r   