Addtional page genrated while converting RTF/DOC to TIFF

HI,

we are using a licensed version of aspose.words. we came across a scenario where my company needs aspose technical support help.
Scenario:
we have a .doc/.rtf 1 page document, in this document we have a table with 3 columns and 3 rows and when we convert .doc/.rtf to tiff using below

Dim newdoc As New Aspose.Words.Document(DocFileName)
newdoc.Save(tmpName, Aspose.Words.SaveFormat.Tiff)

output results into two pages instead of 1. what we think is when we convert using Aspose.Words.SaveFormat.Tiff width of table structure in the document increses and creates one more blank page ( with header and footer ).

Please let us know if this issue has been already fixed in later version Aspose.Words.dll or is it there in bug list or can we handle this in different ways

Note: we are using 10.6 version of Aspose.Words.dll

Please let us know
Thanks,
Jag

Hi Jagadeesh,

Thanks for your inquiry. Could you please attach your input documents (.doc/.rtf files) here for testing? I will investigate the issue on my side and provide you more information.

Best Regards,

Hi Hafeez,

Thanks for your reply.
I am attaching two documents.
INPUT Document : FaxDocument.rtf
OUTPUT Document : Outputfax.tif

In output document there are two pages, please ignore the first page.
If you look at second page of outputfax.tif and compare with input document (FaxDocument.rtf), table height and increased. i think due to this issue one more blank page will created when some paragraph added below table

please help us out
Thanks,
Jag

Hi,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 10.7.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for inconvenience.

Moreover, please try using the following code snippet as a temporary work around:

Document doc = new Document(@"C:\test\FaxDocument.rtf");

NodeCollection paras = doc.FirstSection.Body.Tables[0].GetChildNodes(NodeType.Paragraph, true);
foreach(Paragraph para in paras)
{
    para.ParagraphFormat.LeftIndent = 0;
}

doc.Save(@"C:\test\FaxDocument_out.tiff");

I hope, this will help.

Best Regards,

Hi Awais,

Thank you very much for your response. i will use this work around for now but Please notify me when this issue is fixed

Thanks
Jag

Hello
Thanks for your request. Of course you will be notified as soon as it is fixed.
Best regards,

Hi Aspose Team,

I came across one more scenario for .doc document where i have a logo on left top corner and table structure below Logo.

When i convert this document into .tif format using below then in my output tif document, image moves down and covers table. i have attached both input and output samples. please take a look and help me out.

Dim newdoc As New Aspose.Words.Document(DocFileName)
newdoc.Save(tmpName, Aspose.Words.SaveFormat.Tiff)

Thanks,
Jagadeesh
Wish you advance happy new year

Hi Jagadeesh,

Thanks for your inquiry. While using the latest version of Aspose.Words i.e. 10.7.0, I was unable to reproduce this issue on my side. Moreover, I would suggest you please visit the following link for downloading and using the latest version of Aspose.Words:
https://releases.aspose.com/words/net

Also, I have attached the TIFF file i.e. generated on my side here for your reference.

If we can help you with anything else, please feel free to ask.

Best Regards,

Hi

Thank you so much. latest version works great. i have one more question which i came accross today.
when i convert TIF into TIF using below code then my output becomes little blur. i am working on getting a sample.

' Select active frame.
image.SelectActiveFrame(FrameDimension.Page, frameIdx)
' We want the size of the page to be the same as the size of the image.
' Convert pixels to points to size the page to the actual image size.
ps.PageWidth = Aspose.Words.ConvertUtil.PixelToPoint(image.Width, image.HorizontalResolution)
ps.PageHeight = Aspose.Words.ConvertUtil.PixelToPoint(image.Height, image.VerticalResolution)
' Insert the image into the document and position it at the top left corner of the page.
builder.InsertImage(image, Aspose.Words.Drawing.RelativeHorizontalPosition.Page, 0, Aspose.Words.Drawing.RelativeVerticalPosition.Page, 0, ps.PageWidth, ps.PageHeight, Aspose.Words.Drawing.WrapType.None)

when i compare the HorizontalResolution and VerticalResolution between input tif file and output tif file then there is a difference.
Input TIF File 300 HorizontalResolution ,300 VerticalResolution
OutPUT File 96 DPI for both. please let me know how can set above and even width and height on VB.net

Please help me out

Thanks for your support
Jagadeesh Gowda

Hi Jagadeesh,

Thanks for your request. I suppose you’re trying to convert RTF/DOC file to TIFF format. Could you please attach your input RTF/DOC and the output TIFF files here for testing? I will investigate the issue on my side and provide you more information. Also, please clarify the phrase “when i convert TIF into TIF using below code then my output becomes little blur”.

Best Regards,

Hi,

I am merging all input documents such as RTF,DOC,TIF into one TIF at the end.

each document is converted into TIF and merging all TIF like images.

can you please let me know how to set resolution in vb.net

Thanks,

Jagadeesh

Hi Jagadeesh,
Thanks for your Inquiry. You can specify resolution using ImageSaveOptions. Please follow the link for more information:
https://reference.aspose.com/words/net/aspose.words.saving/imagesaveoptions/
Please see the code below:

Dim doc As New Document(MyDir & "Rendering.doc")
Dim options As New ImageSaveOptions(SaveFormat.Png)
options.Resolution = 300
options.PageCount = 1
doc.Save(MyDir & "Rendering.SaveToImageResolution Out.png", options)

Hope this helps.

Thanks.

can you please tell me whats wrong in below code for utilizing the image.HorizontalResolution & image.VerticalResolution. i need to set resolution based on what image is having image.

a. please tell me whats wrong in below code to set resolution
b. always image converts to 96 DPI for both H & V resolution even if my original image has 300 DPI.
c. I do not want to use imageoption because i have to use TiffCompression to make sure image looks good. If i use TiffCompression.Ccitt3 then some of other documents looks little blur ( I think default is TiffCompression.Lzw )

Using image As Image = image.FromFile(inputFileName)
    ' Get the number of frames in the image.
    Dim framesCount As Integer = image.GetFrameCount(FrameDimension.Page)
    ' Loop through all frames.
    For frameIdx As Integer = 0 To framesCount - 1
        ' Insert a section break before each new page, in case of a multi-frame TIFF.
        If Me.framecount > 0 Then
            builder.InsertBreak(Aspose.Words.BreakType.SectionBreakNewPage)
        End If
        ' Select active frame.
        image.SelectActiveFrame(FrameDimension.Page, frameIdx)
        ' We want the size of the page to be the same as the size of the image.
        ' Convert pixels to points to size the page to the actual image size.
        ps.PageWidth = Aspose.Words.ConvertUtil.PixelToPoint(image.Width, image.HorizontalResolution)
        ps.PageHeight = Aspose.Words.ConvertUtil.PixelToPoint(image.Height, image.VerticalResolution)
        ' Insert the image into the document and position it at the top left corner of the page.

        builder.InsertImage(image,
            Aspose.Words.Drawing.RelativeHorizontalPosition.Page, 0,
            Aspose.Words.Drawing.RelativeVerticalPosition.Page, 0, ps.PageWidth,
            ps.PageHeight, Aspose.Words.Drawing.WrapType.None)

Please help me out
Thanks,
Jag

Hi Jag,

Thanks for your inquiry.

I’m afraid it’s not quite clear what the problem is. Could you attach your input image here which demonstrates the issue?

Thanks,

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

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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan