Hi There
Hi Adam,
Thank you for your interest in Aspose.Words.
1. Yes, we will consider supporting this format in the future. But unfortunately, we cannot provide you any reliable estimate at the moment.
2. Could you please clarify what you need to achieve? Would you like to add a cover page to EPUB file or just generate a Word document where the first page will be an image and other pages will contain text?
Best regards,
Hi Alexey
Hi Adam,
Thank you for additional information. Sure you can combine documents on the fly. For example see the following code that combines image (cover page) with MS Word document and saves the output as PDF:
[Test]
public void Test001()
{
// Open image as Document.
Document coverPage = ImageToDocument(@"Test001\coverPage.jpg");
// Open word document.
Document srcDoc = new Document(@"Test001\in.doc");
// Combine documents.
coverPage.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
// Save output as PDF.
coverPage.Save(@"Test001\out.pdf");
}
///
/// Loads an image to a Document.
///
public static Document ImageToDocument(string inputFileName)
{
// Create Aspose.Words.Document and DocumentBuilder.
// The builder makes it simple to add content to the document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Read the image from file, ensure it is disposed.
using (Image image = Image.FromFile(inputFileName))
{
// Get the number of frames in the image.
int framesCount = image.GetFrameCount(FrameDimension.Page);
// Loop through all frames.
for (int frameIdx = 0; frameIdx < framesCount; frameIdx++)
{
// Insert a section break before each new page, in case of a multi-frame TIFF.
if (frameIdx != 0)
builder.InsertBreak(BreakType.SectionBreakNewPage);
// 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.
PageSetup ps = builder.PageSetup;
ps.PageWidth = ConvertUtil.PixelToPoint(image.Width, image.HorizontalResolution);
ps.PageHeight = 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,
RelativeHorizontalPosition.Page,
0,
RelativeVerticalPosition.Page,
0,
ps.PageWidth,
ps.PageHeight,
WrapType.None);
}
}
return doc;
}
Hope this helps.
Best regards,
Hi Alexey
Hi
Thanks for your request. You can use the same code for EPUB too:
// Open image as Document.
Document coverPage = ImageToDocument(@"Test001\coverPage.jpg");
// Open word document.
Document srcDoc = new Document(@"Test001\in.doc");
// Combine documents.
coverPage.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
// Save output as EPUB.
coverPage.Save(@"Test001\out.epub");
Size of A4 page is 595.35 X 841.9 pt, so size of the image should be the same. If size of the image is different, you can always resize it.
Best regards,
Hi Alexey
Yep, we’ve done that - it works but doesn’t look as we’d prefer. When do you plan to make the book cover for ePUB as metadata of the document, so it will display on common eReaders?
Thanks
Adam
Hi Adam,
Thanks for your request. We plan to add this feature in 10.0.1 version of Aspose.Words. It is planned to be released in 2-3 months. We will notify you once this feature is available.
Best regards,
Great stuff, Alexey. We’ll probably be making a purchase prior to then, but it’s great to know a fix is in the pipeline.
Hi Adam,
Thank you for your kind words. We will keep you informed regarding status of these issues and immediately let you know once they are resolved.
Best regards,
Hi you said cover and mobi support would be added to 10.0.1.
Your latest version is 10.3.0 but I do not see these options.
Have they not been added yet?
If not any idea when they will be added?
Brian
Hi Brian,
Thanks for your request. Please note, all estimates we provide in the forum are rough estimates and you cannot 100% rely on them.
An ability to create a cover pages is scheduled to be added in the next release. The responsible developer are currently working on this feature.
Regarding Mobi, currently the issue is not scheduled. So I cannot provide you any estimate regarding this issue.
Best regards,
I was wondering how Aspose is progressing with any of these features. Its been a while since it was suggested they might be coming soon?
Hope business is good.
Regards
Adam
Hi Adam,
Thanks for your request. The inserting cover page into ePub documents is scheduled to be implemented before the next release of Aspose.Words.
Unfortunately, there is no news about mobi.
Best regards,
Hello,
Just wondered if it is still likely for the book cover image to be added for the September release?
Regards
Adam
Hi
Thanks for your request. Yes, this feature is still scheduled to be implemented before the end of September. But since it is not implemented yet, I cannot 100% promise you that we will have time to include it into the next version.
Best regards,
Did this feature make the cut for the September release?
Regards
Adam
Hi Adam,
Thanks for your request. no unfortunately, this feature was not included into the recently released version of Aspose.Words.
Best regards,
Hi Alexey
Adam
Hi Adam,