Parameter out of range error using PDF Alchemist library

Community ForumCategory: PDF AlchemistParameter out of range error using PDF Alchemist library
leleparag asked 1 year ago

Parameters* params = new Parameters();
params->disableAcroform = false;
params->enableAcroformReflow = false;
params->enableBookmarks = true;
params->enableCaptions = false;
params->enableInfographicDetection = true;
params->enableLayoutDirectionDetection = true;
params->enableLogging = true;
params->enableXmlOutput = false;
//params->fontDirectoryPath = false;
params->mergeSpan = false;
params->removeHyphen = false;
params->removeInvisibleText = false;
params->singleFile = false;
params->skipHeaderFooter = true;
params->skipPageBackground = 0;
params->splitByBookmarkDepth = 0;
params->splitByEveryNumberOfPages = 0;
params->tablesOnly = false;
params->useAccurateGlyphBox = true;
params->usePdfEmbeddedFont = true;
params->singleFile = true;
float confidenceScore;
confidenceScore = true;
const char* outputDir = “D:\\test\\PDFAlchemistTest\\PDFAlchemistTest\\Debug\\output2”;
 
Result res = processPdf(“D:\\test\\PDFAlchemistTest\\PDFAlchemistTest\\Debug\\Moby_Dick.pdf”, outputDir, params, &confidenceScore);
 
I am getting kParametersOutOfRange error in the res variable,
Please let me know what is the issue?

1 Answers
Datalogics Staff answered 1 year ago

Hi leleprag,

We are currently looking into this on our side. Can you please tell me if uncommenting ‘params->fontDirectoryPath = false;’ lets this work as expected with the newer version?

Thanks!
Datalogics Support

Datalogics Support replied 1 year ago

No even if I incomment fontDirectory path it gave same issue.
Then I tried
params->graphicsOutputDpi = 200;

It started giving the issue as mentioned in
https://storedevelop.wpengine.com/question/access-violation-reading-exception-with-pdfalchemist/

So there seems to be some issue with the library not able to handle input params properly.
Please look into it.

Get instant access to the latest PDF news, tips and tricks!

Do you want monthly updates on the latest document technology trends?

By submitting the form, you agree to receive marketing emails from Datalogics. You may unsubscribe at any time.