Skip to content

Instantly share code, notes, and snippets.

View rootwork's full-sized avatar

Ivan Boothe rootwork

View GitHub Profile
@rootwork
rootwork / svg-to-pdf-cmyk.md
Last active September 16, 2024 10:53
Creating a 300dpi CMYK PDF from an SVG (on Linux)

Creating a 300dpi CMYK PDF from an SVG (on Linux)

SVGs generated from the web, and any SVGs from Inkscape, will be in the RGB colorspace. To convert it to CMYK for printing, there are basically two major steps: Converting the SVG to a PDF, and then converting the PDF from RGB to CMYK.

Note that CMYK and RGB are literally different types of color; there is not and cannot be a 1:1 correspondence between their colors, so if you need to regularly design for print you should be using CMYK from the beginning (not tacking it on at the end) -- and for that, unfortunately, the only option is Adobe Illustrator.

Anyway, this is what worked for me to convert an RGB SVG to a CMYK PDF with a specific DPI.

Untested options

@rootwork
rootwork / image-date-filename.sh
Last active October 14, 2021 00:03
Set a folder of images to have sequential dates in metadata based on filenames
# I had a directory of images that were alphabetized by file name, and I wanted
# to import them into a popular photo-printing service. I wanted to order them
# by filename, but this particular service only offered sorting by the date the
# photos were taken (forward or back).
#
# So I went about finding out how to create sequential creation dates for these
# photos' metadata based on their alphabetized file names. The actual date set
# didn't matter to me, because all I wanted them to be was in order.
#
# Note this is NOT a script to run, rather it's a series of commands and
@rootwork
rootwork / dropbutton-unset.scss
Last active May 11, 2017 02:06
Unset dropbutton/splitbutton in Drupal 8.3.x (convert dropbutton to side-by-side buttons)
@media screen and (min-width: 640px) {
.form-actions .dropbutton-wrapper {
float: none;
}
}
.js .form-actions .dropbutton-widget,
.js td .dropbutton-widget,
.dropbutton-widget {
border: 0;