def render_pdf_file_to_image_files__ghostscript_png(pdf_file_name,
                                                    root_output_file_path,
                                                    res_x=150, res_y=150):
    """Use Ghostscript to render a PDF file to .png images.  The root_output_file_path
    is prepended to all the output files, which have numbers and extensions added.
    Return the command output."""
    # For gs commands see
    # http://ghostscript.com/doc/current/Devices.htm#File_formats
    # http://ghostscript.com/doc/current/Devices.htm#PNG
    if not gs_executable: init_and_test_gs_executable(exit_on_fail=True)
    command = [gs_executable, "-dBATCH", "-dNOPAUSE", "-sDEVICE=pnggray",
               "-r"+res_x+"x"+res_y, "-sOutputFile="+root_output_file_path+"-%06d.png",
               pdf_file_name]
    comm_output = get_external_subprocess_output(command, env=gs_environment)
    return comm_output
Use Ghostscript to render a PDF file to .png images.  The root_output_file_path
    is prepended to all the output files, which have numbers and extensions added.
    Return the command output.