[luatex] Problems with page_objnum_provider / PDF cannot be read by Adobe Acrobat
Otared Kavian
otared at gmail.com
Tue Oct 22 18:42:05 CEST 2019
Hi Patrick,
Here, on MacOS 10.14.6, and ConTeXt version 2019.10.11 15:57, Acrobat Reader Build: 19.21.20048.354540, everything works fine, even with 1000 pages.
Best regards: Otared
> On 22 Oct 2019, at 16:09, Patrick Gundlach <patrick at gundla.ch> wrote:
>
> Hi all,
>
> this code creates a PDF with 100 pages which looks fine in Skim (a Mac PDF viewer), but fails to render in Adobe Acrobat.
>
> When I set the number of pages to 10, everything is fine.
>
> (Everything > 10 seems to break Adobe Acrobat - current release)
>
> Patrick
>
>
>
> \startluacode
> local list
> local n = 0
> callback.register("page_objnum_provider",function(objnum)
> if not list then
> list = { }
> for i=1,tex.count[0] do
> list[i] = pdf.getpageref(i)
> end
> list[#list], list[1] = list[1], list[#list]
> list[#list-1], list[2] = list[2], list[#list-1]
> end
> n = n + 1
> return list[n]
> end)
> \stopluacode
>
> \starttext
>
> \dorecurse{11}{
> \startTEXpage #1 \stopTEXpage
> }
>
> \stoptext
>
>
> (PDF available at https://download.speedata.de/private/test.pdf)
>
>
>
More information about the luatex
mailing list