I am trying to create a pdf using the itext library. I want to create a pdf where the width of pdf is fixed at 3.020cms and height is auto adjustable according to the text
I found that we need to create a Document object of itext where we can specify the page size like:
Document document = new Document(PageSize.A4, 0, 0, 0, 0);
The first parameter as I found is a Rectangle object of itext. In the api of Rectangle I could not find any readymade constuctor where I can only specify the width to a particular value and set height as auto. Could anyone suggest how can i create a pdf of where width is fixed to 3.020cms but height is auto. Thanks in advance.