Example #1
0
DLLEXPORT FPDF_BOOL STDCALL FPDF_GetFileVersion(FPDF_DOCUMENT doc, int* fileVersion)
{
    if(!doc||!fileVersion) return FALSE;
    *fileVersion = 0;
    CPDF_Document* pDoc = (CPDF_Document*)doc;
    CPDF_Parser* pParser = (CPDF_Parser*)pDoc->GetParser();
    if(!pParser)
        return FALSE;
    *fileVersion = pParser->GetFileVersion();
    return TRUE;
}
Example #2
0
DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document)
{
    if (!document)
        return;
    CPDF_Document* pDoc = (CPDF_Document*)document;
    CPDF_Parser* pParser = (CPDF_Parser*)pDoc->GetParser();
    if (pParser == NULL)
    {
        delete pDoc;
        return;
    }
    delete pParser;
//	delete pDoc;
}
Example #3
0
DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) {
  CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(doc);
  return pDoc ? pDoc->GetParser()->GetFirstPageNo() : 0;
}
Example #4
0
DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc)
{
	if (doc == NULL) return 0;
	CPDF_Document* pDoc = (CPDF_Document*)doc;
	return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo();
}