The error message is caused by function get_file_checksum
in texk/web2c/luatexdir/image/pdftoepdf.w
(from LuaTeX 0.95):
static char *get_file_checksum(const char *a, file_error_mode fe)
{
struct stat finfo;
char *ck = NULL;
if (stat(a, &finfo) == 0) {
off_t size = finfo.st_size;
time_t mtime = finfo.st_mtime;
ck = (char *) malloc(PDF_CHECKSUM_SIZE);
if (ck == NULL)
formatted_error("pdf inclusion","out of memory while processing '%s'", a);
snprintf(ck, PDF_CHECKSUM_SIZE, "%" PRIu64 "_%" PRIu64, (uint64_t) size, (uint64_t) mtime);
} else {
switch (fe) {
case FE_FAIL:
formatted_error("pdf inclusion","could not stat() file '%s'", a);
break;
case FE_RETURN_NULL:
if (ck != NULL)
free(ck);
ck = NULL;
break;
default:
assert(0);
}
}
return ck;
}
The exact return value of function stat
would tell a reason, why the call failed, see the manual page for stat
. Unhappily, the exact value is not evaluated and added to the error message.
It is very odd, that stat
fails here. Go through the list of error cases in the cited manual page. The following test should succeed. Open a command window (cmd.exe
):
dir E:\Work\imagenes\contacto.pdf
You should see the file date and file size. This test should exclude most of the error causes (path component is not a directory, problems of directory access, path/component name too long, ...).
A wild guess. Maybe there is some interaction with the anti-virus program that hook into system calls to do its job, but causing trouble, if this "hooking" is not perfectly done in a transparent manner in case of the LuaTeX binary.
This can cause
\includegraphics{example-image-a.pdf}
for your current\incluegraphics
line. If that doesn't work, please post the log file. My current guess is that it just can't find the file and its being a PDF is irrelevant, but testing with a standard PDF image will show for sure.