Reply
Add Text to top of generated PDF
Old 11-08-2007, 06:02 PM Add Text to top of generated PDF
webgrrl's Avatar
Skilled Talker

Posts: 70
I generate a PDF with ASP. This works just fine, but I want to display a title at the top of the page, and I'm not sure how to do it given the code that I already have (below). Anyone have an idea?

Thanks,
WebGrrl

pdf.AddPage()
pdf.Cell 0,0,"This is the Title!"
' write data rows
iNumberOfRows = 0
while (nPageSize=0 or iNumberOfRows<nPageSize) and not rs.EOF
pdf.maxheight=pdf.rowheight
x=pdf.leftmargin
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Area"),pdf.rowheight,GetData(rs," Area","")

x=x+pdf.GetColWidth("Area")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("100,000' 1-story/sq# ft#"),pdf.rowheight,GetData(rs,"100,000' 1-story/sq# ft#","Number")

x=x+pdf.GetColWidth("100,000' 1-story/sq# ft#")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
' draw lines
x=pdf.leftmargin
pdf.Rect x,pdf.y0,pdf.GetColWidth("Area"),pdf.maxheight
x=x+pdf.GetColWidth("Area")
pdf.Rect x,pdf.y0,pdf.GetColWidth("100,000' 1-story/sq# ft#"),pdf.maxheight
x=x+pdf.GetColWidth("100,000' 1-story/sq# ft#")
pdf.y0 = pdf.y0+pdf.maxheight

iNumberOfRows=iNumberOfRows+1
rs.MoveNext
wend
webgrrl is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Reply     « Reply to Add Text to top of generated PDF
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.10261 seconds with 13 queries