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 - Help with Transparent DrawTextBox
  FAQ FAQ  Forum Search   Register Register  Login Login

Help with Transparent DrawTextBox

 Post Reply Post Reply
Author
Message
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Topic: Help with Transparent DrawTextBox
    Posted: 12 Feb 08 at 11:23AM
Hello !

I need to DrawTextBox on top of a background image. So, I needed the box to be transparent.

How can I do that ?

Here's a test script :

OPTION EXPLICIT

DIM objQPDF,lni,lnt
DIM X1,Y1,W1,H1,A1,S1,TW

Set objQPDF = WScript.CreateObject("ISED.QUICKPDF")

objQPDF.unlockkey("yourkey")

objQPDF.NewDocument()
objQPDF.DocumentCount()

objQPDF.LoadFromFile("TEST037.PDF")

' YOU MAY GET TEST037.PDF from http://www.DES.online.unimep.br/au/pub/TEST037.pdf

lni=1

X1=objQPDF.GetFormFieldBound(lni,0)
Y1=objQPDF.GetFormFieldBound(lni,1)
W1=objQPDF.GetFormFieldBound(lni,2)
H1=objQPDF.GetFormFieldBound(lni,3)
A1=objQPDF.GetFormFieldAlignment(lni)
S1=objQPDF.GetFormFieldTextSize(lni)

lnt=objQPDF.FORMFIELDCOUNT()
for lni=lnt to 1 step -1
  wscript.Echo objQPDF.GetFormFieldTitle(lni)
  objQPDF.DeleteFormField(lni)
next

objQPDF.SetTextAlign(0)
objQPDF.SetTextSize(S1)

TW=objQPDF.GetTextWidth("JOSE ADRIANO BALTIERI")

CALL objQPDF.DRAWTEXTBOX(X1,Y1,W1,H1,"JOSE ADRIANO BALTIERI",0)

WScript.Echo objQPDF.SaveToFile("TEST037OUT.PDF")

WScript.Echo "OK !"




When I draw "JOSE ADRIANO BALTIERI", I needed it to be in transparent mode.

Any help ?
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 08 at 11:14PM
I've done this in the past, don't remember exactly how, maybe SetTransparency() function?
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 08 at 5:18AM
Yeah, I had seen that before but it doesnt work.

It sets the transparency of the TEXT itself but I need something to set the transparency of the BOX underneath....


Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 08 at 12:39PM
I think your problem is with the form fields themselves. They aren't transparent, and are overwriting the image underneath. QuickPDF deletes them, but not the white background.

What you can do is use the PDF with the form fields to get your locations, but use the original PDF without the form fields to write your text on.

Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 08 at 12:55PM
Yep, just validated this. Loaded the PDF in NitroPDF, removed the form fields, and saved. The white blocks are still there.

Whatever you're using to add the form fields is the actual problem.
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 08 at 1:26PM
Sorry, I dont get it.

You mean that the problem is on the PDF template itself or on my script ?

Should I use something else to draw my template then I'd be ok, is it ?

Thanks !
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 08 at 1:31PM
The problem is with the PDF template. The form fields are wiping out the image underneath. Deleting the form fields leaves the white blocks.

If you use the original PDF before you added the form fields, the problem will go away. Just get your field locations from the one with the form fields.
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