I need to create a PDF file on the console in the format
- 300 DPI
- PDF-VERSION: PDF/X-1a:2001
- Colors: Coated Fogra 39
I use python to take a screenshot in 5 dpi from a ZeroNet site with selenium:
options = Options()
options.headless = True
profile = webdriver.FirefoxProfile("/home/ruben/.mozilla/firefox/akp96vh9.bookmarks")
profile.set_preference("layout.css.devPixelsPerPx", 5) # DPI
driver = webdriver.Firefox(options=options, firefox_profile=profile)
driver.get(some_site)
WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.XPATH, '//*[@id="inner-iframe"]'))
)
zero_frame = driver.find_element_by_xpath('//*[@id="inner-iframe"]')
driver.switch_to.frame(zero_frame)
time.sleep(5)
cards = driver.find_element_by_id("overlay");
cards.location_once_scrolled_into_view
cards.screenshot("screenshot.png")
This creates a screenshot that I convert to PDF with:
convert -profile sRGB.icc -profile CoatedFOGRA39.icc -units PixelsPerInch -density 300 -resize 7016x9922 screenshot.png final_print.dpf
But this creates a PDF with Version 1.7 with transparency
How can I convert it into PDF-VERSION: PDF/X-1a:2001 on linux?