I'm working on a project, where I have various incoming PDF files with images, texts, linearts, etc. mixed together.
As a first step I need to find the smallest rectangle that includes all the contents and crop the rest. For that probably a C# implementation of MarginFinder could do the job.(ITextSharp crop PDF to remove white margins)
The second step would be to take the "margin free" contents and put it on a new PDF document, where the following could be user defined:
- Dimension of the new page size,
- Justification of the contents: should the container rectangle be on left, center or right justified,
- Rotation of the container rectangle.
Could this be done solely with iTextSharp? If yes, anyone could share/point out some examples or documentations?