Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File does not begin with '%PDF-' when including image using FPDF in Classic ASP
- this.Image('bg_logo_small.jpg',10,8,213,46);
- ./rpt/report.asp
- ./rpt/fpdf.asp
- ./rpt/bg_logo_small.jpg
- ./rpt/fpdf/ - this directory contains all the files extracted from fpdf1.01.zip
- ./rpt/fpdf/extends/
- ./rpt/fpdf/fonts/
- ./rpt/fpdf/includes/
- ./rpt/fpdf/models/
- <%@LANGUAGE="javascript" CODEPAGE="65001"%>
- <!--#include file="fpdf.asp" -->
- <%
- var pdf=new FPDF();
- pdf.Header=function Header()
- {
- this.Image('bg_logo_small.jpg',10,8,213,46);
- this.SetFont('Arial','B',15);
- this.Cell(80);
- this.Cell(30,10,'Title',1,0,'C');
- this.Ln(20);
- }
- pdf.Footer=function Footer()
- {
- this.SetY(-15);
- this.SetFont('Arial','I',8);
- this.Cell(0,10,'Page '+ this.PageNo()+ '/{nb}',0,0,'C');
- }
- pdf.CreatePDF();
- pdf.SetPath("fpdf/");
- pdf.SetFont("Arial","",16);
- pdf.Open();
- pdf.AddPage();
- pdf.Cell(40,10,"Hello Word!");
- pdf.Close();
- pdf.Output();
- %>
- pdf.LoadModels("bgimg")
- ./rpt/fpdf/models/
- try with <%@LANGUAGE="javascript" %>
- insted of <%@LANGUAGE="javascript" CODEPAGE="65001"%>
- Just need to remove CODEPAGE="65001"
Add Comment
Please, Sign In to add comment