예제 #1
0
FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) {
    BC_Library_Init();
    FXJSE_Initialize();

    m_pIsolate = pIsolate ? pIsolate : FXJSE_Runtime_Create_Own();
    if (!m_pIsolate)
        return FALSE;

    m_pXFAApp = new CXFA_FFApp(this);
    m_pXFAApp->SetDefaultFontMgr(
        std::unique_ptr<CXFA_DefFontMgr>(new CXFA_DefFontMgr));

    return TRUE;
}
예제 #2
0
FX_BOOL CPDFXFA_App::Initialize(FXJSE_HRUNTIME hRuntime) {
#ifdef PDF_ENABLE_XFA
  BC_Library_Init();
  FXJSE_Initialize();

  m_bOwnedRuntime = !hRuntime;
  m_hJSERuntime = hRuntime ? hRuntime : FXJSE_Runtime_Create();
  if (!m_hJSERuntime)
    return FALSE;

  m_pXFAApp = IXFA_App::Create(this);
  if (!m_pXFAApp)
    return FALSE;

  m_pFontMgr = IXFA_FontMgr::CreateDefault();
  if (!m_pFontMgr)
    return FALSE;

  m_pXFAApp->SetDefaultFontMgr(m_pFontMgr);
#endif
  return TRUE;
}