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

Free Support Forum - aspose.com

How to split document page by page using VB.NET

Hi, Support:
Is there any method to split a document page by page based on VB.net?
I use the DocumentSplitter Class based on C to split document, but it fails.
Could you please rewrite the DocumentSplitter Class into Net Class for me to try?

Dim splitter As Aspose.Words.Examples.CSharp.Loading_Saving.DocumentPageSplitter = New Aspose.Words.Examples.CSharp.Loading_Saving.DocumentPageSplitter(doc)
‘’'However, the object of splitter is nothing, because in the Class PageNumberFinder, the Me.collector is nothing, so that it fails. Could you please debug this class and confirm it success for use.


Thanks!

@ducaisoft

We have attached the VB.NET code of PageSplitter with this post. Hope this helps you.
PageSplitter.zip (4.0 KB)

You can also get the C# code of PageSplitter utility from here:

Thanks for your response.
I have test this VB.net code you sent me before,but fail. I do not know why it doesn’t work because the splitter is always nothing after been initiated.
For this updated version, it works! Thanks very much!

@ducaisoft

Please let us know if you still face any issue while using Aspose.Words.

Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats or using PageSplitter utility. You need to install fonts that are used in your document on the machine where you are using this code.

If you still face problem, please ZIP and attach your input Word document and fonts used in your document here for testing.