问题标签 [pechkin]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
16854 浏览

c# - Pechkin 文档/教程

我尝试了完美运行的 wkhtmltopdf ......但是在服务器上我无法启动一个进程,所以我的解决方案是:https ://github.com/gmanny/Pechkin

但我不知道如何在我的项目中实现它......有没有我可以打开并运行的示例?

我看了一下这个例子:

但我没有让它工作......它看起来很容易,但不知道如何实现它......但我看到 Gman 已经使用它了。

先感谢您... :)

0 投票
3 回答
8568 浏览

c# - Pechkin HTML to PDF,包含指向无扩展名 PNG 的链接

我正在尝试使用 Pechkin Synchronized (WkHtmlToPDF) 将 HTML 字符串转换为 PDF。除了一个(交易破坏)部分之外,一切都完美无缺。

作为 HTML 字符串的一部分,我有一个 Image 标记,它通过 SSL 引用动态生成的 PNG 文件(代码见下文)。它只是在输出 pdf 中显示为一个空白框。

我检查了文档并打开了我能想到的每个选项,并且看到了对 WkHtmlToPDF 能够支持 PNG 格式并从 SSL 源中提取数据的引用。

引用“缺失”图像的相关 HTML

还尝试将 &'s 转换为 &'s 以查看是否有帮助,但遗憾的是它没有:

当我直接通过浏览器点击链接并检查提琴手报告内容长度 1136,内容类型为 image/png 并且标题还提到 WebSphere 和 Servlets。

在库所有者的进一步测试和帮助之后,似乎 SSL 不是问题,它缺乏扩展。

0 投票
1 回答
740 浏览

c# - 使用 pechkin asp.net c# 未在 Pdf 中呈现 Ajax 图表

我一直在使用 Pechkin(c# 的 wkhtml 包装器)在我的项目中创建 pdf 报告并且它工作正常,除了我无法在我创建的 pdf 中呈现任何 ajax 图表(饼图、条形图、气泡或任何东西),我也尝试了 rederdelay 属性但是它对我没有帮助。

文本数据来了,但图表没有,整个事情都搞砸了。所以我推断问题是因为创建的图表没有使用标准的 html 来处理包装器,所以总之我需要一些可以在 html 渲染之前将这些图表转换为图像的东西,它应该是开源/免费的。

谢谢阿洛克

PS 我正在使用 ajax 控制工具包图表,pechkin 是 nuGet 的最新安装。

0 投票
1 回答
166 浏览

iis-7 - 佩奇金在 DotNetNuke 7 上

我试图在 DNN“bin”文件夹中安装带有 Pechkin 的 wkhtmltopdf 作为 dll。但是当我上传 pechkin.dll DNN 崩溃。我尝试上传 System.Drawing 和 System.Net dll,因为我希望这只是一个参考错误。但什么都没有改变。

我希望这里的人也尝试过这个可以帮助我。

亲切的问候

铁加

0 投票
1 回答
1028 浏览

c# - 使用 Pechkin html 到 pdf 创建目录

我目前正在使用 Pechkin 库来创建基于 html 的 pdf 文件。这一切都很好。

但我想添加一件事,即目录 (TOC)。但我无法让这个工作。只有 wkhtmltopdf 很容易做到:

但是对于 Pechkin,它就行不通了。我已经有一个书签(可以在 Adob​​e Reader 中使用),但这不是我想要的真正的 TOC。我试图添加

但它似乎没有任何效果。

我也尝试过使用:

这将创建一个空的 pdf,因为此功能已过时。

所以我得到了一个不错的 pdf 结果,但只是没有目录。你们中有人知道我如何让 TOC 出现在我的 pdf 文件中吗?

我也在 github 上将这个问题作为一个问题提出,但因为他们的反应并不总是那么快,或者根本没有反应,所以我也在这里提出了这个问题。

0 投票
0 回答
584 浏览

c# - 找不到类型“XX”的构造函数。使用 Pechkin 插件

我试图让这个插件在我的 ASP 项目中运行。我熟悉 C#,但之前从未尝试过 ASP.net 项目。

我试着在这个博客中做任何事情:

http://codeutil.wordpress.com/2013/09/16/convert-html-to-pdf/

但是我遇到了以下错误消息:“找不到类型'Pechkin.SimplePechkin'的构造函数。”

当我调用该方法来获取 Pechkin 的实例时会发生这种情况:(下面这个)

当我调试(F11)那行代码时,我进入 Pechkin 代码,返回错误的行是:

看看 SimplePechkin.cs 它有一个构造函数:

我认为这个错误不应该发生,特别是因为如果我在一个常见的 C# winforms 测试项目上运行它,它可以正常工作。也许是因为我是 ASP.net 的菜鸟。

你们能帮忙吗?

如果有人想尝试一下,这里是 github Pechkin 存储库的链接。

https://github.com/tuespetre/Pechkin

感谢您的阅读!

-Roiw

0 投票
3 回答
557 浏览

c# - Pechkin lib 抛出 TypeLoadException

我尝试了许多使用 Pechkin 和 Pechkin.Synchronized 但无法使其运行的示例,因为一直以来,我都会收到以下错误。

mscorlib.dll 中出现“System.TypeLoadException”类型的未处理异常附加信息:无法从程序集“Pechkin,版本=1.0.0.0,Culture=neutral,PublicKeyToken=null”加载类型“Pechkin.GlobalConfig”。

我正在使用 x64 Windows 7 Home Basic 和 VS2012 Express for Desktop,并且 csproj 配置为针对 x86 目标构建并安装了 Pechkin 和 Pechkin.Synchronized 使用 nuget PM。

我尝试的最后一个代码来自这里

0 投票
2 回答
1035 浏览

c# - 使用 Windows Azure 的 Pechkin

每当我尝试从 Visual Studio 调试 Azure 项目时,都会收到此错误。我检查了我的原始站点项目文件,平台目标和项目以及每个依赖项都使用“任何 CPU”。不太确定从这里做什么。

无法加载文件或程序集“Pechkin”或其依赖项之一。

在此处输入图像描述

0 投票
1 回答
259 浏览

.net - System.Security.SecurityException:Pechkin html 到 pdf 生成器在共享主机上引发安全异常

我正在使用 PechkinHTML生成PDF器。它在本地服务器上运行良好,但在共享托管公司上抛出异常。

https://github.com/tuespetre/Pechkin

安全例外:

说明:应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请联系您的系统管理员或在配置文件中更改应用程序的信任级别。

异常详细信息:System.Security.SecurityException:请求失败。

有人可以解释我做错了什么吗?

0 投票
1 回答
498 浏览

c# - Pdf is not generated on share hosting hostgator

All I have used a'lot of libraries to generate Pdf from html on Asp.net C#. It works fine on local hosting. but generate security issue when upload on shared hosting.

In ItextSharp pdf generation tool this issue is resolved by updating the assembly info file Itextsharp have not much control on CSS.

Then i tried to use https://github.com/tuespetre/Pechkin

http://www.html-to-pdf.net/

Both (Pechkin and Expert Pdf Convertor) work fine on localhost but when i upload this after publish it throws Exception on creating pdf object.

Security Exception:

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request failed.

You can also check the issue from url given below http://ospr3y.com.192-185-11-183.secure24.win.hostgator.com/client/GenerateReport2.aspx

But search some one says to update the webconfig trust level to Full but hostgar restrict to change this section of config. Can some one help how to resolve this hosting issue or some pdf generation component which do not cause issue on shared hosting.