如何将.aspx页面的一部分转换为PDF文件 [英] How do I Convert A part of .aspx Page into PDF File

查看:133
本文介绍了如何将.aspx页面的一部分转换为PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我想通过按钮将.aspx页面的一部分转换为PDF文件.

请给出解决方案.


Hi !

I want to Convert a part of .aspx page into PDF File from a Button.

Please give the solution.


Sir, I am using a JavaScript Function to Print a Part of Page from a Button. Similarly I want to Convert same thing into PDF instead of Print from another Button either from JavaScript or any other process.Presently I have not tried any code. 





To print the Function is:

function printPartOfPage(elementId)
 { var printContent = document.getElementById(elementId); var windowUrl = ''about:blank''; var uniqueName = new Date(); var windowName = ''Print'' + uniqueName.getTime(); var printWindow = window.open(windowUrl, windowName, ''left=50,top=0,width=750,height=950''); printWindow.document.write(printContent.innerHTML); printWindow.document.close(); printWindow.focus(); printWindow.print(); printWindow.close();
 }

推荐答案


检查本文此处 [
Hi ,
Check this article Here[^]
Best Regards
M.Mitwalli


首先,您发布了一个不完整的问题:您应该已经发布了尝试过的内容,被困在哪里...

除此之外,您始终可以获取PDFCreator源代码,以查看PDF打印机的工作方式,然后使用LebneizTech的建议来打印您感兴趣的页面的一部分.

祝你好运.
First of all you''ve posted an incomplete question: you should have posted what you''ve tried, where are you stuck...

Apart of that, you can always get the PDFCreator source code in order to see how do a PDF printer works and use then the recommendation from LebneizTech to print the part of the page you are interested in.

Good luck.


这篇关于如何将.aspx页面的一部分转换为PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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