Classic ASP and Tables


#1

I’m evaluating the product for our application. Since most of our data is presented in tables that need to overflow content across pages, this is the main feature I’m looking at. However, I’m having trouble getting the table code to work in classic ASP VBScript.

Here’s a bit of the code:

Set pdf1 = server.CreateObject(“Aspose.Pdf.Pdf”)
set sec1 = server.CreateObject(“Aspose.Pdf.Section”)
set table1 = server.CreateObject(“Aspose.Pdf.Table”)
set rows = server.CreateObject(“Aspose.Pdf.Rows”)
set cells = server.CreateObject(“Aspose.Pdf.Cells”)
pdf1.Sections.Add(sec1)
sec1.Paragraphs.Add(table1)
set table1.Rows = rows

As you can see, I’m creating objects and assigning them as properties to each other as appropriate. I was thinking that in order to add a row to the rows collection all I’d have to do is execute

set row1 = server.CreateObject(“Aspose.Pdf.Row”)

and add it to the rows collection. This way causes error “Invalid class string” and doesn’t work.

Another technique is to try

set row1 = table1.Rows.Add()

but this causes error “Invalid procedure call or argument” and again, doesn’t work.

I would need to do something similar for creating cells as well.

I can’t find anything in the documentation to help out, can you point me in the right direction? I’m using WinXP SP2.

Many thanks in advance.


#2

Hi jmckeown007,

Thank you for considering Aspose.

You can find a simple example at Using Aspose.Pdf for COM Applications. I am not familiar with classic ASP. But Aspose.Pdf is a standard .NET component and you can search at other place for how to use .NET component in classic ASP.


#3

I don’t think the problem is how to use a .Net component in ASP. I can create other objects just fine (table, rows, section, etc.) but it’s the creation of a row and cell for a table that doesn’t seem to be working. It seems as if these particular objects aren’t exposed and/or usable from COM.

Unfortunately, the simple example doesn’t illustrate anything for tables. I understand if you don’t have an answer… it just ends my ability to evaluate the product for purchase.

Thanks,
jmckeown007