We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

open an existing word.doc/docx with DocIO, add a header to first page only, convert to pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

113821 Oct 10,2013 08:01 PM UTC Oct 20,2017 07:10 AM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: DocIO
Jeff O''Connell
Asked On October 10, 2013 08:01 PM UTC

Does anybody on this forum know how to open an existing word.doc/docx with DocIO, add a header section (with Picture) to the first page only.

 

I can add the header but it is only doing it on a new page

 

Any assistance is greatly appreciated.
Jeff


Sathish K [Syncfusion]
Replied On October 11, 2013 12:44 PM UTC

Hi Jeff,

 

Thank you for your interest in Syncfusion products.

 

As per your request, we have prepared a sample which illustrates how to open an existing word document and insert header content in the first page of that document. Please find the attached sample and let us know if this meets your requirement.

 

Please refer the following link to get more information about Headers and Footers.

http://help.syncfusion.com/ug/wpf/docio/default.htm#!documents/headersandfooters.htm

 

Please let us know if you need further assistance.

 

Regards,

Sathish



GenerateWord_Windows_325f287e.zip

Luba Pyat
Replied On January 11, 2017 04:30 PM UTC

Hi. I have the same task: adding the header (image) to an existing document. Can you please help? I cannot open the zip file you added. Thanks!

Vijay Ramachandran [Syncfusion]
Replied On January 12, 2017 07:38 AM UTC

Hi Luba,

Thank you for contacting Syncfusion support.

We have resolved the link corruption issue, now you can download the attachment. Also refer the below UG documentation to know more about header footers:
https://help.syncfusion.com/file-formats/docio/working-with-sections#working-with-headers-and-footers

Online demo link:
http://asp.syncfusion.com/demos/web/docio/headerandfooter.aspx

Let us know if you have any concern.

Regards,
Vijay R
 


Julian
Replied On October 20, 2017 01:17 AM UTC

Hi, is there any way that can add footer to the last page only?


Sethumanikkam Yogendran [Syncfusion]
Replied On October 20, 2017 07:10 AM UTC

Hi Julian,

Thank you for contacting Syncfusion support.

The Word document is a flow document in which contents will not be preserved page by page; instead the contents will be preserved sequentially section by section. Each section may extend to various pages based on its contents like table, text, images etc.

Word viewer/editor renders the contents of the Word document page by page dynamically when opened for viewing or editing and this page wise rendered information will not be preserved in the document level as per the Microsoft Word file format specification. Whereas Essential DocIO is a non-UI component that provides a full-fledged document object model to manipulate the Word document contents.

Please refer the below KB article which explains the same:
http://www.syncfusion.com/kb/3989/why-it-is-not-possible-to-access-the-word-document-contents-page-by-page

Hence it is not directly possible to access the Word document contents page by page, the same holds in Essential DocIO. As a workaround, you can split the contents of each page as separate section in the Word document and access the contents by sections instead of pages.

If you want to have unique headers/footers on each and every page then you shall insert separate sections for each and every pages and insert your headers/footers content in the corresponding sections. We have prepared a sample to illustrate the same. Please find it from below link, and let us know if this helps you.

Sample link:
http://www.syncfusion.com/downloads/support/forum/113821/ze/GenerateWord_F113821-2092759102.zip
Note: Please find the documents from input and output folder inside the application.

Kindly refer the below UG documentation and online sample links to know more about Header and Footers with Essential DocIO.
UG link:
https://help.syncfusion.com/file-formats/docio/working-with-sections#working-with-headers-and-footers

Online sample link:
http://asp.syncfusion.com/demos/web/docio/headerandfooter.aspx

If we misunderstood any of your requirement, then kindly provide us sample or modified sample of above along with input used at your end and screenshot/output Word document of the expected result which will helpful to provide you the appropriate solution at the earliest.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;