0

I've generated a PDF file from HTML. I hard-coded the width and height of the PDF file to be generated.

But the PDF has white spaces at the end when my content gets added.

As my content can be dynamically changed (HTML data), I need the PDF to adjust height according to the content.

Here is My PDF

How can I do that with C# or iTextSharp?

Paul Karam
  • 4,052
  • 8
  • 30
  • 53
Yash Katiyar
  • 31
  • 1
  • 1
  • 8
  • *"Here is My PDF"* - That merely is a bitmap image rendering of your PDF. (Stack overflow only allows image attachments; for anything else please use a public googledrive or dropbox share or similar and post the URL here.) – mkl Jan 24 '18 at 08:54
  • [This answer](https://stackoverflow.com/a/20212172/1729265) shows how to generically reduce a PDF page to the dimensions with content. It is for iText for Jave but should be easy to port to iText for .Net. – mkl Jan 24 '18 at 09:51

0 Answers0