Sono passati un po' di mesi, non sò quanto possa esserti di aiuto.
Vediamo.
A) Pagina che crea il File
codice:
istanzia_co
mostraArtInCart(request.QueryString( "id" ))
ripulisci_co
Dim i,pdf
Dim dblTotImponibile, dblTotIvato
Set pdf=CreateJsObject("FPDF")
pdf.CreatePDF()
pdf.SetPath("fpdf/")
pdf.Open()
pdf.LoadModels("TestModel") '<<<-----------Questo
pdf.AddPage()
pdf.LoadExtension("table")
pdf.SetFont "Arial","",8
for i = lBound(arrListaArt,2) To uBound(arrListaArt,2)
pdf.SetColumns 20,110,30,30
pdf.row arrListaArt(3,i),arrListaArt(2,i) & ": " & arrListaArt(1,i)," € " & formatNumber(arrListaArt(4,i),2)," € " & formatNumber(cDbl(arrListaArt(3,i)) * cDbl(arrListaArt(4,i)),2)
dblTotImponibile = dblTotImponibile + (cDbl(arrListaArt(3,i)) * cDbl(arrListaArt(4,i)))
If i = uBound(arrListaArt,2) Then
pdf.Ln(4)
Else
pdf.Ln(1)
End If
Next
pdf.Ln(1)
pdf.Cell 190,1,"","B",0,"C"
pdf.Ln(2)
pdf.SetColumns 125,35,30
pdf.row "","Imponibile"," € " & formatNumber(dblTotImponibile,2)
pdf.Ln(1)
pdf.SetColumns 125,35,30
pdf.row "","Aliquota iva (20%)",""
pdf.Ln(1)
pdf.SetFont "Arial","B",8
pdf.SetColumns 125,35,30
pdf.row "","Totale iva inclusa"," € " & formatNumber(dblTotImponibile + ((dblTotImponibile * 20)/100),2)
pdf.Ln(2)
pdf.Cell 190,1,"","B",0,"C"
pdf.Close()
pdf.Output()
[B]
B) file TestModel in cartella fpdf/models
codice:
this.Header=function Header()
{
this.Image('intestaz_pdf.jpg',10,8,40);
this.SetFont('Arial','',7);
this.Cell(80);
this.Cell(0,0,'Via xxxxxxxxx, xx - xxxx (xx)',0,0,'R');
this.Ln(4);
this.Cell(0,0,'Tel. xxxx xxxxx - Fax xxxx xxxxx',0,0,'R');
this.Ln(4);
this.Cell(0,0,'P.I. xxxxxxxx',0,0,'R');
this.Ln(4);
this.SetFont('Arial','B',10);
this.Cell(0,0,'Preventivo',0,0,'R');
this.Ln(10);
this.SetFont('Arial','B',10);
this.LoadExtension("tableFix");
this.SetColonna(20,110,30,30);
this.Riga('Quantitá','Articolo','Prezzo unitario','Prezzo totale');
this.Ln(4);
}
Spero di averti aiutato... come dicevo è un bel po che non ci metto le mani