(data, ctx, pid)
post-process routine right after adding a new pdf
post-process routine right after adding a new pdf
post - process routine right after adding a new pdf
def postprocess(data, ctx, pid):
    """ post-process routine right after adding a new pdf"""
    log_info("Start compressing {0}".format(pid))
    data = do_compress(data, pid)

    try:
        log_info("Start converting to html {0}".format(pid))
        do_addhtml(data, pid)
    except Exception as e:
        log_exc("Error converting to html")

    try:
        log_info("Start converting to text {0}".format(pid))
        do_buildindex(ctx, data, pid)
    except Exception as e:
        log_exc("Error converting to text")
def postprocess ( data , ctx , pid ) : log_info ( "Start compressing {0}" . format ( pid ) ) data = do_compress ( data , pid ) try : log_info ( "Start converting to html {0}" . format ( pid ) ) do_addhtml ( data , pid ) except Exception as e : log_exc ( "Error converting to html" ) try : log_info ( "Start converting to text {0}" . format ( pid ) ) do_buildindex ( ctx , data , pid ) except Exception as e : log_exc ( "Error converting to text" )