Hi,
I am facing exception in reading Tiff file using Aspose Document object to create PDF file of it. Originally, I wanted to read Tiff bytes and write them into a PDF. Since I am getting "invalid PDF format" exception in original approach, I tried reading Tiff file which is giving me exception as below
com.aspose.pdf.internal.ms.System.z11: Specified argument was out of the range of valid values.
Code I am trying to use is
ByteArrayOutputStream baos=new ByteArrayOutputStream();
com.aspose.pdf.Document asposeDoc = new com.aspose.pdf.Document();
Page asposePage = asposeDoc.getPages().add();
asposePage.getParagraphs().add(immg);
BufferedImage bufImg = ImageIO.read(new File("TiffFile.tif"));
ImageIO.write(bufImg, "TIF", baos);
asposeDoc.save(baos, 40);
Exception occurred: class com.aspose.pdf.internal.ms.System.z11: Specified argument was out of the range of valid values.
Please let me know if further information needed
Thanks
I am facing exception in reading Tiff file using Aspose Document object to create PDF file of it. Originally, I wanted to read Tiff bytes and write them into a PDF. Since I am getting "invalid PDF format" exception in original approach, I tried reading Tiff file which is giving me exception as below
com.aspose.pdf.internal.ms.System.z11: Specified argument was out of the range of valid values.
Code I am trying to use is
ByteArrayOutputStream baos=new ByteArrayOutputStream();
com.aspose.pdf.Document asposeDoc = new com.aspose.pdf.Document();
Page asposePage = asposeDoc.getPages().add();
asposePage.getParagraphs().add(immg);
BufferedImage bufImg = ImageIO.read(new File("TiffFile.tif"));
ImageIO.write(bufImg, "TIF", baos);
asposeDoc.save(baos, 40);
Exception occurred: class com.aspose.pdf.internal.ms.System.z11: Specified argument was out of the range of valid values.
Please let me know if further information needed
Thanks