3
A
回答
6
我在为自己调查iTextSharp时发现了这段代码片段,发现有2个人提及Open Actions。我已在下面包含http://www.developerbarn.com/blogs/richyrich-33.htm的片段:
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();
相关问题
- 1. 设置默认缩放
- 2. 当默认不是100时,在Selenium WebDriver中设置缩放级别为100%
- 3. D3 - 设置双击的缩放比例
- 4. 在AmChart中设置默认缩放
- 5. 如何设置用户控件的相对缩放比例?
- 6. Qt OpenGL默认缩放比例真的很奇怪
- 7. Chrome响应式仿真器 - 如何将默认缩放至100%
- 8. 如何设置加载JSON图层的最小缩放比例?
- 9. 如何动态设置c3图表的y轴缩放比例?
- 10. 如何在android google map中设置默认缩放级别?
- 11. 如何在Android WebView中设置缩放比例
- 12. 如何使用Root.plist的默认设置?
- 13. TKinter:如何将我的滑块的默认值设置为100?
- 14. 如何在iPhone上更改方向更改时重置Web应用程序的缩放比例/缩放比例?
- 15. 当我更改默认缩放设置时,Google Maps JavaScript API不缩放
- 16. 如何检测UIWebView的缩放比例
- 17. CSS图像的容器缩放比例高度为100%
- 18. 如何设置Datetimepicker的默认设置?
- 19. 设置iOS模拟器的默认比例
- 20. 使用JavaScript整个SVG缩放比例
- 21. Maxscript中的缩放比例
- 22. 设置UIScrollView缩放比例以适合屏幕
- 23. 如何启用缩放控件并缩小WebView中的缩放比例?
- 24. 如何设置默认baseUrl
- 25. 如何设置默认值?
- 26. 每次重绘后设置缩放比例
- 27. 如何停止比例图像缩放?
- 28. 是否有可能在android studio中为编辑器设置默认缩放比例?
- 29. 使用JavaScript/onorientationchange重置iPhone上Safari的比例/宽度/缩放
- 30. 如何使用HighChart更改轴的缩放比例