COMPDF_GotoPage works sometimes

  • First off, I'm using v3.6.6.782 of the DLL.

    I have a function that loads a PDF from a stream, no problems here:

    Code
    LoadFromStream(pStream);

    If in the same function I try to jump to a page number, it appears to ignore the page number request:

    Code
    LoadFromStream(pStream);
    CommandEx(COMPDF_GotoPage, 5);

    If I let the user initiate the GotoPage via a GUI element, it does work. I'm guessing here that LoadFromStream is asynchronous and that while WPViewPDF is doing its stuff it ignores some commands like page navigation?

    Can you clarify under what circumstances certain commands like this one won't work, by design? I don't see that documented anywhere.