I am using itext library for pdf generation of multiple pages .and once pdf is generated I want to view that pdf for that I am using .properties
file as pdfView.(class)=pakg.pdfBuilder
. where pdfBuilder()
is method which contains code of pdf where I have created Document variable and added paragraphs into it plus I have added images then applying watermark to those images. but while generating multiple pdf's ,few pdfs are generating but then I am getting error about heap memory as:
java.lang.OutOfMemoryError: Java heap space
how do I save heap memory?