ó
i#ñ]c           @   s{   d  d l  m Z d  d l  m Z d d d d e d „ Z d d d d d e d „ Z d d d d d e d „ Z d „  Z d S(   i   (   t   PDFKit(   t   Configurationc         C   s:   t  |  d d | d | d | d | d | ƒ} | j | ƒ S(   s  
    Convert file of files from URLs to PDF document

    :param url: URL or list of URLs to be saved
    :param output_path: path to output PDF file. False means file will be returned as string.
    :param options: (optional) dict with wkhtmltopdf global and page options, with or w/o '--'
    :param toc: (optional) dict with toc-specific wkhtmltopdf options, with or w/o '--'
    :param cover: (optional) string with url/filename with a cover html page
    :param configuration: (optional) instance of pdfkit.configuration.Configuration()
    :param configuration_first: (optional) if True, cover always precedes TOC

    Returns: True on success
    t   urlt   optionst   toct   covert   configurationt   cover_first(   R    t   to_pdf(   R   t   output_pathR   R   R   R   R   t   r(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/pdfkit/api.pyt   from_url   s    c   	      C   s@   t  |  d d | d | d | d | d | d | ƒ} | j | ƒ S(   s÷  
    Convert HTML file or files to PDF document

    :param input: path to HTML file or list with paths or file-like object
    :param output_path: path to output PDF file. False means file will be returned as string.
    :param options: (optional) dict with wkhtmltopdf options, with or w/o '--'
    :param toc: (optional) dict with toc-specific wkhtmltopdf options, with or w/o '--'
    :param cover: (optional) string with url/filename with a cover html page
    :param css: (optional) string with path to css file which will be added to a single input file
    :param configuration: (optional) instance of pdfkit.configuration.Configuration()
    :param configuration_first: (optional) if True, cover always precedes TOC

    Returns: True on success
    t   fileR   R   R   t   cssR   R   (   R    R   (	   t   inputR	   R   R   R   R   R   R   R
   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/pdfkit/api.pyt	   from_file   s    $c   	      C   s@   t  |  d d | d | d | d | d | d | ƒ} | j | ƒ S(   sı  
    Convert given string or strings to PDF document

    :param input: string with a desired text. Could be a raw text or a html file
    :param output_path: path to output PDF file. False means file will be returned as string.
    :param options: (optional) dict with wkhtmltopdf options, with or w/o '--'
    :param toc: (optional) dict with toc-specific wkhtmltopdf options, with or w/o '--'
    :param cover: (optional) string with url/filename with a cover html page
    :param css: (optional) string with path to css file which will be added to a input string
    :param configuration: (optional) instance of pdfkit.configuration.Configuration()
    :param configuration_first: (optional) if True, cover always precedes TOC

    Returns: True on success
    t   stringR   R   R   R   R   R   (   R    R   (	   R   R	   R   R   R   R   R   R   R
   (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/pdfkit/api.pyt   from_string4   s    $c          K   s
   t  |    S(   s½   
    Constructs and returns a :class:`Configuration` with given options

    :param wkhtmltopdf: path to binary
    :param meta_tag_prefix: the prefix for ``pdfkit`` specific meta tags
    (   R   (   t   kwargs(    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/pdfkit/api.pyR   K   s    N(	   t   pdfkitR    R   t   Nonet   FalseR   R   R   R   (    (    (    s?   /data/av2000/b2b/venv/lib/python2.7/site-packages/pdfkit/api.pyt   <module>   s   	