将pdf大小设置为100% [英] set the pdf size 100%

查看:145
本文介绍了将pdf大小设置为100%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如果使用点网中的abcpdf打开pdf,如何设置默认pdf大小为100%。

请可以任何人都帮助我。

Hi,

how to set default pdf size is 100 % while opening a pdf using abcpdf in dot net.
please can any one help me.

推荐答案

参考这个



Refer this

PdfWriter writer = PdfWriter.GetInstance(doc, HttpContext.Current.Response.OutputStream);

//this creates a new destination to send the action to when the document is opened. The zoom in this instance is set to 0.75f (75%). Again I use doc.PageSize.Height to set the y coordinate to the top of the page. PdfDestination.XYZ is a specific PdfDestination Type that allows us to set the location and zoom.
PdfDestination pdfDest = new PdfDestination(PdfDestination.XYZ, 0, doc.PageSize.Height, 0.75f);

//open our document
doc.Open();

//here you put all the information you want to write to your PDF

//create a new action to send the document to our new destination.
PdfAction action = PdfAction.GotoLocalPage(1, pdfDest, writer);

//set the open action for our writer object
writer.SetOpenAction(action);

//finally, close our document
doc.Close();









http://www.developerbarn.com/community/entries/set-initial-pdf-document -zoom-using-itextsharp.45 / [ ^ ]


这篇关于将pdf大小设置为100%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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