如何更改PDF Gembox中页面的大小
我正在尝试使用gemboxpdf从划痕创建PDF,
using (var document = new PdfDocument())
{
// Add a page.
var page = document.Pages.Add();
page.Rotate = 90;
// Write a text.
using (var formattedText = new PdfFormattedText())
{
formattedText.Append("Hello World!");
page.Content.DrawText(formattedText, new PdfPoint(100, 700));
}}
我想更改页面的大小,以便能够将其设置为A1,A2,A3或A4或自定义大小,
我尝试设置Cropbox,但是它不起作用。 我已经看到了如何使用spreedsheet进行操作的另一个问题,但是使用其printOptions我也无法更改其大小
如何修改页面尺寸?
谢谢
I'm trying to create a PDF from the scratch using GemBoxPdf
using (var document = new PdfDocument())
{
// Add a page.
var page = document.Pages.Add();
page.Rotate = 90;
// Write a text.
using (var formattedText = new PdfFormattedText())
{
formattedText.Append("Hello World!");
page.Content.DrawText(formattedText, new PdfPoint(100, 700));
}}
I'd like to change the size of the page to be able to set it as A1,A2,A3 or A4 or custom size
I've tried to set the cropBox but it does not work.
I've seen another questions of how to do it with spreedsheet but using its PrintOptions I am also unable to change its size
How do I modify the page size ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论