Anon-Planet / thgtoa

The comprehensive guide for online anonymity and OpSec.
https://anonymousplanet.org/
Other
384 stars 41 forks source link

Pandoc/ConText are tampering and shrinking the images in ODT/PDF #121

Closed ghost closed 2 years ago

ghost commented 2 years ago

Pandoc/ConText are tampering and shrinking the images in ODT/PDF

Some kind of solution needs to be found ...

ghost commented 2 years ago

Maybe this is a possible solution?

https://stackoverflow.com/questions/69998090/how-to-disable-pandoc-magnifying-images-to-full-width

Yes this should absolutely work and make pandoc use the actual size of the image in the export, it uses ImageMagick identify function https://imagemagick.org/script/identify.php gets the size from the image file.

Just install ImageMagick on the publishing file, create a filter file where you run the pandoc and add :

--lua-filter=filename.lua

The file should contain:

function Image (img)
  -- get dimensions
  local width, height = nil, nil -- implement
  img.attributes.width = width
  img.attributes.height = height
  return img
end

Could you try? It will be easier for you @NobodySpecial256

nopeitsnothing commented 2 years ago

One month later ⌛

ghost commented 2 years ago

Refer to #164