如果从SSL读取样式表,PDF转换突然失败 [英] PDF conversion suddenly fails if reading stylesheet from SSL

查看:145
本文介绍了如果从SSL读取样式表,PDF转换突然失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用EvoPdf 3.5版本已经很长时间了,但是突然间它无法从SSL读取样式表.

I've been using EvoPdf version 3.5 without problem for long but all of a sudden it can’t read a stylesheet from SSL.

string html = "<link href=\"https://www.domain.com/styles.css\" rel=\"stylesheet\" type=\"text/css\" />Test";
PdfConverter pdfConverter = new PdfConverter();
byte[] bytes = pdfConverter.GetPdfBytesFromHtmlString(html);

如果从http加载样式表,则效果很好.在另一个IIS上,可以从SSL读取样式表.

It works fine if loading stylesheet from http. And on another IIS the stylesheet can be read from SSL.

我不知道如何解决此问题.可以是DNS问题吗?

I have no idea about how to troubleshoot this. Can it be a DNS issue?

推荐答案

原因是服务器上禁用了SSL 3.0,而低于4.0的EVO HTML to PDF转换器版本不完全支持TLS,因此可能访问HTTPS文档或资源时,不能在所有服务器上正常工作.如果HTML文档中的HTTPS URL引用了这些资源,则可能导致错误,图像和样式丢失.

The reason was that SSL 3.0 was disabled on the server and versions of EVO HTML to PDF converter lower than 4.0 don’t have full support for TLS and therefore might not work properly on all the servers when accessing HTTPS documents or resources. This can lead to errors, missing images and styles if those resources are referenced by HTTPS URLs in HTML document.

这篇关于如果从SSL读取样式表,PDF转换突然失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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