Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Send to Docverter: how to specify a font?
-
Hello. I have purchased Editorial in order to convert pandoc to PDF using ‘Send to Docverter’ or similar scripts.
My pandoc file contains diacritics. The conversion to MS Word works fine and preserves the diacritics, but the conversion to PDF does not. I imagine the problem is the font being used in the PDF creation.
I've uploaded the menlo.ttc into my dropbox folder, and I've specified the dropbox folder in wcaleb's ‘Send to Docverter’ script. But I've been unsuccessful in customising the CSS (by specifying a @font-face) to output a PDF -- I keep getting a ‘500 server error’ in the console.
I'd be grateful for help on how to do this. Many thanks in advance.
-
More specifically, here is my custom CSS:
@font-face { font-family: 'Menlo'; font-style: normal; font-weight: 400; src: url('Menlo.ttc'); -fs-pdf-font-embed: embed; -fs-pdf-font-encoding: Identity-H; } body { font-family: 'Menlo'; margin: 1em; } p {line-height: 1.2em; text-align: justify;} h1, h2, h3, h4 {font-weight: normal;} sup {line-height: 0;} hr {border: 1px #eee solid; margin-top: 2em; margin-bottom: 2em; width: 70%;} pre {white-space: pre-wrap; word-wrap: break-word;} @page {margin: 1in; @bottom-center{content: counter(page)};}
and this is the current error message:
Traceback (most recent call last): File "/var/mobile/Containers/Data/Application/166B2E8E-2D46-4B7A-BE3C-B1B9C378D0F4/Library/Application Support/Commands/workflow_action_tmp.py", line 189, in out_to_file request = post_multipart(formats.items() + fields, files) File "/var/mobile/Containers/Data/Application/166B2E8E-2D46-4B7A-BE3C-B1B9C378D0F4/Library/Application Support/Commands/workflow_action_tmp.py", line 79, in post_multipart workflow.stop() KeyboardInterrupt: Workflow stopped