如何在asp.net中将单词转换为pdf时避免间距? [英] How to avoid spacing coming while converting word to pdf in asp.net?

查看:87
本文介绍了如何在asp.net中将单词转换为pdf时避免间距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何避免在asp.net中将单词转换为pdf时出现间距?



将单词文件转换为PDF格式左侧,右侧,顶部和底部区域。在转换期间不应该有任何空间。我正在使用Itextsharp来实现相同的功能。

How to avoid spacing coming while converting word to pdf in asp.net?

On converting a word file to PDF spacing is seen in the left,right,top & bottom area. There should not be any space during the conversion.I am using Itextsharp for the same functionality.

推荐答案

你好Alex,



你可以设计下面的边距和填充;



Hi Alex,

You can design margins and padding's like below;

Document.DefaultPageSetup.Orientation = MigraDoc.DocumentObjectModel.Orientation.Portrait;
Document.DefaultPageSetup.TopMargin = "10mm";
Document.DefaultPageSetup.LeftMargin = "5mm";
Document.DefaultPageSetup.RightMargin = "5mm";





尝试类似上面的内容来调整上边距,左边距和右边距。



Try something like above to adjust Top, Left and right margins.


这篇关于如何在asp.net中将单词转换为pdf时避免间距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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