Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

can't make the pdf #26

Open
liwei-lai opened this issue Mar 4, 2012 · 9 comments
Open

can't make the pdf #26

liwei-lai opened this issue Mar 4, 2012 · 9 comments

Comments

@liwei-lai
Copy link
Contributor

When I generate the pdf of the cn version of this book, following error will occur:

markdown2pdf: /tmp/pandoc/redis.log: hGetContents: invalid argument (invalid UTF-8 byte sequence)

I am already search google and some documents, but i can't solve the problem. How should i do for it?

And i can use pandoc to generate the epub successfully.

@arturdryomov
Copy link
Contributor

This issue should be fixed now.

@fgm
Copy link
Contributor

fgm commented Apr 2, 2013

Same problem here (on Ubuntu 12.04): cannot build PDF, even with various fixes over the initial error, but the EPUB builds normally.

@arturdryomov
Copy link
Contributor

@fgm Do you have required dependencies installed? If yes, please provide an errors log.

@fgm
Copy link
Contributor

fgm commented Apr 2, 2013

Yes, the dependencies are installed. After a few tweaks (missing Menlo font, notably), I'm stuck with this error:

cd en && pandoc --latex-engine xelatex --template ../common/pdf-template.tex --listings redis.md -o redis.pdf
pandoc: Error producing PDF from TeX source.
This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
entering extended mode
(/tmp/tex2pdf5895/input.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
(/usr/share/texmf-texlive/tex/latex/base/book.cls
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/bk10.clo))
(/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.sty
(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texmf-texlive/tex/latex/tools/calc.sty)
(/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texmf-texlive/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texmf-texlive/tex/generic/xkeyval/keyval.tex)))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/xelatex/euenc/eu1enc.def)
(/usr/share/texmf-texlive/tex/xelatex/euenc/eu1lmr.fd))
fontspec.cfg loaded.
(/usr/share/texmf-texlive/tex/xelatex/fontspec/fontspec.cfg))
(/usr/share/texmf-texlive/tex/latex/sectsty/sectsty.sty)
(/usr/share/texmf-texlive/tex/xelatex/polyglossia/polyglossia.sty
(/usr/share/texmf-texlive/tex/latex/etoolbox/etoolbox.sty
(/usr/share/texmf-texlive/tex/latex/etex-pkg/etex.sty)))
(/usr/share/texmf-texlive/tex/xelatex/polyglossia/gloss-english.ldf)
(/usr/share/texmf-texlive/tex/latex/preprint/fullpage.sty)
(/usr/share/texmf-texlive/tex/latex/setspace/setspace.sty
Package: `setspace' 6.7 <2000/12/01>
) (/usr/share/texmf-texlive/tex/latex/ltxmisc/parskip.sty)
(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
(/etc/texmf/tex/latex/config/color.cfg)
(/usr/share/texmf-texlive/tex/xelatex/xetex-def/xetex.def))
(/usr/share/texmf-texlive/tex/latex/listings/listings.sty
(/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty)
(/usr/share/texmf-texlive/tex/latex/listings/listings.cfg))
(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty
(/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty))
(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def)
(/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty))
(/usr/share/texmf-texlive/tex/xelatex/xetexconfig/hyperref.cfg)
(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty))
Implicit mode ON; LaTeX internals redefined
(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty
(/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty))))
(/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty))
hyperref using driver hdvipdfm
(/usr/share/texmf-texlive/tex/latex/hyperref/hdvipdfm.def)
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
(/etc/texmf/tex/latex/config/graphics.cfg)))
(/usr/share/texmf-texlive/tex/latex/tools/enumerate.sty)
No file input.aux.
(/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty
(/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty))

Package hyperref Warning: Rerun to get /PageLabels entry.

<use "title.png" > [0] [1] [2] [3] [4] [5] [6] [7
** WARNING ** Invalid glyph name index number: 1305 (>= 1305)
** WARNING ** Invalid version 2.0 'post' table
** ERROR ** Could not obtain necessary font info.

Output file removed.

make: *** [en/redis.pdf] Erreur 43

@arturdryomov
Copy link
Contributor

@fgm It seems strange… Are Microsoft fonts installed? You mentioned Menlo, but does Verdana exist?

@fgm
Copy link
Contributor

fgm commented Apr 3, 2013

Yes Verdana exists. Turns out the problem was with the Menlo replacement: Menlo is an Apple font, not available on Linux by default (is it actually free anyway?), so I had used "Ubuntu Mono". Switching to "Liberation Mono" solved the problem for me. Maybe this would be worth a mention in the config file: not all platforms have access to the same fonts and some fonts may have a problem with this source (missing glyph ?).

@dloureiro
Copy link

For the french translation of the book (dloureiro / the-little-redis-book) I got the same problem. Working on linux and mac at the same time I choose to go for DejaVu font (not yet pushed on the repo btw). It looks good and seems close to Menlo (in a way:)). And of course works on linux and mac.

@arturdryomov
Copy link
Contributor

Well, it was @karlseguin’s decision to use these fonts. @karlseguin, what do you think about this? I support @fgm’s proposition—to mention possible fonts problems in the readme file. I could prepare this small pull request if everybody will be happy and the problem will be considered as solved.

@karlseguin
Copy link
Owner

Yes please.

Writing another one (shhhh) and I'd love to be able to incorporate a better build into it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants