[luatex] Duplicate images in pdf

Hartmut Henkel hartmut_henkel at gmx.de
Sun Mar 21 15:43:48 CET 2010


On Sun, 21 Mar 2010, Patrick Gundlach wrote:

> when I write this code:
>
> local n1,n2
> n1 = img.node { filename = "hacker.jpg" }
> node.write(n1)
> n2 = img.node { filename = "hacker.jpg" }
> node.write(n2)
>
> the file hacker.jpg will be inserted twice in the pdf. I guess no
> duplicate prevention is done on purpose, right?

yes, by tradition (same as pdftex). This should work (can't test right
now):

local n1,n2
local a = img.scan{ filename = "hacker.jpg" }
n1 = img.node { a }
node.write(n1)
n2 = img.node { a }
node.write(n2)

Regards, Hartmut


More information about the luatex mailing list