Output file is empty

I am trying the below code and I see the output to be empty.
Reading from an input stream (is)
Document document = new Document();
com.aspose.pdf.Page newP = document.getPages().add();
com.aspose.pdf.Image pdfImage = new com.aspose.pdf.Image();
newP.getPageInfo().setHeight(2000);
newP.getPageInfo().setWidth(2000);
pdfImage.setImageStream(is);
newP.getParagraphs().add(pdfImage);
document.save(“C:/temp/susma.pdf”,SaveFormat.Pdf);
Am I missing something here?

@sushmaIBM

The code snippet seems fine. Can you please make sure that the input stream has valid image? Also, can you please share the image file for our reference as well so that we can test the scenario in our environment and address it accordingly.