'PDFbox jfreechart is blurry

I am trying to save jfreechart in pdf using PDFBOX.I am using PDImageXObject to save the chart as png and place it inside PDF using PDPageContentStream(PDFbox version :2.21.0). The problem is when it's saved as PNG it looks good but after adding those charts in PDF it becomes blurry.I tried using drawImage and drawXobject but still it's blurry.Kindly help me in getting good clarity charts in PDF.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source