|
I very regularly encounter this error. Most recently trying to convert from .docx to .pdf Does this have to do with permissions on the docx file? 'Conversion failed: Typst: failed to load file (access denied)' |
Replies: 7 comments 5 replies
|
I have not encountered this issue. Is it a reproducible issue (same file always gives the error) or intermittent? If I could reproduce it I might be able to figure out the problem. |
|
Conference Research Paper Template 2022.10.06-OTH-OTH (2).docx Doesn't seem to be any particular file. This one threw the error for me. |
|
This file works fine when I try it. What options are you using for the conversion? |
|
That console output is irrelevant, I think. |
|
I see, that makes sense. Thank you for your help and your work on this. |
|
In fact, if you use @tarleb's filter from #10801, it works! function Pandoc (doc)
doc = pandoc.mediabag.fill(doc)
return doc:walk {
Image = function (img)
local mimetype, contents = pandoc.mediabag.lookup(img.src)
if mimetype and contents then
img.src = pandoc.mediabag.make_data_uri(mimetype, contents)
return img
end
end
}
endThen click on the Filters tab in the pandoc app and upload this as a Lua filter. |

That console output is irrelevant, I think.
But now that I know you're going to PDF, it makes more sense. I am guessing that this docx has images in it?
In going to PDF via typst, pandoc will try to save the images from the docx in a temporary file and then refer to them in the typst document. But this isn't possible in the wasm sandbox we're using.