summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_progressive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fpdf_progressive.cpp')
-rw-r--r--fpdfsdk/src/fpdf_progressive.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/src/fpdf_progressive.cpp
index 2490df8c2f..5226770d48 100644
--- a/fpdfsdk/src/fpdf_progressive.cpp
+++ b/fpdfsdk/src/fpdf_progressive.cpp
@@ -8,6 +8,8 @@
#include "../include/fsdk_define.h"
#include "../include/fpdfview.h"
#include "../include/fsdk_rendercontext.h"
+#include "../include/fpdfxfa/fpdfxfa_doc.h"
+#include "../include/fpdfxfa/fpdfxfa_page.h"
extern void (*Func_RenderPage)( CRenderContext*, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y,
int rotate, int flags,FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter * pause );
@@ -28,7 +30,9 @@ DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start( FPDF_BITMAP bitmap, FPDF_PAGE
if (pause->version !=1)
return FPDF_RENDER_FAILED;
- CPDF_Page* pPage = (CPDF_Page*)page;
+ CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage();
+ if (!pPage)
+ return FPDF_RENDER_FAILED;
// FXMT_CSLOCK_OBJ(&pPage->m_PageLock);
@@ -71,7 +75,9 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus
if (pause->version !=1)
return FPDF_RENDER_FAILED;
- CPDF_Page* pPage = (CPDF_Page*)page;
+ CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage();
+ if (!pPage)
+ return FPDF_RENDER_FAILED;
// FXMT_CSLOCK_OBJ(&pPage->m_PageLock);
@@ -92,7 +98,8 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus
DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page)
{
if (page == NULL) return;
- CPDF_Page* pPage = (CPDF_Page*)page;
+ CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage();
+ if (!pPage) return;
// FXMT_CSLOCK_OBJ(&pPage->m_PageLock);