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!
![]() |
Setting up visual studio |
Post Reply
|
| Author | |
dptulk
Beginner
Joined: 24 Feb 12 Location: Ohio Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Topic: Setting up visual studioPosted: 02 Oct 12 at 10:26PM |
|
I have one project that is working with QuickPDF without issue. When i go to create another It seems to fail and i I cannot seem to figure out why.
I have imported the: QuickPDFDLL0813.dll and QuickPDFDLL0813.vb files into the project. Set the Imports: Imports BLINK_DOC_MANAGMENT.QuickPDFDLL0813 Then I run the following and it says "invalid licence key" Dim QP As PDFLibrary Dim LicenseKey Dim Result QP = New PDFLibrary("QuickPDFDLL0813.dll") LicenseKey = "je5e3798XXXXXXXXXXXXXpb6y" Result = QP.UnlockKey(LicenseKey) If Result = 1 Then QP.SetOrigin(1) QP.DrawText(100, 100, "Hello Visual Basic! This text has been drawn using the DrawText function.") QP.SaveToFile("Hello_World.pdf") Else MsgBox("- Invalid license key -") End If Is there something else that I have missed? Edited by dptulk - 03 Oct 12 at 12:46AM |
|
![]() |
|
darkv
Team Player
Joined: 17 Jan 11 Status: Offline Points: 38 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 Oct 12 at 11:58PM |
|
Hello dptulk,
a dim state without type create an object or a variant, which could not be terminated by the right character for a string. did you try to prototype the key as string? which VS are you using? Rgds |
|
|
z Dark side is there ...
|
|
![]() |
|
dptulk
Beginner
Joined: 24 Feb 12 Location: Ohio Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Oct 12 at 3:42PM |
|
I set the key as a string and it still does not work. I am using VS 2010 Pro.
This just doesn't make any sense. My other project works just fine but I have tried several others and none of them will work.
|
|
![]() |
|
dptulk
Beginner
Joined: 24 Feb 12 Location: Ohio Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Oct 12 at 3:51PM |
|
Here is the current version. I hope that someone has some insight into this:
Imports QuickPDFBase.QuickPDFDLL0813 Imports System.IO Public Class QuickPDFTest Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim QP As PDFLibrary Dim LicenseKey As String Dim Result As Boolean QP = New PDFLibrary("QuickPDFDLL0813.dll") LicenseKey = "XXXXXXXXXXXXXXXXXXXXX" Result = QP.UnlockKey(LicenseKey) If Result = 1 Then QP.SetOrigin(1) QP.DrawText(100, 100, "Hello Visual Basic! This text has been drawn using the DrawText function.") QP.SaveToFile("Hello_World.pdf") Else MsgBox("sh*t!") End If End Sub End Class |
|
![]() |
|
darkv
Team Player
Joined: 17 Jan 11 Status: Offline Points: 38 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Oct 12 at 6:59PM |
|
It's roughly the same code i used with few differences
+ result is an integer or a long not a boolean + i'm using 7.x version of the dll + when i call the new library, i point directly to the full dll path to avoid misinterpretation by he compiler Rgds |
|
|
z Dark side is there ...
|
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 Oct 12 at 3:23AM |
|
You may need to set your Platform Target to x86 to force it to create a 32 bit EXE. If it is currently set to Any CPU then it could be creating a 64 bit EXE which is then failing to load the 32 bit DLL.
You could run a quick test by changing the code to the following QP = New PDFLibrary("QuickPDF64DLL0813.dll") You would need to make sure the 64 bit DLL is in the same directory as your EXE file. The next step could be add the following so that it can run either 32 or 64 bit mode automatically. if (IntPtr.Size == 4) QP = New PDFLibrary("QuickPDFDLL0813.dll") else QP = New PDFLibrary("QuickPDF64DLL0813.dll") |
|
![]() |
|
dptulk
Beginner
Joined: 24 Feb 12 Location: Ohio Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 Oct 12 at 2:14PM |
|
Thanks Andrew. It was not the 64 bit issue. Not sure what it was really. I ended up creating an empty project and getting it to work and then moving all of my code from my other one into the new one.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store