Hi everyone!
Hi Rui,
Hi Nayyer,
Thanks for recommendation of GroupDocs. Actually we have used that before ans it is really a good and handy product that includes everything necessary for a viewer. However, as we want to have more customization, we try to build our own version. Thanks!
Hi Rui,
Hi Rui,
Hi Nayyer,
Hi Gary,
Thanks for sharing the feedback. As per my understanding, you need to split the resultant HTML into pages rather than displaying the output as single HTML file. If so is the case, then I am pleased to share that Aspose.Pdf for .NET supports this feature. For more information, please visit PDF to HTML - Split CSS to pages and try using following code snippet.
[C#]
Document doc = new
Document(TestSettings.GetInputFile(“35597.pdf”));
HtmlSaveOptions newOptions = new HtmlSaveOptions();
newOptions.SplitIntoPages = true;
doc.Save(TestSettings.GetOutputFile(“35597.html”), newOptions);
In case I have not properly understood your requirement, please share some further details.
Hi Nayyer,
I am sorry that I didn’t clarify my question. I was hope if there is a function that can save splited html pages into stream like what I did in saving resources file of a page by configuring the saveoption like that :
public class ResourceFile
{
public string FileName { get; set; }
public MemoryStream FileContent { get; set; }
public ResourceFile(string FileName, MemoryStream FileContent)
{
this.FileName = FileName;
this.FileContent = FileContent;
}
}
private List ResourceFileList { get; set; }
private string CustomResourcesProcessing(SaveOptions.ResourceSavingInfo resourceSavingInfo)
{
MemoryStream newResource = new MemoryStream();
resourceSavingInfo.ContentStream.CopyTo(newResource);
ResourceFile file = new ResourceFile(resourceSavingInfo.SupposedFileName,newResource);
ResourceFileList.Add(file);
string urlThatWillBeUsedInHtml = RequestURL + “/” + Path.GetFileName(resourceSavingInfo.SupposedFileName);
return urlThatWillBeUsedInHtml;
}
Thus I got a list of resources whose content are saved in MemoryStream so that I can store them in our library. We don’t want save any temporary files in our disk so we store the components of the HTML converting result in BOLB format. Currently We got that exception “Inconsistent saving options detected : ‘SplitIntoPages’ may not be ‘true’ when requested saving to stream!”. I was wondering if we can save split pages to stream. Thanks!
Hi Gary,
Hi Nayyer,
Yes! That’s the feature I am looking for! Thank you so much for you support!
Hi Gary,
The issues you have found earlier (filed as PDFNEWNET-37135;PDFNEWNET-37135) have been fixed in Aspose.Pdf for .NET 9.5.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Gary,