Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Mar 31, 2016 1:13 pm

code TextSelection[] text = doc.FindAllString("\f", false, true);
returns null

hanter123@rambler.ru
 
Posts: 10
Joined: Fri Dec 18, 2015 5:12 am

Fri Apr 01, 2016 6:01 am

Hello,

Thanks for your posting.
Sorry that our Spire.Doc at present doesn't support to get "\f". Could you please tell us what's your final requirement? So that we provide you solution to help you implement it.
Thank you.

Sincerely,
Caroline
E-iceblue support team
User avatar

caroline.zhang
 
Posts: 291
Joined: Mon Mar 07, 2016 9:22 am

Mon Apr 04, 2016 8:02 am

Hello, Caroline!

Thanks for your posting.

There is a file composed of n pages.
The file is divided into pages using a standard code to a Word - formfeed (\f).
It should be cut from the input file page, write it to the output file.
There should be obtained n files.

hanter123@rambler.ru
 
Posts: 10
Joined: Fri Dec 18, 2015 5:12 am

Mon Apr 04, 2016 10:05 am

Hi,

Thanks for your reply.
Do you want to split original file to multiple files by pages?
If so, you can do the splitting by PageBreak object to create new Word file.
Code: Select all
   foreach (Section section in document.Sections)
            {
                foreach (Paragraph p in section.Paragraphs)
                {
                    foreach (DocumentObject obj in p.ChildObjects)
                    {
                        if (obj.DocumentObjectType == DocumentObjectType.Break)
                        {
                            Break objType = obj as Break;
                            if (objType.BreakType == BreakType.PageBreak)
                            {
                                 Document newDoc=new Document();                                       
                                  //......
                            }
                        }
                    }
                }
            }


Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue Apr 05, 2016 8:41 am

Hello,

Has your issue been resolved?
Thanks for your feedback in advance.

Sincerely,
Caroline
E-iceblue support team
User avatar

caroline.zhang
 
Posts: 291
Joined: Mon Mar 07, 2016 9:22 am

Thu Apr 07, 2016 7:28 am

Hi,

Thanks for your reply.

hanter123@rambler.ru
 
Posts: 10
Joined: Fri Dec 18, 2015 5:12 am

Return to Spire.Doc