Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Not able to write .png file in PDF

$
0
0
Hello,

In one of our application have pdf creation feature and in that we are writting multiple images in pdf , but when we select .png image then it throws error .
We have used the Aspose.Pdf for Android 1.6.0 


The code which we have done for this is as below:


com.aspose.pdf.Image m_logo = new com.aspose.pdf.Image();
m_logo.setFile(AppConstant.APP_STORAGE_DIRECTORY + File.separator + "PDFImages" + File.separator + "header.png");
 
 Page m_page = m_doc.getPages().add();
 Table m_banner = new Table();
   

  m_page.getParagraphs().add(m_banner);   
  m_banner.setColumnWidths("600");
  Row m_row = m_banner.getRows().add();
  m_row.isRowBroken(true);
  com.aspose.pdf.Cell m_cell2 = m_row.getCells().add();
  m_cell2.getParagraphs().add(m_logo);
Please let us know what we are doing wrong?

Viewing all articles
Browse latest Browse all 3131

Trending Articles