使用Itextsharp类转换的pdf文件的大小 [英] Size of converted pdf file using Itextsharp class

查看:232
本文介绍了使用Itextsharp类转换的pdf文件的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将html页面转换为pdf,但是我仅面临一个问题,即我的pdf内容超出了转换文件的框架,而当我看到html大小时,它的大小很好.这建议我该怎么办,并且我已经将itextsharp类与c#

I have converted the html page to pdf but i m facing only one problem that my content of the pdf is getting outside the frame of the convertted file while the html size is nice when i see it.suggest me what should i do and i have used itextsharp class with c#

推荐答案

一起使用了.该问题的表达方式不正确,甚至可能根本不存在.因此您可能会尝试提出一些人为的问题.原因很简单: HTML页面没有特定大小.您可以在Web浏览器中观察到的页面的实际呈现大小取决于许多输入因素.首先,在任何给定时刻使用浏览器窗口的客户端宽度;还有许多其他因素,例如当前缩放比例,默认浏览器样式(CSS通常不会指定每个可能的渲染选项,很多都留给默认设置),特定渲染引擎的功能和特性等等.

最有可能的是,您仍然遇到一些实际问题.在这种情况下,您将从错误的角度进行处理.您需要描述应用程序的最终目标,并详细询问在某些情况下可以做什么.

—SA
The problem is not correctly formulated and probably does not even exist; so you probably trying to raise some artificial problem. The reason for this is very simple: HTML page does not have any certain size. The actual rendered size of a page you can observe in a Web browser depends on many input factors; first of all, on the client width of the browser window at any given moment; there are many other factors such as current zoom, default browser styles (CSS usually does not specify each and every possible rendering option, a lot is left to the default), features and peculiarities of a particular rendering engine and more.

Most likely, you still have some real problem. In this case, you approach it from a wrong side. You need to describe the ultimate goals of your application and ask what could you do in certain case, in sufficient detail.

—SA


这篇关于使用Itextsharp类转换的pdf文件的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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