(outputs, options)
return options.pdfname
Runs the PDF conversion command to generate the PDF.
Runs the PDF conversion command to generate the PDF.
Runs the PDF conversion command to generate the PDF .
def emit_pdf(outputs, options):
    '''Runs the PDF conversion command to generate the PDF.'''

    cmd = options.pdf_cmd
    cmd = cmd.replace('%o', options.pdfname)
    if len(outputs) > 2:
        cmd_print = cmd.replace('%i', ' '.join(outputs[:2] + ['...']))
    else:
        cmd_print = cmd.replace('%i', ' '.join(outputs))
    cmd = cmd.replace('%i', ' '.join(outputs))

    if not options.quiet:
        logger.info('running PDF command "{}"...'.format(cmd_print))

    try:
        result = subprocess.call(shlex.split(cmd))
    except OSError:
        result = -1

    if result == 0:
        if not options.quiet:
            logger.info('  wrote', options.pdfname)
    else:
        logger.error('warning: PDF command failed\n')
    return options.pdfname
def emit_pdf ( outputs , options ) : cmd = options . pdf_cmd cmd = cmd . replace ( '%o' , options . pdfname ) if len ( outputs ) > 2 : cmd_print = cmd . replace ( '%i' , ' ' . join ( outputs [ : 2 ] + [ '...' ] ) ) else : cmd_print = cmd . replace ( '%i' , ' ' . join ( outputs ) ) cmd = cmd . replace ( '%i' , ' ' . join ( outputs ) ) if not options . quiet : logger . info ( 'running PDF command "{}"...' . format ( cmd_print ) ) try : result = subprocess . call ( shlex . split ( cmd ) ) except OSError : result = - 1 if result == 0 : if not options . quiet : logger . info ( '  wrote' , options . pdfname ) else : logger . error ( 'warning: PDF command failed\n' ) return options . pdfname