wkhtmltopdf

Pechkin HTML to PDF that includes a link to an extensionless PNG

ⅰ亾dé卋堺 提交于 2021-02-07 08:20:01
问题 I'm trying to convert an HTML string to PDF using Pechkin Synchronised (WkHtmlToPDF). Everything works perfectly apart from one (deal breaking) part. As part of the HTML string I have an Image tag that references a dynamically generated PNG file over SSL (See below for code). It simply appears as a blank box in the output pdf. I've checked the docs and turned on every option I can think of and have seen references to WkHtmlToPDF being able to support PNG format and pull data from SSL'd

Rotativa / Wkhtmltopdf images not displaying

谁都会走 提交于 2021-02-07 02:33:28
问题 I am currently creating an MVC 4 web application. I have an action that has a base background image which is always the same then an arrow image which changes in degrees depending on the information that is collected within the action. I call this action using <img src="@Url.Action("trend-image", "NonReg_Reports")" alt="background" width="245" height="105" /> This works fine when it is called and is just displaying a HTML webpage. It gives me the HTML. <img src="/nonreg-report/01495344/trend

Rotativa / Wkhtmltopdf images not displaying

旧城冷巷雨未停 提交于 2021-02-07 02:33:02
问题 I am currently creating an MVC 4 web application. I have an action that has a base background image which is always the same then an arrow image which changes in degrees depending on the information that is collected within the action. I call this action using <img src="@Url.Action("trend-image", "NonReg_Reports")" alt="background" width="245" height="105" /> This works fine when it is called and is just displaying a HTML webpage. It gives me the HTML. <img src="/nonreg-report/01495344/trend

Rotativa / Wkhtmltopdf images not displaying

左心房为你撑大大i 提交于 2021-02-07 02:31:59
问题 I am currently creating an MVC 4 web application. I have an action that has a base background image which is always the same then an arrow image which changes in degrees depending on the information that is collected within the action. I call this action using <img src="@Url.Action("trend-image", "NonReg_Reports")" alt="background" width="245" height="105" /> This works fine when it is called and is just displaying a HTML webpage. It gives me the HTML. <img src="/nonreg-report/01495344/trend

Rotativa / Wkhtmltopdf images not displaying

只谈情不闲聊 提交于 2021-02-07 02:31:30
问题 I am currently creating an MVC 4 web application. I have an action that has a base background image which is always the same then an arrow image which changes in degrees depending on the information that is collected within the action. I call this action using <img src="@Url.Action("trend-image", "NonReg_Reports")" alt="background" width="245" height="105" /> This works fine when it is called and is just displaying a HTML webpage. It gives me the HTML. <img src="/nonreg-report/01495344/trend

“Wkhtmltopdf didn't return any data” with CakePHP

ぃ、小莉子 提交于 2021-01-28 20:05:23
问题 I am running a CakePHP 2.8 environment and want to print a PDF with wkhtmltopdf. Once, I could create an PDF, then, I didn't used it for few weeks because I was working on something else. Today I restarted to work on that and got the error Message: "WKHTMLTOPDF didn't return any data" APP/Plugin/CakePdf/Pdf/CakePdf.php line 236 → WkHtmlToPdfEngine->output() APP/Plugin/CakePdf/View/PdfView.php line 97 → CakePdf->output(string) CORE/Cake/Controller/Controller.php line 963 → PdfView->render(null

DinkToPdf Net Core not able to load DLL files

爱⌒轻易说出口 提交于 2021-01-27 13:46:23
问题 I am try to generate PDF from html sql server database using DinkToPdf library. In the Startup file I have added var context = new CustomAssemblyLoadContext(); context.LoadUnmanagedLibrary(Path.Combine(Directory.GetCurrentDirectory(), "libwkhtmltox.dll")); The line gives me error on launching the web app DllNotFoundException: Unable to load DLL 'C:\Program Files\IIS Express\libwkhtmltox.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT:

跨平台导PDF,结合wkhtmltopdf很顺手

假装没事ソ 提交于 2021-01-24 13:30:18
前言 好东西要分享,之前一直在使用wkhtmltopdf进行pdf文件的生成,常用的方式就是先安装wkhtmltopdf,然后在程序中用命令的方式将对应的html生成pdf文件,简单而且方便;但重复的编码使得想在wkhtmltopdf基础上进行封装,偶然间发现有小伙伴已经封装的还不错啦,常用的功能都已经实现,源码地址:https://github.com/fpanaccia/Wkhtmltopdf.NetCore。 作者将其打包成Nuget包(Wkhtmltopdf.NetCore),直接引入使用即可; 正文 既然用到了.NetCore,肯定就要考虑到跨平台兼容性,对于wkhtmltopdf之前一直是在Windows上使用,还没有在其他平台尝试;这个包封装的行不行,拉出来遛遛就知道啦,接下来就试试: 1. 建个API项目,引入包和兼容对应平台的wkhtmltopdf执行文件 ; 注:默认依赖的wkhtmltopdf执行文件需要存放在Rotativa目录下,可以自定义名称,如果自定义,需要再注册服务时指定对应的文件名;这里的wkhtmltopdf已经根据不同平台进行编译打包了,无需安装,这些文件在源码那就有; 2.创建PDFTestController控制器,添加如下接口进行测试 ; 首先把生成pdf的服务注入进来,后续直接使用就可以啦: 接下来就开始写接口啦,这里只是测试

跨平台导PDF,结合wkhtmltopdf很顺手

£可爱£侵袭症+ 提交于 2021-01-24 12:52:04
前言 好东西要分享,之前一直在使用wkhtmltopdf进行pdf文件的生成,常用的方式就是先安装wkhtmltopdf,然后在程序中用命令的方式将对应的html生成pdf文件,简单而且方便;但重复的编码使得想在wkhtmltopdf基础上进行封装,偶然间发现有小伙伴已经封装的还不错啦,常用的功能都已经实现,源码地址:https://github.com/fpanaccia/Wkhtmltopdf.NetCore。 作者将其打包成Nuget包(Wkhtmltopdf.NetCore),直接引入使用即可; 正文 既然用到了.NetCore,肯定就要考虑到跨平台兼容性,对于wkhtmltopdf之前一直是在Windows上使用,还没有在其他平台尝试;这个包封装的行不行,拉出来遛遛就知道啦,接下来就试试: 1. 建个API项目,引入包和兼容对应平台的wkhtmltopdf执行文件 ; 注:默认依赖的wkhtmltopdf执行文件需要存放在Rotativa目录下,可以自定义名称,如果自定义,需要再注册服务时指定对应的文件名;这里的wkhtmltopdf已经根据不同平台进行编译打包了,无需安装,这些文件在源码那就有; 2.创建PDFTestController控制器,添加如下接口进行测试 ; 首先把生成pdf的服务注入进来,后续直接使用就可以啦: 接下来就开始写接口啦,这里只是测试

How to convert html map into image (png or jpg )

拥有回忆 提交于 2021-01-07 02:39:58
问题 I am trying to save a map containing markers and also heatmap into an image. Here is the code to display the map. from ipywidgets import Layout import geopandas defaultLayout=Layout(width='3000px', height='3000px') # A very large image. lat_lgn = [39.74248, 254.993622] m_f = Map(center=lat_lgn, zoom=12, layout=defaultLayout) marker_m = Marker(location=lat_lgn, draggable=False) m_f.add_layer(marker_m) m_f Add some markers on it arr_test1 = [39.74258, 254.993682] arr_test2 = [39.76288, 254