JoshData / pdf-diff

A PDF comparison utility in Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax Warning: Invalid Font Weight

todrobbins opened this issue · comments

Not sure if this warning is a pdf.js error (since I went with https://github.com/JoshData/pdf-diff#node-version being on OSX) or a pdf-diff error:

➜  pdf-diff git:(master) ✗ python3 pdf-diff.py --changes < changes.json > test.png
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight
Syntax Warning: Invalid Font Weight

The output turned out alright, so I'm not sure what's going on. Thanks!

It's a pdf.js thing, so I have no idea what it means. :) Since the output is OK let's assume it's just a warning and I'll close the issue.

On Monday I re-wrote that part in Python, for what it's worth.

That means you have a PDF object definition with non standard value, for example "/FontWeight 350/". If you open the PDF file in a text editor, you can find it. From PDF specification on Adobe site:
The Weight (thickness) component of the fully qualified font name or font specifier. The possible values shall be 100, 200, 300, 400, 500, 600, 700, 800, or 900, where each number indicates a weight that is at least as dark as its predecessor. A value of 400 shall indicate a normal weight; 700 shall indicate bold.