Hello,
I am trying to open a pdf file that i will create and import data from a database.
I am getting a create object error in the first line of code!
Do i need any references in my web project to support adobe acrobat so this will work properly?
The code is -
***** This line is the error ******
Set PDF = Server.CreateObject("Persits.Pdf")
' Create empty param objects to be used across the app
Set Param = PDF.CreateParam
Set TextParam = PDF.CreateParam
' Create document
Set Doc = PDF.CreateDocument
' Create table with one row (header), and 5 columns
Set Table = Doc.CreateTable("width=500; height=20; Rows=1; Cols=5; Border=1; CellSpacing=-1; cellpadding=2 ")
Table.Font = Doc.Fonts("Helvetica")
Set HeaderRow = Table.Rows(1)
Param.Set("alignment=center")
With HeaderRow
.BGColor = &H90F0FE
.Cells(1).AddText "Category", Param
.Cells(2).AddText "Description", Param
.Cells(3).AddText "Billable", Param
.Cells(4).AddText "Date", Param
.Cells(5).AddText "Amount", Param
End With
' Set column widths
With Table.Rows(1)
.Cells(1).Width = 80
.Cells(2).Width = 160
.Cells(3).Width = 50
.Cells(4).Width = 70
.Cells(5).Width = 60
End With
' Populate table with data
Set rs = Server.CreateObject("adodb.recordset")
rs.Open "select * from demo_expense where sessionid='" & session.SessionID & "' order by id", Session("ConnectStr")
The error i get is -
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/aar400prp/TestPdf.asp, line 11
line 11 is - (Set PDF = Server.CreateObject("Persits.Pdf"))
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at:
THANKS!
I am trying to open a pdf file that i will create and import data from a database.
I am getting a create object error in the first line of code!
Do i need any references in my web project to support adobe acrobat so this will work properly?
The code is -
***** This line is the error ******
Set PDF = Server.CreateObject("Persits.Pdf")
' Create empty param objects to be used across the app
Set Param = PDF.CreateParam
Set TextParam = PDF.CreateParam
' Create document
Set Doc = PDF.CreateDocument
' Create table with one row (header), and 5 columns
Set Table = Doc.CreateTable("width=500; height=20; Rows=1; Cols=5; Border=1; CellSpacing=-1; cellpadding=2 ")
Table.Font = Doc.Fonts("Helvetica")
Set HeaderRow = Table.Rows(1)
Param.Set("alignment=center")
With HeaderRow
.BGColor = &H90F0FE
.Cells(1).AddText "Category", Param
.Cells(2).AddText "Description", Param
.Cells(3).AddText "Billable", Param
.Cells(4).AddText "Date", Param
.Cells(5).AddText "Amount", Param
End With
' Set column widths
With Table.Rows(1)
.Cells(1).Width = 80
.Cells(2).Width = 160
.Cells(3).Width = 50
.Cells(4).Width = 70
.Cells(5).Width = 60
End With
' Populate table with data
Set rs = Server.CreateObject("adodb.recordset")
rs.Open "select * from demo_expense where sessionid='" & session.SessionID & "' order by id", Session("ConnectStr")
The error i get is -
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/aar400prp/TestPdf.asp, line 11
line 11 is - (Set PDF = Server.CreateObject("Persits.Pdf"))
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at:
THANKS!