Convert all word pages to single jpeg file

Hi,

I am new to Aspose. I have a requirement to convert doc file to jpeg file. Is it possible to convert all pages to single jpeg file?

Thanks in Advance,

Ramesh

Hi Ramesh,

Thanks for your inquiry.

In order to save all pages in MS Word document to separate JPEG image files, please see the following code snippet that worked for me:

Document document = new Document(@“C:\test\In.docx”);
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Jpeg);
options.PageCount = 1;
// Save each page of the document as Jpeg.
for (int i = 0; i < document.PageCount; i++)
{
    options.PageIndex = i;
    document.Save(string.Format(@"C:\test\out_{0}.jpg", i), options);
}

I hope, this will help

Ramesh:

Is it possible to convert all pages to single jpeg file?

Suppose you have 100 pages in your Word document and you want to render all those pages to a single JPEG; could you please provide more details about how you would like to layout all pages in a single JPEG?

Best Regards,

I have 5 pages of word document and I wish to convert them into one jpeg file side by side.

@ramsiva You can achieve this using Document.RenderToScale or Document.RenderToSize methods. Please see the code examples provided in our documentation.