How to properly create a pdf with fpdf?

2020-04-17 05:34发布

I have some code to try to create a single PDF document but i can't do it.

code :

<%@ language="vbscript"%>
<!--#include file="fpdf.asp"-->



<%
if Request.form("test") <> "" Then

    Set pdf=CreateJsObject("FPDF")
    pdf.CreatePDF()
    pdf.SetPath("fpdf/")
    pdf.SetFont "Arial","",16
    pdf.Open()
    pdf.AddPage()
    pdf.Cell 40,10,"Hello Word!"
    pdf.Close()

pdf.Output("list.pdf","T")

End If
%>

So, (dont mind with the request.form for execute..lol)
when i click the button i get :
"FPDF error: Unable to create output file: list.pdf" I've tried some sites for help and done alot of things and searched here on stack and found some useful things but nothing directed to this ...
Any help would be appreciated ! I can try to answer any questions you may have about the code or something else.
Also, if you have another solution for creating PDF's with classic ASP, please lemme know (free or very low price) Thanks for your attention !

1条回答
对你真心纯属浪费
2楼-- · 2020-04-17 06:06

I've specified the path of Output to a VIRTUAL location and it Works great ! Thanks Every one for your help ! Best Regards

查看更多
登录 后发表回答