I am trying to create PDF from the scan images. I want to enable to select the Text from image after PDF creation. I had tried below code but its not working.
if (@available(iOS 16.0, *)) {
NSDictionary *dict = @{
PDFDocumentTitleAttribute: @"Sample PDF",
PDFDocumentAuthorAttribute: @"Author Name",
PDFDocumentSaveTextFromOCROption: @YES,
};
[ocrPDFDocument writeToURL:[NSURL fileURLWithPath:savePDFPath] withOptions:dict];
[self.delegate pdfOCR:self didPDFOcrFileAtPath:savePDFPath];
}
PDFDocumentSaveTextFromOCROption is not applied after creating PDF.
Does any one have idea.?