c# - Xfinium : How to generate PDF with landscape orientation

标签 c# pdf xamarin

我正在为 Xamarin 项目使用 Xfinium pdf。 Pdf 正在纵向模式下生成。如何将 pdf 的方向更改为横向?

最佳答案

你有两个选择:

  1. 创建一个宽度大于高度的页面:

    PdfFixedDocument doc = new PdfFixedDocument();
    PdfPage page = doc.Pages.Add();
    // Create a landscape letter page
    page.Width = 792;
    page.Height = 612;
    
  2. 创建纵向页面并旋转它:

    PdfFixedDocument doc = new PdfFixedDocument();
    // Default page is portrait letter
    PdfPage page = doc.Pages.Add();
    // Create a landscape letter page
    page.Rotation = 90;
    

免责声明:我在开发 XFINIUM.PDF 库的公司工作。

关于c# - Xfinium : How to generate PDF with landscape orientation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51217654/

相关文章:

c# - 如何评估这两个哈希函数?

python - PyPDF2 PdfFileMerger 在合并文件中丢失 PDF 模块

ios - 如何通过ApplicationLoader查找IPA文件

c# - 如何限制进程的CPU使用率

C# 从字符串末尾删除子字符串

c# - 在 XML 序列化中包含数组索引

pdf - 有没有好的 PDF 到 XHTML 严格转换器

php - 在 php 中使用 imageMagick 预览 Pdf

android - AudioRecord.Read 在物理设备上运行时无限期挂起

webview - 在屏幕旋转事件上调整 Xamarin.Forms 核心库中定义的 WebView 的大小