Converting to TIFF

I’m looking for some information and direction on converting Word, Excel and PDF documents to Tiff files. Is this possible with your product and if so can you please point me in the direction of some documentation on how to best accomplish this. Thanks very much.

Hi Sarah,

Thanks for your interest in Aspose.

I am a representitive from the Aspose.Words team. You can convert Word document formats to multi page tiffs easily using Aspose.Words. Please refer to the article here for details.

If you have any further questions, I will be glad to help. My colleagues will answer shortly regarding details of converting from other formats into PDF.

Thanks,

Hi Sarah,

You can use Aspose.Pdf.Kit for Java to convert a PDF to TIFF; you can either convert all the pages to a single TIFF image using saveAsTIFF method or convert the pages to individual images using getNextImage method while using the TIFF as output image format. You can also see a sample on this link.

I hope this helps. If you have any further questions, please do let us know.
Regards,

Hi Sarah,

Just a clarification as I missed that you were using Java, currently rendering to TIFF is only avaliable in the .NET version of Aspose.Words. Once the syncronization of code between the .NET and Java platform is complete this functionality (and almost all other functionality from the .NET version) will be avaliable in Java. This should be finished sometime in mid October. We will keep you informed.

Thanks,

Thanks for the quick replys. It’s appreciated. I have a few more
questions that have come up since running some trial conversions.


  1. I see a direct conversion from Excel to Image is possible however
    when I specify Tiff file format, I get no output. As a test I tried Png
    format which produced a png file.


  2. Since there is currently no direct Word to Tiff conversion I thought I
    would attempt Word to Pdf, Pdf to Tiff. If my Word document contains
    images with text that wrap the image, the text appears overlapping the
    image in the resulting pdf. Otherwise, in my limited inital tests, it
    looks pretty good.


  3. I’ve also had some problems with Pdf to Tiff conversions where text with certain fonts in the resulting Tiff files are garbled ie. overlapping, case is incorrect. I expect the majority of our document conversions will be pdf to tiff, especially if we first have to convert other file types into pdf before we can convert to tiff.

    Thanks again for your time,
    Sarah

Hi Sarah,

I would like to comment on point number 3. This issue is related to Aspose.Pdf.Kit, and we need to investigate the issue at our end. Please share a problematic PDF, having above mentioned issue while converting PDF to TIFF, with us. If you could share the code snippet you’re using at your end that would be helpful as well in order to understand your scenario. We’ll test the problem at our end and update you accordingly.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

Hi,

"1. I see a direct conversion from Excel to Image is possible however
when I specify Tiff file format, I get no output. As a test I tried Png
format which produced a png file."

I am afraid, Worksheet to Image feature of Aspose.Cells for Java does not support TIFF format at the moment. We will check and try to provide you a solution for your requirement, we will get back to you soon.

Thank you.

Hi Sarah,

Regarding point number 2, Aspose.Words supports partial text wrapping upon rendering. However text wrapping around floating objects upon rendering is still not fully supported as it is a very complex issue. We are looking into supporting this sometime soon. We will keep you informed of any developments.

In the mean time you can refactor your document to use inline positioning, or you can set out text in a table surronding an image to emulate text wrapping. I can assist you with any of these options if you need it.

Thanks,

Hi,

We think there are two workarounds for your requirement currently that you may try:

1) Use xls2pdf feature using Aspose.Cells for Java and then pdf2tiff feature using Aspose.Pdf product.

2) Use sheet2image feature provided by Aspose.Cells for Java to convert sheet to images first, such as by using SheetRender.toImage(int pageIndex) method. Then use some other libraries such as JAI-ImageIO apis that you can create tiff file with those BufferedImages created by sheet2image. With JAI-ImageIO, code sample might be:

TIFFImageWriter tiw = new TIFFImageWriter(new TIFFImageWriterSpi());
ImageWriter iw = ImageIO.getImageWritersByFormatName(“tiff”).next();
FileOutputStream fos = new FileOutputStream(“res.tiff”);
MemoryCacheImageOutputStream outputStream = new MemoryCacheImageOutputStream(fos);
iw.setOutput(outputStream);
iw.prepareWriteSequence(null);

Workbook wb = new Workbook();
wb.open(“template.xls”);
SheetRender sr = new SheetRender(wb.getWorksheets().getSheet(0), new ImageOptions());
int count = sr.getPageCount();
for(int i=0; i<count; i++)
{
iw.writeToSequence(new IIOImage(sr.toImage(i), null, null), null);
}
outputStream.flush();
outputStream.close();
fos.flush();
fos.close();



Hope, this helps.

Thank you.

Hello Shahzad,

I’ve sent you an email message with a pdf and my code snippet.

Thanks,
Sarah

Hi Adam,

Thanks for the reply and suggestions. However, we’ll have no control over the Word documents we convert. We’ll be obtaining them from a variety of sources.

Hi Sarah,

I had received the sample PDF file via email and reproduced the issue, while converting PDF to TIFF, at my end. This issue has been logged as PDFKITJAVA-20102 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

Thanks shahzid, I’ll be waiting for the fix.

Hi Sarah,

Thanks for this additional information.

There may be ways to change these settings in the document programmatically, depending upon how complex the layout is. If you want to, you can send me a sample document and I can provide some further feedback regarding this.

Thanks,

We are happy to tell you that a very cool and important feature (filed as 7180) is included in the new version of Aspose.Words. Text wrapping around images and shapes when rendering Microsoft Word documents to PDF, XPS and printing is now supported. You can download the latest version from here.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(40)

The issues you have found earlier (filed as WORDSJAVA-20) have been fixed in this .NET update and in this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(7)