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

pandoc odt output doesn't include pdf images #2381

Closed
naught101 opened this issue Sep 1, 2015 · 9 comments
Closed

pandoc odt output doesn't include pdf images #2381

naught101 opened this issue Sep 1, 2015 · 9 comments

Comments

@naught101
Copy link

I have a pandoc markdown file with a bunch of PDF images included. Conversion directly to PDF works fine, but when converting to odt, the images just appear as small image boxes with the text "Read-Error".

The same happens when converting to .doc and .docx, but I don't have MS Office on this computer, so I can't verify that that isn't a Libre Office problem.

Let me know if there's any more info I can provide.

@jgm
Copy link
Owner

jgm commented Sep 1, 2015

Your pandoc version is always good to know.

+++ naught101 [Sep 01 15 00:00 ]:

I have a pandoc markdown file with a bunch of PDF images included.
Conversion directly to PDF works fine, but when converting to odt, the
images just appear as small image boxes with the text "Read-Error".

The same happens when converting to .doc and .docx, but I don't have MS
Office on this computer, so I can't verify that that isn't a Libre
Office problem.

Let me know if there's any more info I can provide.


Reply to this email directly or [1]view it on GitHub.

References

  1. pandoc odt output doesn't include pdf images #2381

@naught101
Copy link
Author

True, sorry. From the ubuntu repos:

$ pandoc --version
pandoc 1.12.4.2
Compiled with texmath 0.6.6.1, highlighting-kate 0.5.8.5.
Syntax highlighting is supported for the following languages:
    actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
    clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
    diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
    fortran, fsharp, gcc, gnuassembler, go, haskell, haxe, html, ini, isocpp,
    java, javadoc, javascript, json, jsp, julia, latex, lex, literatecurry,
    literatehaskell, lua, makefile, mandoc, markdown, matlab, maxima, metafont,
    mips, modelines, modula2, modula3, monobasic, nasm, noweb, objectivec,
    objectivecpp, ocaml, octave, pascal, perl, php, pike, postscript, prolog,
    pure, python, r, relaxngcompact, restructuredtext, rhtml, roff, ruby, rust,
    scala, scheme, sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo,
    verilog, vhdl, xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /home/naught101/.pandoc
Copyright (C) 2006-2014 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.

@jgm
Copy link
Owner

jgm commented Sep 2, 2015

Why don't you try with the latest version? There's a deb
in the downloads section that should work on Ubuntu
(assuming it's 64-bit).

+++ naught101 [Sep 01 15 18:40 ]:

True, sorry. From the ubuntu repos:
$ pandoc --version
pandoc 1.12.4.2
Compiled with texmath 0.6.6.1, highlighting-kate 0.5.8.5.
Syntax highlighting is supported for the following languages:
actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
fortran, fsharp, gcc, gnuassembler, go, haskell, haxe, html, ini, isocpp,
java, javadoc, javascript, json, jsp, julia, latex, lex, literatecurry,
literatehaskell, lua, makefile, mandoc, markdown, matlab, maxima, metafont,
mips, modelines, modula2, modula3, monobasic, nasm, noweb, objectivec,
objectivecpp, ocaml, octave, pascal, perl, php, pike, postscript, prolog,
pure, python, r, relaxngcompact, restructuredtext, rhtml, roff, ruby, rust,
scala, scheme, sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo,
verilog, vhdl, xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /home/naught101/.pandoc
Copyright (C) 2006-2014 John MacFarlane
Web: http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.


Reply to this email directly or [1]view it on GitHub.

References

  1. pandoc odt output doesn't include pdf images #2381 (comment)

@naught101
Copy link
Author

Same problem, now with commandline complaints:

➜  PLUMBER_II git:(master) ✗ pandoc --version                                                          
pandoc 1.15.0.6
Compiled with texmath 0.8.2.2, highlighting-kate 0.6.
Syntax highlighting is supported for the following languages:
    abc, actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c,
    changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css,
    curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd,
    eiffel, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go,
    haskell, haxe, html, idris, ini, isocpp, java, javadoc, javascript, json,
    jsp, julia, kotlin, latex, lex, lilypond, literatecurry, literatehaskell,
    lua, m4, makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki,
    metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb,
    objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike,
    postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml,
    roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql,
    sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul,
    yacc, yaml, zsh
Default user data directory: /home/naught101/.pandoc
Copyright (C) 2006-2015 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
➜  PLUMBER_II git:(master) ✗ pandoc dissectingPLUMBER.md -o PlumberII.odt --bibliography=Citations.bib
pandoc: Could not determine image size in `figures/World_map.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/original/PLUMBER_original.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/metric_rank_correlations/original/PLUMBER_original_metric_rank_segment_slope_histograms.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/original/PLUMBER_original_by_metric.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/original/PLUMBER_original_site_averages_long.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/time_averages/PLUMBER_time_averages.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/model_metrics/PLUMBER_daily_model_metrics.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/conserving/PLUMBER_empirical_metrics_conserving.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/fluxnet_bias/PLUMBER_evap_fraction_bias_boxplots_daily.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/high_freq_normal_benchmarks/PLUMBER_high_freq_normal_benchmarks_by_metric.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/time_of_day/PLUMBER_lsm_by_time_of_day.pdf': could not determine PDF size
pandoc: Could not determine image size in `plots_R/PLUMBER/means/PLUMBER_means_by_metric.pdf': could not determine PDF size
pandoc: Could not determine image size in `figures/CABLE_tvair_perturbations.pdf': could not determine PDF size

@jgm
Copy link
Owner

jgm commented Oct 21, 2015

We haven't implemented retrieval of image size from PDFs yet. (This is a TODO item in Text.Pandoc.ImageSize.) We need image size in order to place the image in the ODT.

@dries863
Copy link

dries863 commented Dec 8, 2015

I have the same issue with Pandoc 1.15.2 on Windows. Any fixes?

@jgm
Copy link
Owner

jgm commented Dec 8, 2015

The difficulty is that the imageSize function in
Text.Pandoc.ImageSize still doesn't have code to extract
the image size from a PDF. If someone knows how to do
this, we could add it.

The dev version of pandoc allows specifying image sizes
explicitly, which would allow PDFs (with sizes given)
to be displayed even if we can't retrieve their sizes.
I've added support for PDF in this way to docx in commit
622f096. Something similar
should work for odt.

+++ dries863 [Dec 08 15 02:32 ]:

I have the same issue with Pandoc 1.15.2 on Windows. Any fixes?


Reply to this email directly or [1]view it on GitHub.

References

  1. pandoc odt output doesn't include pdf images #2381 (comment)

@naught101
Copy link
Author

A default of \textwidth or similar would be a good temporary fix.

@mb21
Copy link
Collaborator

mb21 commented Jan 17, 2017

closing this in favour of #2350

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