Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - QuickPDF with TPL
  FAQ FAQ  Forum Search   Register Register  Login Login

QuickPDF with TPL

 Post Reply Post Reply
Author
Message
i.collodoro View Drop Down
Beginner
Beginner


Joined: 20 Apr 11
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote i.collodoro Quote  Post ReplyReply Direct Link To This Post Topic: QuickPDF with TPL
    Posted: 20 Apr 11 at 4:11PM
Hello,
i'm trying to read a huge file with almost 12000 pages and i need to performe text search on it. i've tried reading page by page but it tooks about 15 minutes. I tried to use
 
Parallel.For(0,pageCount,(i)=>{ qp.SelectPage(i);
s = qp.GetPageText(3)});
 
public string GetPageText(int ExtractOptions)
{
   if (dll == null) return "";
   else
   {
         IntPtr data = dll.QuickPDFGetPageText(instanceID, ExtractOptions);
         int size = dll.QuickPDFStringResultLength(instanceID);
         byte[] result = new byte[size];
         Marshal.Copy(data, result, 0, size);
         return Encoding.UTF8.GetString(result);
   }
}
 
but i receive a Corrupted Memory Exception
          IntPtr data = dll.QuickPDFGetPageText(instanceID, ExtractOptions);
 
Is QuickPDF tread safe?
Thanks!
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 21 Apr 11 at 2:29PM
Usually when the phrase "thread safe" is used it means that the same instance of the library can be accessed by different threads at the same time.

This means that Quick PDF Library is not thread safe because a single instance of Quick PDF Library can only be accessed by the thread that created the instance.

However, Quick PDF Library can be used in a multithreaded environment so long as a separate instance of the library is created by each thread.

For users of the ActiveX edition of the library, please note that this version has been compiled with the threading mode set to "single threaded apartment".
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store