The file compiles and just has a grey empty box saying "name: unknownpicture".

If I replace xmap1.pdf with a JPG named xmap1.jpg and don't change the document otherwise, my document compiles just fine. The problem is I need high quality files, not a blurry JPG.

--Joel

On Sunday, August 18, 2024 at 09:14:37 AM MDT, Mikael Sundqvist <mickep@gmail.com> wrote:


Hi,

From the meeting: What happens if you do

\externalfigure
  [unknownpicture]
  [compact=]

?

On Sun, Aug 18, 2024 at 4:53 PM Joel via ntg-context <ntg-context@ntg.nl> wrote:
>
> I am making a book that includes a series of maps which I created in LibreOffice Draw, but exported as a lossless PDF. After recently making some improvements to the map files, but not the ConTeXt documents, I was surprised my document wouldn't compile anymore...I couldn't find any code errors and even reverted to older code from the day before that compiled fine yesterday. It seemed the PDFs themselves were making the errors, but the errors were inconsistent.. I deleted my ConTeXt install and downloaded the latest version of standalone, it still won't compile, but the errors are completely different. After a few tests I came up with this minimal code which throws the error:
>
> \starttext
>
>    \externalfigure[xmap1]
>
> \stoptext
>
> If I compile this, and xmap1.pdf is a PDF file in the same path, it outputs this error:
>
> lua error      > lua error on line 4 in file ./test.tex:
>
> registered function call [1606]: ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:175: stack overflow
> stack traceback:
>        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:175: in function <...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:167>
>        (...tail calls...)
>        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:667: in for iterator 'for iterator'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:96: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...    (skipping 99976 levels)
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in local 'strip'
>        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:108: in upvalue 'document_pdf_strip_page'
>        [string "local lpdf_epdf_contentplugin = lpdf.epdf.con..."]:7: in local 'runner'
>        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:136: in field 'pageplugin'
>        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:1401: in upvalue 'copypage'
>        ...ext/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:126: in function <...ext/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:111>
>        ...ext/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1696: in function <...ext/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1681>
>        (...tail calls...)
> 1    \starttext
> 2
> 3      \externalfigure[xmap1]
> 4 >>
> 5    \stoptext
> 6
> mtx-context    | fatal error: return code: 1
>
> This error isn't occurring for every PDF, some of them are rendering with no such error. I tried different export settings in LibreOffice Draw, but that seemed to have no impact. Some files render in ConTeXt and some throw this error.
>
> What is happening?
>
> --Joel
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki    : https://wiki.contextgarden.net

> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki    : https://wiki.contextgarden.net
___________________________________________________________________________________