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 - selectDocument return 0
  FAQ FAQ  Forum Search   Register Register  Login Login

selectDocument return 0

 Post Reply Post Reply
Author
Message
bart_bender View Drop Down
Beginner
Beginner
Avatar

Joined: 04 Oct 11
Location: Spain
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote bart_bender Quote  Post ReplyReply Direct Link To This Post Topic: selectDocument return 0
    Posted: 14 Oct 11 at 1:49PM
hello,
I'm making a copy of a PDF Image to a new Document in VB .NET using the DLL library version in a Windows Service application

i'm opening the document as string (byte array) in a method

Private WithEvents _qp As PDFLibrary
.
.
.

public sub new()
  _qp = New PDFLibrary(dllPath)
  _qp.UnlockKey("XXXXXXX")
end sub

private function Func1 (doc as byte(), Optional ByVal password As String = "") as memorystream
 Dim docId As Integer
  docId = _qp.LoadFromString(inPdf, password)
  Return Func2(docId, password)

End function

private function Func2(docId as integer,password as string) as memorystream
dim ret as integer   
dim newDoc as integer = _qp.NewDocument()

ret =  _qp.SelectDocument(DocId) ' <<<<========== THIS RETURN 0 always in the service but runs correctly in a windows form application


 _
end function

What am i doing bad?

Thanks in advance
best regards

PD: i'm sorry for my english
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 Oct 11 at 9:31PM
What do the other functions return if it's running as a service?
I think they give an error, too.
Where's the dll? It should be on the same machine, path where your app is working.
I think that's the problem?

Cheers and welcome here,
Ingo

Back to Top
bart_bender View Drop Down
Beginner
Beginner
Avatar

Joined: 04 Oct 11
Location: Spain
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote bart_bender Quote  Post ReplyReply Direct Link To This Post Posted: 17 Oct 11 at 8:53AM
Hello Ingo

If i execute "ret = SelectDocument(DocId)" and  "imagesFoundId = _qp.FindImages" before open the new document this runs correctly.

The problems appears when i have two documents opened.

I've debugged the service to check the path to the DLL and this is correct

Thanks in advance


Back to Top
bart_bender View Drop Down
Beginner
Beginner
Avatar

Joined: 04 Oct 11
Location: Spain
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote bart_bender Quote  Post ReplyReply Direct Link To This Post Posted: 17 Oct 11 at 9:19AM
I've seen my error, the DocId is invalid.
I set the value from LoadFromString function, now i use the SelectedDocument function after open the document.

Thanks for your help Ingo
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