Community ForumCategory: PDF AlchemistAccess violation reading exception with PDFAlchemist
leleparag asked 3 months ago

I am getting Access violation reading exception with below code
OCROptions ocrOptions;
ocrOptions = kNoOCR;
Parameters* params = new Parameters();
params->blackText = false;
params->cmapDir = “”;// “D:\\test\\PDFAlchemistTest\\PDFAlchemistTest\\Debug\\output2”;
params->disableAcroform = false;
params->enableAcroformReflow = false;
params->enableBookmarks = true;
params->enableCaptions = false;
params->enableInfographicDetection = true;
params->enableLayoutDirectionDetection = true;
params->enableLogging = false;
params->enableXmlOutput = false;
params->fontDirectoryPath = “/images”;
params->fontFilenamePrefix = “”;
params->mergeSpan = false;
params->removeHyphen = false;
params->removeInvisibleText = false;
params->singleFile = false;
params->skipHeaderFooter = false;
params->skipPageBackground = 0;
params->splitByBookmarkDepth = 0;
params->splitByEveryNumberOfPages = 0;
params->tablesOnly = false;
params->useAccurateGlyphBox = true;
params->usePdfEmbeddedFont = true;
params->singleFile = true;
params->graphicsOutputDpi = 200;
params->ocrMode = ocrOptions;
params->imageDirectoryPath = “/images”;
params->imageFilenamePrefix = “”;
params->enableInfographicDetection = true;
params->enableLayoutDirectionDetection = true;
params->linkStyleUnspecified = false;
params->purpose = kBalanced;
const char* outputDir = “D:\\test\\PDFAlchemistTest\\PDFAlchemistTest\\Debug\\output2”;
Result res = processPdf(“D:\\test\\PDFAlchemistTest\\PDFAlchemistTest\\Debug\\Moby_Dick.pdf”, outputDir, params, NULL);
 
In debug, res has the value -858993460
So it seems there is some issue with the input params. what could be issue?
Is there any example to refer for valid params?

Top