Using the MailingLabels.asp as an example, how would I create a gray background behind one of the lines of text. For example; lets say I want a red background all the way across the label behind the contactName?
MailingLabels.asp
Re: MailingLabels.asp
Support · Feb 15, 2008Hello,
You will have to add a filled rectangle first with the color desired and then on top of the rectangle add the label that prints the name. This has to be done in the AddLabelInfo() method.
Thanks,
ceTe Software Support Team
Re: MailingLabels.asp
Forum member · Feb 15, 2008Thanks, I will give that a try.
Re: MailingLabels.asp
Forum member · Feb 15, 2008I have the MyPage.AddRectangle done but I cannot find AddLabelInfo in the help .chm file. How is this method listed in the help?
Re: MailingLabels.asp
Support · Feb 18, 2008Hello,
You can add the rectangle using the AddRectangle method and the label using the AddLabel method of the page object. Following is the sample code for this. You can fill the rectangle by specifying the color in the constructor or by using the FillColor property of the Rectangle object.
Dim objDoc
Dim objPage
Dim objRec
Dim objLabel
Set objDoc = Server.CreateObject( "DynamicPDF.Document" )
Set objPage = objDoc.AddPage()
Set objRec = objPage.AddRectangle( 10, 10, 200, 20, "Red", "000000", 1, DPDF_LineStyle_Solid, DPDF_ApplyColor_Fill )
Set objLabel = objPage.AddLabel( "ceTe Software", 10, 10, 200, 20 )
objDoc.DrawToWeb
Set objPage = Nothing
set objDoc = Nothing
Thanks,
ceTe Software Support Team.
Re: MailingLabels.asp
Support · Feb 18, 2008Hello,
I have just realized that you are using the MaillingLabels example. The AddLabelInfo method is available in the MailingLabels.asp code. You can use this method if you are working with the MaillingLabels example to add the rectanlge and the label elements to the page.
Thanks,
ceTe Software Support Team.