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 - Setting up visual studio
  FAQ FAQ  Forum Search   Register Register  Login Login

Setting up visual studio

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

Joined: 24 Feb 12
Location: Ohio
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote dptulk Quote  Post ReplyReply Direct Link To This Post Topic: Setting up visual studio
    Posted: 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
Back to Top
darkv View Drop Down
Team Player
Team Player
Avatar

Joined: 17 Jan 11
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote darkv Quote  Post ReplyReply Direct Link To This Post 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 ...
Back to Top
dptulk View Drop Down
Beginner
Beginner
Avatar

Joined: 24 Feb 12
Location: Ohio
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote dptulk Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dptulk View Drop Down
Beginner
Beginner
Avatar

Joined: 24 Feb 12
Location: Ohio
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote dptulk Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
darkv View Drop Down
Team Player
Team Player
Avatar

Joined: 17 Jan 11
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote darkv Quote  Post ReplyReply Direct Link To This Post 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 ...
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: 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")

Back to Top
dptulk View Drop Down
Beginner
Beginner
Avatar

Joined: 24 Feb 12
Location: Ohio
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote dptulk Quote  Post ReplyReply Direct Link To This Post 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.
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