Previous | Next | (P-PDF) Engineering
Topic: downgrading the pdf version using pdflibrary 7.
Conf: (P-PDF) Engineering, Msg: 161164
From: rjafeel
Date: 7/11/2007 03:24 PM
hi all,
i am trying to downgrade a pdf version using pdflibrary 8. i want to retain 1.5 version of pdf in my desktop application for some reason. so i was just testing with the PDDocSaveWithParams() and i found that the function is failing and i am not able to find out the reason for failure. the test file is a simple text file created just for testing the version downgrading, so i dont think that any of the 1.7 features has gone into it. the sample code i am using is given below, can anyone have a look into this and tell me where am i going wrong.
BOOL bError = TRUE;
char strPath[] = "C:\\";
ASPathName Path;
PDDocSaveParamsRec saveParams;
memset(&saveParams, 0, sizeof(PDDocSaveParamsRec));
saveParams.size = sizeof(PDDocSaveParamsRec);
saveParams.saveFlags = PDSaveFull | PDSaveCollectGarbage ;
saveParams.fileSys = ASGetDefaultFileSys();
saveParams.major = 1;
saveParams.minor = 5;
saveParams.mon = NULL;
saveParams.monClientData = NULL;
saveParams.cancelProc = NULL;
saveParams.cancelProcClientData = NULL;
DURING
Path = ASPathFromPlatformPath((void*)strPath);
saveParams.newPath = Path;
PDDocSaveWithParams(pPDDoc, &saveParams);
HANDLER
bError = FALSE;
END_HANDLER
if ( Path)
ASFileSysReleasePathName(ASGetDefaultFileSys(), Path);
return bError;
and the pPDDoc is "PDDocOpen()" with the incoming file name.
thanks in advance.
regards
~jafeel