DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaType) { CPDFSDK_Document* pSDKDoc = CPDFSDK_Document::FromFPDFFormHandle(hHandle); if (!pSDKDoc) return; CPDF_Document* pDoc = pSDKDoc->GetPDFDocument(); CPDF_Dictionary* pDic = pDoc->GetRoot(); if (!pDic) return; CPDF_AAction aa(pDic->GetDictBy("AA")); if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) { CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType); CPDFSDK_ActionHandler* pActionHandler = ((CPDFDoc_Environment*)hHandle)->GetActionHander(); pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType, pSDKDoc); } }
DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaType) { CPDFSDK_FormFillEnvironment* pFormFillEnv = HandleToCPDFSDKEnvironment(hHandle); if (!pFormFillEnv) return; CPDF_Document* pDoc = pFormFillEnv->GetPDFDocument(); CPDF_Dictionary* pDic = pDoc->GetRoot(); if (!pDic) return; CPDF_AAction aa(pDic->GetDictFor("AA")); if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) { CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType); CPDFSDK_ActionHandler* pActionHandler = HandleToCPDFSDKEnvironment(hHandle)->GetActionHander(); pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType, pFormFillEnv); } }
DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle, int aaType) { if(!hHandle) return; CPDFSDK_Document* pSDKDoc = ((CPDFDoc_Environment*)hHandle)->GetCurrentDoc(); if(pSDKDoc) { CPDF_Document* pDoc = pSDKDoc->GetDocument(); CPDF_Dictionary* pDic = pDoc->GetRoot(); if (!pDic) return; CPDF_AAction aa = pDic->GetDict(FX_BSTRC("AA")); if(aa.ActionExist((CPDF_AAction::AActionType)aaType)) { CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType); CPDFSDK_ActionHandler *pActionHandler = ((CPDFDoc_Environment*)hHandle)->GetActionHander(); ASSERT(pActionHandler != NULL); pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType, pSDKDoc); } } }