Score:1

Create a PDF with version PDF/X-1a:2001

br flag

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?

Score:0
cl flag

I can't comment yet due to reputation, so I'll have to post this non-answer as an answer. You can install Scribus ( >= 1.5.1) and run scripts from the command line. You'd have to write a script that takes as input your original PDF file and converts it to your required standard.

br flag
This could be a fine answer. Can you add the command you have to enter on the commandline?
Cornul11 avatar
cl flag
@rubo77, I am not accustomed to using Scribus from the command line, but here's the documentation that describes a few typical workflows: https://wiki.scribus.net/canvas/Command_line_scripts
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.