Evo pdf不适用于localhost [英] Evo pdf does not work with localhost

查看:115
本文介绍了Evo pdf不适用于localhost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用evo pdf将html转换为pdf文件,

I m using evo pdf to convert html to pdf file,

 PdfConverter pdfConverter = new PdfConverter();
 //license, credantials
 pdfConverter.PdfHeaderOptions.HeaderHeight = 70;
 pdfConverter.PdfHeaderOptions.DrawHeaderLine = false;

 pdfConverter.PdfFooterOptions.TextArea = new TextArea(495, 10, "Sayfa &p; / &P;", new System.Drawing.Font("Arial", 8));
 pdfConverter.PdfFooterOptions.FooterHeight = 20;
 pdfConverter.PdfFooterOptions.DrawFooterLine = false;
 pdfConverter.PdfDocumentOptions.RightMargin = 20;
 pdfConverter.PdfDocumentOptions.LeftMargin = 20;
 pdfConverter.PdfDocumentOptions.TopMargin = 20;
 pdfConverter.PdfDocumentOptions.BottomMargin = 20;
 pdfConverter.PdfDocumentOptions.FitWidth = true;

 pdfConverter.SavePdfFromUrlToFile(pdfUrl,path);

我的pdf路径以localhost开头

and my pdf path starts with localhost

,但它不适用于localhost.有什么办法可以在我的本地测试evo pdf

but it is not working with localhost. Is there any way to test evo pdf in my local

推荐答案

pdfUrl是否指向HTML页面或PDF文档?只要将HTML页面很好地加载到浏览器中,就可以指向一个HTML页面,该页面可以是本地URL,而不会出现问题. 路径参数应该是本地计算机上输出文件的路径.

Does pdfUrl point to a HTML page or a PDF document? It is expected to point to a HTML page which can be a localhost URL without problems as long as the HTML page is loaded well in a browser. The path parameter is expected to be the path to output file on local computer.

这篇关于Evo pdf不适用于localhost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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