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 - Multithreading
  FAQ FAQ  Forum Search   Register Register  Login Login

Multithreading

 Post Reply Post Reply
Author
Message
alecd4 View Drop Down
Beginner
Beginner


Joined: 29 Sep 11
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote alecd4 Quote  Post ReplyReply Direct Link To This Post Topic: Multithreading
    Posted: 21 Apr 12 at 10:47PM
If this library tread safe? I am using the library in a windows service (C#) where I can have multiple threads that create/update pdf documents. 

Don't see any problems so far. Should I expect any?
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 26 Apr 12 at 1:14PM

Running QPL in a service could be a problem because we use GDI+ for many PDF functions.


"GDI+ functions and classes are not supported for use within a Windows service. Attempting to use these functions and classes from a Windows service may produce unexpected problems, such as diminished service performance and run-time exceptions or errors."
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 26 Apr 12 at 11:32PM
Do you have a list of these functions? My company is using it in a service and so far we have not had any problems. But I'd like to very for sure we wouldn't.

Wheeley
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 30 Apr 12 at 3:24PM
We haven't done any testing with using QPL in a Windows Service.

The GDI+ function calls in QPL are used for the Rendering and Printing functions.  

Wheeley -  Which QPL calls do you currently use in your Windows Service ?  This might help us and others work out which functions, if any, are unsafe to use in a Windows Service ?
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 30 Apr 12 at 4:09PM
Also, we have recently completed more extensive testing on the library for thread safety and have found a few small problems that have been fixed in the 8.15 release and there are further fixes coming for the 8.16 beta 1 release.

If each thread uses a new instance of QuickPDF Library then it should work pretty well when using 8.15 or 8.16 versions of QPL.
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 30 Apr 12 at 11:49PM
We use the following when running in a service:

AddToFileList
AnalyseFile
ClearFileList
CompressContent
CreateLibrary
Decrypt
DecryptFile
DeleteAnalysis
DocumentCount
EncodePermissions
EncryptFile
EncryptionStatus
FileListItem
GetAnalysisInfo
GetDocumentID
LastErrorCode
LibraryVersion
LoadFromFile
MergeFileListFast
NewDocument
NewOutline
PageCount
PrintDocument
PrintOptions
RemoveDocument
SaveToFile
SelectDocument
SelectPage
SetPageLayout
SetPageMode
SetTempFile
SetTempPath
SignFile
TestTempPath
Unlock
UnlockKey


Wheeley
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 02 May 12 at 3:38PM
Wheely,

PrintDocument uses the GDI+ functions to render the document for printing.  If it is working correctly for you then it seems Microsoft might are just being over cautious.  Not of the other functions you use would require GDI+.

Andrew.
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 02 May 12 at 8:42PM
The catch with the function using GDI+ is how you run your service. Microsoft might indeed be correct when you run the service using "Local Administrator". Because of other issues we require our service to run using a named user. So more investigation is needed by all.

Wheeley
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