Let's preface this post by saying... Yes, I know I'm a dinosaur for using Classic ASP in this day and age!
I'm using FPDF.asp to generate a PDF on the fly.
Everything works fine and as expected on my test server. On my live server, however, I encounter an error, if I try to output an image as part of my PDF. I know the syntax is correct, since it works on the test server as it should.
The error I receive on my live server is: "File does not begin with '%PDF-'."
If I comment out the line that adds the image, the file loads up properly and error-free!
Does anyone have any idea, as to what may need to be corrected on the live server to eliminate this problem???
A开发者_Go百科ny help would be most appreciated.
Mitch
Update!
Not sure why having an image or not makes the difference, BUT the solution turned out to be that I had some HTML code mixed in with the output and this caused FPDF to fail when an image was included.
Removed the HTML code and problem solved!
-Mitch
精彩评论