Save document as bmp takes long time

Hi.

I want to save meny documents as picture.
save as bmp takes a long time for each document and so progress is very slowly.
can I save documents to picture faster?!

Hi there,

Thanks for your inquiry. It is quite difficult to answer such questions because CPU performance and memory usage all depend on complexity and size of the documents you are loading/generating.

Please note that usually Aspose.Words needs few times more memory than document size to build model of the document (DOM) in memory. Usually, Aspose.Words needs 10 times more memory than the original document size to build a DOM in the memory.

Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

thank you for your reply!

but my purpose was something else…

assume that you have a document that has very multiple pages and multiple paragraphs in those pages.
I want to split each paragraph to an image…

Hi there,

Thanks for your inquiry. There is no direct way to export each Paragraph of MS Word document to image. However, you can convert all the Paragraphs i.e. found in Word document to individual images by using the following code snippet.

Document doc = new Document(MyDir + "in.docx");
List < Image > images = new List < Image > ();
NodeCollection paras = doc.GetChildNodes(NodeType.Paragraph, true);
foreach(Paragraph para in paras)
{
    images.Add(RenderNode(para, new ImageSaveOptions(SaveFormat.Bmp)));
}

Also, RenderNode method is attached with this post.

Hope this helps you. Please let us know if you have any more queries.

thank you very much tahir.

but this code’s output is a black page!!!

Hi there,

Thanks for your inquiry. Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.