Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

docx to pdf: Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable #2206

Closed
orschiro opened this issue Jun 2, 2015 · 8 comments
Closed

docx to pdf: Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable #2206

orschiro opened this issue Jun 2, 2015 · 8 comments

Comments

@orschiro
Copy link

orschiro commented Jun 2, 2015

Dear all,

I Installed the latest available Ubuntu deb package pandoc-1.14.0.1-1-amd64.deb. According to the documentation it should support the conversion from docx to pdf. However, the conversion fails for me with the following error:

pandoc input.docx -o output.pdf
! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not fou
nd.
<to be read again> 
                   relax 
l.100 \fontencoding\encodingdefault\selectfont

Does someone have any advice for me?

Thankfully,

Robert

@nkalvi
Copy link

nkalvi commented Jun 2, 2015

@orschiro Could you try

you need to install texlive-fonts-recommended using your package manager

http://tex.stackexchange.com/questions/116332/latex-compilation-of-simple-document-fails

@orschiro
Copy link
Author

orschiro commented Jun 2, 2015

@nkalvi

Thanks, I appreciate your quick help! Indeed I didn't have the the texlive-fonts-recommended package installed. I installed this alongside other packages but the conversion fails with a different error message.

Installed packages:

ii  latex-beamer                                  3.24-1                                                        all          LaTeX class to produce presentations
ii  latex-xcolor                                  2.11-1.1                                                      all          Easy driver-independent TeX class for color
ii  libpod-latex-perl                             0.61-1                                                        all          module to convert Pod data to formatted LaTeX
ii  libreoffice-writer2latex                      1.0.2-10ubuntu1                                               all          Writer/Calc to LaTeX converter extension for LibreOffice
ii  preview-latex-style                           11.87-1ubuntu2                                                all          extraction of elements from LaTeX documents as graphics
ii  texlive-latex-base                            2013.20140215-1                                               all          TeX Live: LaTeX fundamental packages
ii  texlive-latex-base-doc                        2013.20140215-1                                               all          TeX Live: Documentation files for texlive-latex-base
ii  texlive-latex-extra                           2013.20140215-2                                               all          TeX Live: LaTeX additional packages
ii  texlive-latex-extra-doc                       2013.20140215-2                                               all          TeX Live: Documentation files for texlive-latex-extra
ii  texlive-latex-recommended                     2013.20140215-1                                               all          TeX Live: LaTeX recommended packages
ii  texlive-latex-recommended-doc                 2013.20140215-1                                               all          TeX Live: Documentation files for texlive-latex-recommended

Error message:

! Package inputenc Error: Unicode char \u8:― not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.129 We invite diverse participation―

Try running pandoc with --latex-engine=xelatex.
pandoc: Error producing PDF from TeX source

@KurtPfeifle
Copy link

Try what the output/error message recommends:

pandoc input.docx -o output.pdf --latex-engine=xelatex

On Tue, Jun 2, 2015 at 4:50 PM, Robert Orzanna notifications@github.com
wrote:

@nkalvi https://github.com/nkalvi

Thanks, I appreciate your quick help! Indeed I didn't have the the
texlive-fonts-recommended package installed. I installed this alongside
other packages but the conversion fails with a different error message.

Installed packages:

ii latex-beamer 3.24-1 all LaTeX class to produce presentations
ii latex-xcolor 2.11-1.1 all Easy driver-independent TeX class for color
ii libpod-latex-perl 0.61-1 all module to convert Pod data to formatted LaTeX
ii libreoffice-writer2latex 1.0.2-10ubuntu1 all Writer/Calc to LaTeX converter extension for LibreOffice
ii preview-latex-style 11.87-1ubuntu2 all extraction of elements from LaTeX documents as graphics
ii texlive-latex-base 2013.20140215-1 all TeX Live: LaTeX fundamental packages
ii texlive-latex-base-doc 2013.20140215-1 all TeX Live: Documentation files for texlive-latex-base
ii texlive-latex-extra 2013.20140215-2 all TeX Live: LaTeX additional packages
ii texlive-latex-extra-doc 2013.20140215-2 all TeX Live: Documentation files for texlive-latex-extra
ii texlive-latex-recommended 2013.20140215-1 all TeX Live: LaTeX recommended packages
ii texlive-latex-recommended-doc 2013.20140215-1 all TeX Live: Documentation files for texlive-latex-recommended

Error message:

! Package inputenc Error: Unicode char \u8:― not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type H for immediate help.
...

l.129 We invite diverse participation―

Try running pandoc with --latex-engine=xelatex.
pandoc: Error producing PDF from TeX source


Reply to this email directly or view it on GitHub
#2206 (comment).

@nkalvi
Copy link

nkalvi commented Jun 2, 2015

If it still fails after trying with --latex-engine=xelatex, could you add --verbose flag and post the output (please remove any sensitive info).

@orschiro
Copy link
Author

orschiro commented Jun 2, 2015

Thanks to both of you. It compiles with the parameter --latex-engine=xelatex. Two remaining questions:

  • I had to install an additional package texlive-xetex. Can xetex run independently from texlive-latex and can I thus uninstall all texlive-latex packages?
  • The command pandoc input.docx --latex-engine=xelatex -o output.pdf does not preserve the original style of the docx file. Rather it restyles it using a texlive design. Is it possible to preserve the original style?

@KurtPfeifle
Copy link

On Tue, Jun 2, 2015 at 5:32 PM, Robert Orzanna notifications@github.com
wrote:

Thanks to both of you. It compiles with the parameter
--latex-engine=xelatex. Two remaining questions:

  • I had to install an additional package texlive-xetex. Can xetex run
    independently from texlive-latex and can I thus uninstall all
    texlive-latex packages?
  • The command pandoc input.docx --latex-engine=xelatex -o output.pdf
    does not preserve the original style of the docx file. Rather it
    restyles it using a texlive design. Is it possible to preserve the original
    style?

No, it isn't.

If you want the original style in the PDF, why even convert it with the
help of Pandoc?

You can use Word to export the DOCX as PDF (with 100% of the original
style), or LibreOffice to import the DOCX and export as PDF with 90%-95% of
your style(s) preserved (if you have the same local fonts installed),
working in 85%-90% of all cases...

@orschiro
Copy link
Author

orschiro commented Jun 2, 2015

LibreOffice to import the DOCX and export as PDF with 90%-95% of
your style(s) preserved (if you have the same local fonts installed),
working in 85%-90% of all cases...

This is exactly the hotspot. I was looking for a way on Linux to preserve 100% of the style. I came across the tip using pandoc on unix stackexchange where it was mentioned that pandoc does a pretty good job converting docx to pdf.

@jgm
Copy link
Owner

jgm commented Jun 13, 2015

Pandoc only preserves document structure, not style.

@jgm jgm closed this as completed Jun 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants