This is a migrated thread and some comments may be shown as answers.

Page numbering when save as docx

4 Answers 36 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 22 Jun 2018, 08:23 AM

Hi,

When a RadDocument is exported to docx file, page numbering doesn't work correctly. The total count and current page number is 1 on every page. When the same document is exported in pdf the numbering is fine... I'm using the code from you sample projects - CustomField class from CustomField_WPF used in TelerikEditorDemo_WPF project.

4 Answers, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 27 Jun 2018, 07:30 AM
Hi George,

Word is not showing correctly the page numbering because it does recognize the field. You should use one of the fields that Word is aware of. You can find more information about them here.

Regards,
Peshito
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
George
Top achievements
Rank 1
answered on 31 Jul 2018, 10:43 AM

Hi,

Sorry for the late reply.

Can you please give an example of using field for page numbering that Word recognizes and also works for PDF?

0
George
Top achievements
Rank 1
answered on 01 Aug 2018, 02:22 PM

Hi,

I used "PAGE" field and it works in Word.

Thanks.

0
Tanya
Telerik team
answered on 03 Aug 2018, 06:00 AM
Hi George,

Yes, the PAGE field is recognized in MS Word. To elaborate more on the case, the custom field defined in the example you have found is not defined in the fields that MS Word recognizes and can be used only in RadRichTextBox. If you would like to show the current page number, you can use the PAGE field and NUMPAGES will show you the total number of pages in the document.

Hope this is helpful.

Regards,
Tanya
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
RichTextBox
Asked by
George
Top achievements
Rank 1
Answers by
Peshito
Telerik team
George
Top achievements
Rank 1
Tanya
Telerik team
Share this question
or