如何使用fpdf正确创建pdf? [英] How to properly create a pdf with fpdf?

查看:190
本文介绍了如何使用fpdf正确创建pdf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些代码可以尝试创建一个PDF文档,但是我做不到.

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

代码:

<%@ 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
%>

因此,(不要介意execute..lol的request.form)
当我单击按钮时,我得到:
"FPDF错误:无法创建输出文件:list.pdf" 我尝试了一些网站的帮助,并做了很多事情,并在此处进行了堆栈搜索,发现了一些有用的东西,但没有针对此的东西...
任何帮助,将不胜感激 !我可以尝试回答您对代码或其他问题的任何疑问.
另外,如果您还有另一种使用经典ASP创建PDF的解决方案,请谅解(免费或非常低的价格) 感谢您的关注!

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 !

推荐答案

我已指定Output到VIRTUAL位置的路径,并且效果很好! 谢谢大家的帮助! 最好的问候

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

这篇关于如何使用fpdf正确创建pdf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆