>
>
> right? When you set the s_maxRecursionDepth to large-enough value, will
> PoDoFo be able to open the file? Possibly also making the stack larger,
> to accommodate the recursion.
>
>
I suppose it will work fine. Using recursion there is not a very good idea.
Also there are two keys that need to be followed: "XRefStm" and
"Prev". @Francesco
Pretto <cez...@gmail.com> maybe you could fix that in the new podofo?
Something like this could work for example (pseudocode):

xrefs - vector of xrefs (or stack);
checked - set of already checked xrefs;
xrefs.push_back(first xref - startxref);
while(!xrefs.empty())
{
  XRefType xref = xrefs.back();
  xrefs.pop_back();
  if(checked.contains(xref))continue; // to avoid cycles
  checked.insert(xref);
  ...
  just check whether this is non-stream xref with trailer -
xrefstream contains just single "previous xref"
  xrefs.push_back(next "XRefStm" key from trailer);
  xrefs.push_back(next "Prev" key from trailer);
}



> _______________________________________________
> Podofo-users mailing list
> Podofo-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/podofo-users
>
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to