Line
Link Here
|
0 |
-- /texk/web2c/luatexdir/image/pdftoepdf.w |
0 |
++ /texk/web2c/luatexdir/image/pdftoepdf.w |
Lines 628-634
Link Here
|
628 |
if (link == NULL || !link->isOk()) |
628 |
if (link == NULL || !link->isOk()) |
629 |
formatted_error("pdf inclusion","invalid destination '%s'",img_pagename(idict)); |
629 |
formatted_error("pdf inclusion","invalid destination '%s'",img_pagename(idict)); |
630 |
Ref ref = link->getPageRef(); |
630 |
Ref ref = link->getPageRef(); |
631 |
img_pagenum(idict) = catalog->findPage(ref.num, ref.gen); |
631 |
img_pagenum(idict) = catalog->findPage(ref); |
632 |
if (img_pagenum(idict) == 0) |
632 |
if (img_pagenum(idict) == 0) |
633 |
formatted_error("pdf inclusion","destination is not a page '%s'",img_pagename(idict)); |
633 |
formatted_error("pdf inclusion","destination is not a page '%s'",img_pagename(idict)); |
634 |
delete link; |
634 |
delete link; |
635 |
-- /texk/web2c/luatexdir/lua/lepdflib.cc |
635 |
++ /texk/web2c/luatexdir/lua/lepdflib.cc |
Lines 840-846
Link Here
|
840 |
pdfdoc_changed_error(L); |
840 |
pdfdoc_changed_error(L); |
841 |
num = luaL_checkint(L, 2); |
841 |
num = luaL_checkint(L, 2); |
842 |
gen = luaL_checkint(L, 3); |
842 |
gen = luaL_checkint(L, 3); |
843 |
i = ((Catalog *) uin->d)->findPage(num, gen); |
843 |
const Ref ref = {num, gen}; |
|
|
844 |
i = ((Catalog *) uin->d)->findPage(ref); |
844 |
if (i > 0) |
845 |
if (i > 0) |
845 |
lua_pushinteger(L, i); |
846 |
lua_pushinteger(L, i); |
846 |
else |
847 |
else |
Lines 2434-2441
Link Here
|
2434 |
pdfdoc_changed_error(L); |
2435 |
pdfdoc_changed_error(L); |
2435 |
num = luaL_checkint(L, 2); |
2436 |
num = luaL_checkint(L, 2); |
2436 |
gen = luaL_checkint(L, 3); |
2437 |
gen = luaL_checkint(L, 3); |
|
|
2438 |
const Ref ref = {num, gen}; |
2437 |
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { |
2439 |
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { |
2438 |
i = ((PdfDocument *) uin->d)->doc->findPage(num, gen); |
2440 |
i = ((PdfDocument *) uin->d)->doc->findPage(ref); |
2439 |
if (i > 0) |
2441 |
if (i > 0) |
2440 |
lua_pushinteger(L, i); |
2442 |
lua_pushinteger(L, i); |
2441 |
else |
2443 |
else |