使用iTextSharp垂直平铺PDF页面 [英] Tile PDF pages vertically with iTextSharp
问题描述
我想用iTextSharp垂直平铺页面
I want to tile pages vertically with iTextSharp
这样的事情:
---------
| L | R |
---------
这是1页至PDF我担心。
This is 1 page as far as PDF is concerned.
我需要将页面垂直拆分为2页的页面R和页面L
,以便页面的左侧部分首先出现,然后是右侧页面。
I need to split the page vertically into 2 parts page R and page L so that left part of page comes first and followed by right side of page.
这样的事情:
第1页:
Something like this: page 1:
-----
| L |
-----
第2页:
-----
| R |
-----
推荐答案
我改变了你的问题是因为拆分PDF与我们许多人有不同的含义。例如:您可以将包含10页的PDF分成两页PDF,共5页。
I changed your question because splitting a PDF has a different meaning to many of us. For instance: you can split a PDF with 10 pages into two PDF with 5 pages.
您不想分割PDF,而是要平铺PDF。这在我的书的第6章中有解释: http://www.manning.com/lowagie2/samplechapter6 .pdf 请参见第6.2.3节N-up复制和平铺PDF文档。
You don't want to split a PDF, you want to tile a PDF. This is explained in chapter 6 of my book: http://www.manning.com/lowagie2/samplechapter6.pdf See section 6.2.3 "N-up copying and tiling PDF documents".
如果您不熟悉Java,可以随时使用在此处下载C#版本的示例: http:/ /sourceforge.net/p/itextsharp/code/HEAD/tree/book/iTextExamplesWeb/iTextExamplesWeb/iTextInAction2Ed/
In case you aren't familiar with Java, you can always download the C# version of the examples here: http://sourceforge.net/p/itextsharp/code/HEAD/tree/book/iTextExamplesWeb/iTextExamplesWeb/iTextInAction2Ed/
你需要调整这个例子A0页面到16页A4,但这是一个简单的数学问题。这将是开发者论坛的主题; - )
You'll need to adapt this example as it tiles an A0 page into 16 A4 pages, but that's a matter of simple math. That would be off topic on a developers' forum ;-)
这篇关于使用iTextSharp垂直平铺PDF页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!