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 > Sample Code
  New Posts New Posts RSS Feed - Python Example
  FAQ FAQ  Forum Search   Register Register  Login Login

Python Example

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


Joined: 04 Nov 09
Location: US
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote swillis Quote  Post ReplyReply Direct Link To This Post Topic: Python Example
    Posted: 04 Nov 09 at 8:50PM
This is a short Python example:

import win32com.client as w32c

LicenseKey = "YourLicenseKeyHere"
FileName = 'hello-world.pdf'

QP = w32c.Dispatch(r"QuickPDFAX0715.PDFLibrary")
Result = QP.UnlockKey(LicenseKey)
if Result == 1:
    print "Valid license key"
    QP.DrawText(100, 500, "Hello world from Python")
    if QP.SaveToFile(FileName) == 1:
        print "File " + FileName + " written successfully"


Edited by swillis - 04 Nov 09 at 8:53PM
Back to Top
hbhntz View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Jun 12
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote hbhntz Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jun 12 at 4:34AM
SmileOk thank you for your demo.

import win32com.client as w32c

LicenseKey = "YourLicenseKeyHere"
FileName = '2.pdf'

QP = w32c.Dispatch(r"QuickPDFAX0815.PDFLibrary")
Result = QP.UnlockKey(LicenseKey)
if Result == 1:
print "Valid license key"
QP.DrawText(100, 500, "Hello world from Python")
if QP.SaveToFile(FileName) == 1:
print "File " + FileName + " written successfully"


I looked at my your code doesn't work, QP. UnlockKey (LicenseKey) returned results for 0, can you answer to it? Thank you

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 13 Jun 12 at 10:17PM
Sorry for this question ... ;-)
I'm sure you didn't use the string "YourLicenseKeyHere"...
You replaced it by your real key i think??? ;-)
What did you got from this line:
w32c.Dispatch(r"QuickPDFAX0815.PDFLibrary")?

Cheers and welcome here,
Ingo
Back to Top
hbhntz View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Jun 12
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote hbhntz Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 12 at 2:12AM
Smile Thank you for your reply.
 
 I want to ask  " YourLicenseKeyHere" is to point to what?

 The key products? Or PDF files key?

 Can you give a demo I?



 
 


  
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: 14 Jun 12 at 3:03AM
Please go to www.quickpdflibrary.com and read the function reference. This is a user to user forum and we are here to help but you got to do some research also. Simply asking for a simple answer is wasting our time.

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

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 12 at 6:52AM
You'll need a personal test-licence-key directly from product-page
and not from here.
On the original product-page you'll get many start-up-tutorials
for different languages, too.

Cheers, Ingo

Back to Top
hbhntz View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Jun 12
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote hbhntz Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 12 at 7:26AM
ok  thank you 
Back to Top
hbhntz View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Jun 12
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote hbhntz Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 12 at 7:27AM
Thank YOu, I try to do
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 12 at 12:04PM
Don't try it ... do it ;-)

At least your code should look similar to this one:

LicenseKey = "123456789xyz123"
FileName = '2.pdf'

QP = w32c.Dispatch(r"QuickPDFAX0815.PDFLibrary")
Result = QP.UnlockKey(LicenseKey)
if Result == 1:
print "Valid license key"

Back to Top
hbhntz View Drop Down
Beginner
Beginner
Avatar

Joined: 13 Jun 12
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote hbhntz Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jun 12 at 1:29AM
ok  Thank YOu  Ingo  

  What you say is very right.

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