I’m currently evaluating the Aspose .Net APIs for one of my projects.
Therefor I have a question. I’m searching for a possibility to convert a MS Office Document directly to a Bitmap arry in the PNG format.
But I have only found the possibilty to save ist as png. Is there any possibilty to convert and diectly wirte it in an Bitmap without saving it to the harddrive?
Thanks for your inquiry. You can convert your document to Image streams using Aspose.Words and store them in ArrayList for example. Please see the following code to generate images per each page in your Word document:
Document doc = new Document(MyDir + @"in.doc");
ArrayList bmps = new ArrayList();
MemoryStream stream;
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Bmp);
options.PageCount = 1;
// Save each page of the document as Jpeg.
for (int i = 0; i < doc.PageCount; i++)
{
stream = new MemoryStream();
options.PageIndex = i;
doc.Save(stream, options);
bmps.Add(stream);
}
I hope, this helps.
Best regards,
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.