2018-09-27

I thought PDF solved this crap

This is all about the tools used, and how they maybe don't quite fit together sometimes.

I have been working with the people at Ivory Graphics, as you may know. Having done a few things with them I am now quite good and making the artwork in the right format for them.

Little things like, if I have a pack of cards, making it a single multi-page PDF is better for them than separate files for each card. It also ensures they know the order I want the cards to be in, which can be nice. Another small detail is interleaving the face and back of the cards in the PDF - this is crucial for a marked deck or a deck that has stuff separately on both sides of the cards for example, but they do have macros which will take one "back" and slot it in to a deck as well.

But how do I make the artwork?

Well, I start with SVG. In fact, for the card faces, I have SVG and C code, and the C code has some SVG in it (like shapes of the suits and digits), some it constructs with code, and some it pulls in from files (like the various layers of court card artwork) which I originally edited in inkscape, and it constructs final SVGs.

However, for the box designs I have used inkscape to create and edit. The original PDF from Ivory (they have templates on their web site) is imported in to inkscape, and split in to layers to allow me to make a design. In some cases I have then imported symbols and whole playing cards from my generated SVG. It works well.

I then have scripts which use inkscape command line to export PDFs and then pdfunite to make multiple page PDFs with card backs in the right order. I do the same for the box, making one PDF which has all of the cut and fold outlines for reference and one that does not, ready for printing. I view the PDFs either in Safari or using Preview on my Mac.

Here is the latest deluxe Stargate box design as an example. I exported as PNG from Preview:


I can, of course, view the SVG for this in Safari too, works well, except that the gate symbols at the top do not show! This is because they use SVG "symbols", which seem to not to always work in Safari for no good reason. In other cases they work fine, so really not clear. Also, bizarrely (having just checked this to make sure I was right) Safari has stopped using the fonts in the SVG (that are loaded on this Mac) so it actually looks very wrong indeed! That used to work, so I'll have to figure out why it is not (I did update my MacOS the other day). This is a screenshot from Safari on my Mac:


Anyway, the final product is PDF format, albeit using RGB colour space. Ivory Graphics cope very well with converting to CMYK for print, I have to say, so that has not been an issue.

PDFs "just work" as you probably know. They embed fonts as needed, and they are a consistent format, and I have never had any problem with PDFs, honest. Seriously, it is impressive - so many other formats for things, even (as you see above) SVGs, are not reliable, but PDFs just work. So it is very sensible of Ivory Graphics to prefer PDF as the means to send them artwork.

But, to my surprise, this is not always the case. It seems that the Stargate on the box causes problems, and it is not clear why. The same Stargate on the card backs was no problem! Loading the PDF broke horribly for them with bits missing in all sorts of places. The comment was "And when I attempt to crop it, other sections drop off.". This example is the previous version on a white background, but you can see the cards are broken badly, and bits of the gate are a mess. What on Earth is going wrong?


This was, I believe, loading in to Adobe Illustrator. To fix that she did something involving Photoshop and then Illustrator, and probably something else, and managed to sort it. But this time she failed, and different ways of loading caused error of not recognising a shading or getting colours wrong. She spent time creating new shading even but was not entirely happy with it.

I am really surprised by this to be honest, PDFs really should "just work".

However, there was a fix, which I stumbled upon, and it "worked perfectly" allowing the PDF to just import with no problems. The alternative was to make a raster PNG which would work, but can lose detail.

What did I do? I opened in "Preview" on the Mac, and did Export PDF from it. The result was on the wrong page size, and even rotated, and a different (smaller) file size, but still properly vector graphics, and apparently loaded with no problem in to Illustrator and whatever other tools she is using. The proofs she then produced just looked spot on, and no problems at all.

Unfortunately we live in a world where we are removed from the nuts and bolts of such file formats enough that you have to basically play around at a high level until something seems to work. It is a shame really, and not a situation I like. Whilst I have good understanding of Postscript and SVG (and PNG), I don't when it comes to PDFs. Someone that does could probably explain what inkscape did that was special in some way that it sometimes breaks Illustrator but not breaking Preview.

Just goes to show that some times the simplest solutions work best, and a useful tip for next time. And well done to Zsuzsa from Ivory for her hard work on this. It is nice dealing with a company that really do try to get things right.

3 comments:

  1. Not a comment on your issues, but I like the Easter eggs!

    ReplyDelete
  2. "PDF" and "consistent" in the same sentence? You're having a laugh: the PDF spec is horrific. All of the available libraries (both free and commercial) interpret parts differently. For the sake of your health, I wouldn't recommend you read it.

    ReplyDelete
  3. I know of many places that proof to PDF (on calibrated monitors that frequently cost more than the computers they use), but they proof to PDF using Adobe tools...

    ReplyDelete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.