path_to_file = '/home/Mirex/PycharmProjects/parser/path_png'
name_of_file = '1.pdf'
page_to_open = 'https://www.google.com.ua/'
command_to_run = 'start chrome --headless --print-to-pdf="{0}{1}" {2}'.format(path_to_file, name_of_file,
page_to_open)
print('launch:' + command_to_run)
os.popen(command_to_run)
driver.quit()