Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
797 views
in Technique[技术] by (71.8m points)

split - Tile PDF pages vertically with iTextSharp

I want to tile pages vertically with iTextSharp

Something like this:

---------
| L  |  R | 
---------

This is 1 page as far as PDF is concerned.

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.

Something like this: page 1:

-----
| L |
-----

page 2:

-----
| R  |
-----
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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".

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/

For instance: http://sourceforge.net/p/itextsharp/code/HEAD/tree/book/iTextExamplesWeb/iTextExamplesWeb/iTextInAction2Ed/Chapter06/TilingHero.cs

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 ;-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...