PeterSmith.Org

SVG to PDF


I'm using Yihui Xie's most excellent bookdown package to create my courseguide for BUSINESS 705.

One problem I have is that I use SVG images. That's all well and good when I am rendering the courseguide as an HTML book, but when I try and produce a PDF, bookdown (well LaTeX) chokes. It's no one's fault really. It's just a fact of life.

So, I need to convert my SVG images into PDFs. That'll fix the problem.

The way I do it is


inkscape mygraph.svg --export-pdf=mygraph.pdf

Easy!

I then created a Makefile to cycle through all the SVGs in the images director and convert them. I'm not sure how smart the Makefile is, but it works.

#
# Convert the SVG files to PDFs
#

SVGFILES := $(wildcard *.svg)

all: $(SVGFILES:%.svg=%.pdf)

%.pdf : %.svg
    inkscape --export-pdf $*.pdf $*.svg
If you webmention this page, please let me know the URL of your page.

BTW: Your webmention won't show up until I next "build" my site.

Show all the shares aka https://keithjgrant.com/posts/2019/01/low-friction-workflow-for-notes/