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
|