Hi,

I ran into an issue for which i cannot find an answer. It’s about creating 
pages through a PdfMemDocument. In that matter, few lines of source code are 
better than a long explanation. I join sample code which simply crashes, same 
kind of construction in podofoimpose throws an exception in  
PdfVariant::DelayedLoadImpl(). Might be obvious, or late, but I don’t see it.

In the hope it’s related to my local setup.

-- 
Pierre Marchand
#include <podofo/podofo.h>
#include <iostream>

int main()
{
PoDoFo::PdfMemDocument* doc = new PoDoFo::PdfMemDocument;

int np(10); 
PoDoFo::PdfRect rect( 0.0, 0.0, 100, 100 );
for(int i(0);i < np; ++i)
{
  try
  {
    doc->CreatePage( rect );
  }
  catch(PoDoFo::PdfError& e)
  {
    std::cerr<<"Unable to create new page "
    << i 
    << ": "
    <<  PoDoFo::PdfError::ErrorMessage( e.GetError() )
    << std::endl;
    return 1;
  }
}
delete doc;
return 0;
}
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to