public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Why does Pandoc fail to create a PDF for certain fonts, but works for other fonts with otherwise the same command?
@ 2020-02-11 14:05 tutiluren via pandoc-discuss
       [not found] ` <M-oZQZd--3-2-q7wo9g+UVklWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: tutiluren via pandoc-discuss @ 2020-02-11 14:05 UTC (permalink / raw)
  To: Pandoc Discuss

[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]

This command WORKS (creates a PDF with the "Arial" font):

    pandoc --pdf-engine=xelatex -V pagestyle="empty" -V mainfont="Arial" -V monofont="Arial" -V fontsize=10pt --verbose -V papersize="A4" -V margin-top="2cm" -V margin-right="2cm" -V margin-bottom="2cm" -V margin-left="2cm" "test.md" -o "out.pdf"

This command also WORKS (creates a PDF with the "Courier New" font):

    pandoc --pdf-engine=xelatex -V pagestyle="empty" -V mainfont="Courier New" -V monofont="Courier New" -V fontsize=10pt --verbose -V papersize="A4" -V margin-top="2cm" -V margin-right="2cm" -V margin-bottom="2cm" -V margin-left="2cm" "test.md" -o "out.pdf"

However, both these commands FAIL (no PDF created at all):

    pandoc --pdf-engine=xelatex -V pagestyle="empty" -V mainfont="Courier" -V monofont="Courier" -V fontsize=10pt --verbose -V papersize="A4" -V margin-top="2cm" -V margin-right="2cm" -V margin-bottom="2cm" -V margin-left="2cm" "test.md" -o "out.pdf"

    pandoc --pdf-engine=xelatex -V pagestyle="empty" -V mainfont="Courier Standard" -V monofont="Courier Standard" -V fontsize=10pt --verbose -V papersize="A4" -V margin-top="2cm" -V margin-right="2cm" -V margin-bottom="2cm" -V margin-left="2cm" "test.md" -o "out.pdf"

From the massive dump of output (containing lots of private paths and stuff), I was able to extract out these clues:

    xdvipdfmx:fatal: This font using the "seac" command for accented characters...
    No output PDF file written.

What does it mean? What exactly is wrong? In Windows' font dir, there is a "Courier Standard", which, when opened, is simply called "Courier". Both of those strings result in the nonsensical error.

Pandoc version: 2.9.1.1

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/M-oZQZd--3-2%40tutanota.com.

[-- Attachment #2: Type: text/html, Size: 2843 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why does Pandoc fail to create a PDF for certain fonts, but works for other fonts with otherwise the same command?
       [not found] ` <M-oZQZd--3-2-q7wo9g+UVklWk0Htik3J/w@public.gmane.org>
@ 2020-02-11 14:21   ` Joost Kremers
       [not found]     ` <87lfp9nr1b.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Joost Kremers @ 2020-02-11 14:21 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Tue, Feb 11 2020, tutiluren via pandoc-discuss wrote:
> This command WORKS (creates a PDF with the "Arial" font):
>
>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>     mainfont="Arial" -V monofont="Arial" -V fontsize=10pt 
>     --verbose -V papersize="A4" -V margin-top="2cm" -V 
>     margin-right="2cm" -V margin-bottom="2cm" -V 
>     margin-left="2cm" "test.md" -o "out.pdf"
>
> This command also WORKS (creates a PDF with the "Courier New" 
> font):
>
>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>     mainfont="Courier New" -V monofont="Courier New" -V 
>     fontsize=10pt --verbose -V papersize="A4" -V 
>     margin-top="2cm" -V margin-right="2cm" -V 
>     margin-bottom="2cm" -V margin-left="2cm" "test.md" -o 
>     "out.pdf"
>
> However, both these commands FAIL (no PDF created at all):
>
>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>     mainfont="Courier" -V monofont="Courier" -V fontsize=10pt 
>     --verbose -V papersize="A4" -V margin-top="2cm" -V 
>     margin-right="2cm" -V margin-bottom="2cm" -V 
>     margin-left="2cm" "test.md" -o "out.pdf"
>
>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>     mainfont="Courier Standard" -V monofont="Courier Standard" 
>     -V fontsize=10pt --verbose -V papersize="A4" -V 
>     margin-top="2cm" -V margin-right="2cm" -V 
>     margin-bottom="2cm" -V margin-left="2cm" "test.md" -o 
>     "out.pdf"
>
> From the massive dump of output (containing lots of private 
> paths and stuff), I was able to extract out these clues:
>
>     xdvipdfmx:fatal: This font using the "seac" command for 
>     accented characters...
>     No output PDF file written.
>
> What does it mean? What exactly is wrong? In Windows' font dir, 
> there is a "Courier Standard", which, when opened, is simply 
> called "Courier". Both of those strings result in the 
> nonsensical error.

DuckDuckGo is your friend. :-) The info I'm finding on the net is 
that this indicates the font you're using is a Postscript Type 1 
font, which XeTeX doesn't fully support. It should work if you use 
is a TTF or an OTF font. (The file name should have a `.ttf` or 
`.otf` file extension. Type 1 fonts will have `.pfb`, `.pfm` or 
`.afm`, according to Wikipedia.)

Note that the name under which a font is known to the system (and 
under which XeLaTeX would search for it) is not necessarily 
identical to the file name of the font on disk. The Windows 
control panel should have an option to view the fonts installed on 
your system. (Just quoting what I read online here. I can't check 
myself because I don't have access to Windows.)

HTH

-- 
Joost Kremers
Life has its moments


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why does Pandoc fail to create a PDF for certain fonts, but works for other fonts with otherwise the same command?
       [not found]     ` <87lfp9nr1b.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2020-02-11 14:24       ` Craig Parker
  2020-02-11 14:44       ` tutiluren via pandoc-discuss
  1 sibling, 0 replies; 6+ messages in thread
From: Craig Parker @ 2020-02-11 14:24 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4121 bytes --]

I had trouble with the Microsoft fonts. I'd specified Arial and Courier 
New, and I can't remember exactly what the problem was (some characters 
not printing or some such), but was allowed to go back to NotoSans and 
SourceCodePro, so I didn't give it another thought.

On 2/11/20 9:21 AM, Joost Kremers wrote:
>
> On Tue, Feb 11 2020, tutiluren via pandoc-discuss wrote:
>> This command WORKS (creates a PDF with the "Arial" font):
>>
>>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>> mainfont="Arial" -V monofont="Arial" -V fontsize=10pt --verbose -V 
>> papersize="A4" -V margin-top="2cm" -V margin-right="2cm" -V 
>> margin-bottom="2cm" -V margin-left="2cm" "test.md" -o "out.pdf"
>>
>> This command also WORKS (creates a PDF with the "Courier New" font):
>>
>>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>> mainfont="Courier New" -V monofont="Courier New" -V fontsize=10pt 
>> --verbose -V papersize="A4" -V margin-top="2cm" -V margin-right="2cm" 
>> -V margin-bottom="2cm" -V margin-left="2cm" "test.md" -o "out.pdf"
>>
>> However, both these commands FAIL (no PDF created at all):
>>
>>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>> mainfont="Courier" -V monofont="Courier" -V fontsize=10pt --verbose 
>> -V papersize="A4" -V margin-top="2cm" -V margin-right="2cm" -V 
>> margin-bottom="2cm" -V margin-left="2cm" "test.md" -o "out.pdf"
>>
>>     pandoc --pdf-engine=xelatex -V pagestyle="empty" -V 
>> mainfont="Courier Standard" -V monofont="Courier Standard" -V 
>> fontsize=10pt --verbose -V papersize="A4" -V margin-top="2cm" -V 
>> margin-right="2cm" -V margin-bottom="2cm" -V margin-left="2cm" 
>> "test.md" -o "out.pdf"
>>
>> From the massive dump of output (containing lots of private paths and 
>> stuff), I was able to extract out these clues:
>>
>>     xdvipdfmx:fatal: This font using the "seac" command for accented 
>> characters...
>>     No output PDF file written.
>>
>> What does it mean? What exactly is wrong? In Windows' font dir, there 
>> is a "Courier Standard", which, when opened, is simply called 
>> "Courier". Both of those strings result in the nonsensical error.
>
> DuckDuckGo is your friend. :-) The info I'm finding on the net is that 
> this indicates the font you're using is a Postscript Type 1 font, 
> which XeTeX doesn't fully support. It should work if you use is a TTF 
> or an OTF font. (The file name should have a `.ttf` or `.otf` file 
> extension. Type 1 fonts will have `.pfb`, `.pfm` or `.afm`, according 
> to Wikipedia.)
>
> Note that the name under which a font is known to the system (and 
> under which XeLaTeX would search for it) is not necessarily identical 
> to the file name of the font on disk. The Windows control panel should 
> have an option to view the fonts installed on your system. (Just 
> quoting what I read online here. I can't check myself because I don't 
> have access to Windows.)
>
> HTH
>
-- 
Learn by Doing with Linux Academy Multicloud Training 
<https://linuxacademy.com>

	*#1 Learn-by-Doing Multicloud Training Platform*

	
	
	
	*Craig Parker*
Technical Writer
Schedule a Meeting or Call <http://www.fossfolks.com>

125 Bear Creek Parkway. Keller. Texas 76248
LinuxAcademy.com <https://linuxacademy.com>

Learn faster and deeper with REAL Hands-On Labs. 
<https://linuxacademy.sigstr.net/uc/5d5b0bc61a99af20f77b0db4>



© Linux Academy, 2019. All Rights Reserved.
Pinehead® and the Linux Academy Logo® are registered trademarks of Linux 
Academy in the U.S. and other countries. Linux® is a registered 
trademark of Linus Torvalds in the U.S. and other countries.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/580978a3-ebcb-429d-266e-4c825c61badb%40linuxacademy.com.

[-- Attachment #2: Type: text/html, Size: 8470 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why does Pandoc fail to create a PDF for certain fonts, but works for other fonts with otherwise the same command?
       [not found]     ` <87lfp9nr1b.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  2020-02-11 14:24       ` Craig Parker
@ 2020-02-11 14:44       ` tutiluren via pandoc-discuss
       [not found]         ` <M-ohGso--3-2-q7wo9g+UVklWk0Htik3J/w@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: tutiluren via pandoc-discuss @ 2020-02-11 14:44 UTC (permalink / raw)
  To: Pandoc Discuss

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]



>  The info I'm finding on the net is that this indicates the font you're using is a Postscript Type 1 font, which XeTeX doesn't fully support. It should work if you use is a TTF or an OTF font. (The file name should have a `.ttf` or `.otf` file extension. Type 1 fonts will have `.pfb`, `.pfm` or `.afm`, according to Wikipedia.)
>
Thanks for clarifying. However, the file name for Courier/Courier Standard on my Windows 10 is actually "coure.fon" (it was tricky to find out, because that particular dir behaves very differently from all others), but the same principle holds: only "modern" font formats seem to work.

There sure are a lot of death traps on the way to converting a PDF document! And this is for a fixed-letter-size, fixed-column-width, plaintext document... After the nightmare I went through a few years ago, I won't ever even *try* to convert a fancy HTML + CSS document to PDF ever again!

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/M-ohGso--3-2%40tutanota.com.

[-- Attachment #2: Type: text/html, Size: 1872 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why does Pandoc fail to create a PDF for certain fonts, but works for other fonts with otherwise the same command?
       [not found]         ` <M-ohGso--3-2-q7wo9g+UVklWk0Htik3J/w@public.gmane.org>
@ 2020-02-11 14:46           ` Craig Parker
  2020-02-11 17:46           ` John MacFarlane
  1 sibling, 0 replies; 6+ messages in thread
From: Craig Parker @ 2020-02-11 14:46 UTC (permalink / raw)
  To: tutiluren via pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 3040 bytes --]

The list has already seen this, so I'm just sending it to you...

Give HTML to PDF another whirl. It's fine with WeasyPrint. I've got a 
walkthrough (and a template you can grab on github) here: 
https://linuxacademy.com/blog/tutorials/convert-markdown-to-pdf-tutorial/


On 2/11/20 9:44 AM, tutiluren via pandoc-discuss wrote:
>
>     The info I'm finding on the net is that this indicates the font
>     you're using is a Postscript Type 1 font, which XeTeX doesn't
>     fully support. It should work if you use is a TTF or an OTF font.
>     (The file name should have a `.ttf` or `.otf` file extension. Type
>     1 fonts will have `.pfb`, `.pfm` or `.afm`, according to Wikipedia.)
>
> Thanks for clarifying. However, the file name for Courier/Courier 
> Standard on my Windows 10 is actually "coure.fon" (it was tricky to 
> find out, because that particular dir behaves very differently from 
> all others), but the same principle holds: only "modern" font formats 
> seem to work.
>
> There sure are a lot of death traps on the way to converting a PDF 
> document! And this is for a fixed-letter-size, fixed-column-width, 
> plaintext document... After the nightmare I went through a few years 
> ago, I won't ever even *try* to convert a fancy HTML + CSS document to 
> PDF ever again!
> -- 
> You received this message because you are subscribed to the Google 
> Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/M-ohGso--3-2%40tutanota.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/M-ohGso--3-2%40tutanota.com?utm_medium=email&utm_source=footer>.
-- 
Learn by Doing with Linux Academy Multicloud Training 
<https://linuxacademy.com>

	*#1 Learn-by-Doing Multicloud Training Platform*

	
	
	
	*Craig Parker*
Technical Writer
Schedule a Meeting or Call <http://www.fossfolks.com>

125 Bear Creek Parkway. Keller. Texas 76248
LinuxAcademy.com <https://linuxacademy.com>

Learn faster and deeper with REAL Hands-On Labs. 
<https://linuxacademy.sigstr.net/uc/5d5b0bc61a99af20f77b0db4>



© Linux Academy, 2019. All Rights Reserved.
Pinehead® and the Linux Academy Logo® are registered trademarks of Linux 
Academy in the U.S. and other countries. Linux® is a registered 
trademark of Linus Torvalds in the U.S. and other countries.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e6ceb7c0-b82f-cc32-e25e-e0fc5d961104%40linuxacademy.com.

[-- Attachment #2: Type: text/html, Size: 7291 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why does Pandoc fail to create a PDF for certain fonts, but works for other fonts with otherwise the same command?
       [not found]         ` <M-ohGso--3-2-q7wo9g+UVklWk0Htik3J/w@public.gmane.org>
  2020-02-11 14:46           ` Craig Parker
@ 2020-02-11 17:46           ` John MacFarlane
  1 sibling, 0 replies; 6+ messages in thread
From: John MacFarlane @ 2020-02-11 17:46 UTC (permalink / raw)
  To: tutiluren via pandoc-discuss, Pandoc Discuss

tutiluren via pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
writes:

> There sure are a lot of death traps on the way to converting a PDF document! And this is for a fixed-letter-size, fixed-column-width, plaintext document... After the nightmare I went through a few years ago, I won't ever even *try* to convert a fancy HTML + CSS document to PDF ever again!

Why don't you use wkhtmltopdf, which is designed precisely to
render HTML + CSS to PDF?

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/yh480kv9od3tl0.fsf%40johnmacfarlane.net.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-11 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 14:05 Why does Pandoc fail to create a PDF for certain fonts, but works for other fonts with otherwise the same command? tutiluren via pandoc-discuss
     [not found] ` <M-oZQZd--3-2-q7wo9g+UVklWk0Htik3J/w@public.gmane.org>
2020-02-11 14:21   ` Joost Kremers
     [not found]     ` <87lfp9nr1b.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2020-02-11 14:24       ` Craig Parker
2020-02-11 14:44       ` tutiluren via pandoc-discuss
     [not found]         ` <M-ohGso--3-2-q7wo9g+UVklWk0Htik3J/w@public.gmane.org>
2020-02-11 14:46           ` Craig Parker
2020-02-11 17:46           ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).