How to properly create a pdf with fpdf?

不羁岁月 提交于 2019-12-31 02:49:12

问题


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:


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



来源:https://stackoverflow.com/questions/19731496/how-to-properly-create-a-pdf-with-fpdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!