We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Saved PDF pages result in text that can not be string searched/matched

Thread ID:

Created:

Updated:

Platform:

Replies:

140812 Nov 7,2018 09:21 PM UTC Nov 9,2018 12:12 AM UTC WinForms 2
loading
Tags: PDF
Robert Dickow
Asked On November 7, 2018 09:21 PM UTC

I recently wrote a Windows desktop app (using the SF 16.1460.0.24 libraries) that searches pdf document text and extracts pages that have matches. I add the pages to new pdf documents, append additional pages to it, and ultimately save the new doc on disk. This works very well, with one little snag. I can't do the same with the saved documents. I can not search and match text in those documents I create and save. I'm missing some little detail no doubt. Any suggestions?

KarthikeyanC [Syncfusion]
Replied On November 8, 2018 08:38 AM UTC

Hi Robert, 
Thank you for contacting Syncfusion support. It will be more helpful if you could provide us the input PDF document and the code snippet from which the issue is reproduced. So that we could investigate in this and provide you the solution. 

Regards, 
Karthikeyan  


Robert Dickow
Replied On November 9, 2018 12:12 AM UTC

Thanks for your support. I found a solution. I have learned that in order to get the correct page structure added to a new document, I needed to use this:

`(PdfDocument) newDoc.ImportPage((PdfLoadedDocument) doc, (int) pageCounter);`

but I was using this:

`(PdfDocument) newDoc.ImportPage((PdfLoadedDocument) doc, (PdfLoadedPage) page);`

I think the second overloaded parameter is supposed to be PdfPage and not PdfLoadedPage in order to work correctly. It didn't throw and error, but the new document ended up with text that for some reason can't be searched from extractedText on followup processing of a pdf document saved from newDoc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;