We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PageFinder & PageSplitter with Aspose Words 13.4.0.0

Hi,

I’m working with Aspose Word 9.8 since last 2 years and we decide to migrate to the version 13.4.

``

You provided me a class (PageFinder.cs) to create a new section for each page (see attachment).

With the new version, it does not work. For an other of our application, we use the Aspose Word 11.9.0.0. You provided me 2 classes (PageFinder et PageSplitter), but it does not work with 13.4 (see second attachment).

The problem is for a document with 2 pages, when I write :

PageNumberFinder finder = new PageNumberFinder(doc);
finder.SplitNodesAcrossPages(true);

… the document has only 1 section (doc.Sections.Count = 1)

Do you have a new version of these classes??

Thank you and have a nice day

Steeve

Hi Steeve,

Thanks for your inquiry. First of all, we always encourage our customers to use the latest release versions of Aspose.Words as they contain newly introduced features, enhancements and fixes for issues reported earlier. Secondly, please attach the document you’re getting this problem with here for testing. I will investigate the issue on my side and provide you more information.

Best regards,

Hi,

That’s why I want to migrate to the latest version! I never met a bug or a change request from our client, so I waited this to take the time to use your latest version…

I let you 2 attachments:

  • The document in our production environment
  • The document in our development environment

The majors differences with the development document:

  • Use your latest version (13.4)
  • The text is now html instead of plain text(builder.InsertHtml instead of builder.Write)

I hope this will help you!

Thank you and have a nice day!

Steeve

Hi Steeve,

Thanks for your inquiry.

*Steeve:
With the new version, it does not work. For an other of our application, we use the Aspose Word 11.9.0.0. You provided me 2 classes (PageFinder et PageSplitter), but it does not work with 13.4 (see second attachment).

The problem is for a document with 2 pages, when I write :

PageNumberFinder finder = new PageNumberFinder(doc);
finder.SplitNodesAcrossPages(true);

… the document has only 1 section (doc.Sections.Count = 1)*

Please try run the following code snippet; you will notice that the resultant document contains two Sections:

Document doc = new Document(@"C:\Temp\Old+version+in+Production+(version+9.8).docx");
// Set up the document which pages will be copied to. Remove the empty section.
Document dstDoc = new Document();
dstDoc.RemoveAllChildren();
PageNumberFinder finder = new PageNumberFinder(doc);
// Split nodes which are found across pages.
finder.SplitNodesAcrossPages(true);
// Copy all content including headers and footers from the specified pages into the destination document.
ArrayList pageSections = finder.RetrieveAllNodesOnPages(1, 2, NodeType.Section);
foreach(Section section in pageSections)
dstDoc.AppendChild(dstDoc.ImportNode(section, true));
dstDoc.Save(@"C:\Temp\out.docx");

I hope, this helps.

*Steeve:
The majors differences with the development document:

  • Use your latest version (13.4)
  • The text is now html instead of plain text (builder.InsertHtml instead of builder.Write)*

I am afraid, I couldn’t understand your query. Please create a simple application (for example a Console Application Project) that helps me reproduce the same problem on my side and attach it here for testing. I will investigate the issue further and provide you more information… Thanks for your cooperation.

Best regards,

Hi,

I let you in attachments 2 prototypes of what the application suppose to do.
- With the version Aspose Words 9.8
- With the version Aspose Words 13.4

The first page has 2 columns and the second page of the document generated has 1 column (good with version 9.8). But, with the version 13.4, all the document is in 1 column.

Let me know if you need more explanation…

Thank you!!

Steeve

Hi Steeve,

Thanks for the additional information. I am checking with this scenario and will get back to you soon.

Best regards,

Hi Steeve,

Thank you for being patient. I tested your scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-8370. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hi,

Thank you for your quick answer.

I know that it is difficult to estimate the time of solving the problem, but can I have an average resolution time (days / weeks / months)?

I ask you the question, because I have to notify my client about this problem.

Thank you and have a nice day!

Steeve

Hi Steeve,

Thanks for your inquiry. This issue is pending for analysis and is in the queue. Unfortunately, at the moment I cannot provide you any reliable estimate regarding it’s resolution. Rest assured, I will inform you via this thread as soon as your issue is resolved. We apologize for any inconvenience.

Best regards,

Hi Steve,

Thanks for waiting.

I have taken a look at your issue and can see you are using the old work around code to split the first and second pages into different sections. Please try using the newer code which takes advantage of the new layout engine to find the nodes to split. I have tested this code out and the output seems to be better now.

I have attached the updated project to this post. Please let me know if I can help with anything else.

Thanks,

Hi Adam,

Sorry the delay, it was my summer holidays!

I will check your project, but I think that we will keep the old version until next change request from our client (lack of time).

Thank you!

Steeve

Hi Steve,

Thanks for your feedback. No worries at all, when you do make use of it please let me know how it goes.

Cheers,
Adam

The issues you have found earlier (filed as WORDSNET-8370) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.