Save in Xps Format

Last post 09-10-2010, 8:58 AM by aspose.notifier. 5 replies.
Sort Posts: Previous Next
  •  07-28-2010, 10:08 AM 250905

    Save in Xps Format .NET

    Why an html that is opened in Aspose.words take so long to save as Xps file.

    I am missing a configuration or something.


     
  •  07-28-2010, 10:44 AM 250914 in reply to 250905

    Re: Save in Xps Format

    Hi

     

    Thanks for your inquiry. It takes longer than converting to Word formats because converting to XPS requires rendering document, i.e. Aspose.Words should layout document into pages.

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  07-29-2010, 1:25 PM 251152 in reply to 250914

    Re: Save in Xps Format .NET


    But a simple html file with only text it's taking more than 30 minutes to convert.
     
  •  07-29-2010, 1:29 PM 251153 in reply to 251152

    Re: Save in Xps Format

    Hi

     

    Thank you for additional information. Could you please attach the HTML document you are getting problem with? I will check it on my side and provide you more information.

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  07-30-2010, 6:51 AM 251298 in reply to 251153

    Re: Save in Xps Format

    Hi

     

    Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

    It seems the reason of the problem is lot of <BR> tags inside the document. So you can try using the following workaround:

     

    DateTime p0 = DateTime.Now;

    string html = File.ReadAllText(@"Test006\longtxt_CONVERTED.html");

    html = html.Replace("<br>", "<p>");

    MemoryStream strm = new MemoryStream(Encoding.UTF8.GetBytes(html));

    DateTime p1 = DateTime.Now;

    Console.WriteLine("Replacing: {0} sec", (p1 - p0).TotalSeconds);

     

    Document doc = new Document(strm);

    DateTime p2 = DateTime.Now;

    Console.WriteLine("Loading: {0} sec", (p2 - p1).TotalSeconds);

     

    doc.UpdatePageLayout();

    DateTime p3 = DateTime.Now;

    Console.WriteLine("Layout: {0} sec", (p3 - p2).TotalSeconds);

     

    doc.Save(@"Test006\out.xps");

    DateTime p4 = DateTime.Now;

    Console.WriteLine("Saving: {0} sec", (p4 - p3).TotalSeconds);

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  09-10-2010, 8:58 AM 258073 in reply to 250905

    Re: Save in Xps Format

    The issues you have found earlier (filed as 18910) have been fixed in this update.


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
     
View as RSS news feed in XML