Hi,
Just a quick question regarding images in headers or footers. Not using a template but generating a document on the fly is there a way to have an image in the header or the footer?
If so could you please attach the corresponding code in you reply.
thanks a lot!
Jonathan
DK
Dhivya K
Syncfusion Team
December 8, 2006 04:09 AM UTC
Hi Jonathan,
Yes.We do have option for drawing images in the header/footer as follows:
C#:
// Add the paragraph to the header section.
section.HeadersFooters.Header.Paragraphs.Add ( headerPar );
// Inserting logo image to the table first cell.
headerPar.AppendPicture( Image.FromFile( @"..\..\..\..\..\Data\syncfusion_logo.gif" ));
You can find the sample at the following url:
C:\Program Files\Syncfusion\Essential Studio\4.4.0.51\Windows\DocIO.Windows\Samples\Header And Footer\HeaderAndFooter\
Could you please take a look into it and let me know if you have any queries.
Regards,
Dhivya.
TS
Teddy Smith
December 8, 2006 08:46 AM UTC
Hi,
thanks for the answer.
Unfortunately I can't get it to work. I am using asp.net and Word Professional Edition 2003.
I can apend text to the header without problem but not images. No error is generated, the image just doesn't show (tried with .bmp, .gif and .png).
Any ideas?
Thank you,
Jonathan
TS
Teddy Smith
December 8, 2006 10:17 AM UTC
Just checked this page :
http://www2.syncfusion.com/syncfusion/infrastructure/samplebrowserasp/samples.aspx?version=2_0&browseTo=DocIO.Web
and the image shows up. Copied the code did it on my computer, wouldn't show. Only difference is framework version...
Still not working for me then...
Let me know if you have a solution!
Thanks a lot!
Jonathan
DK
Dhivya K
Syncfusion Team
December 8, 2006 12:42 PM UTC
Hi Jonathan,
I am afraid. I am unable to reproduce the issue. Will it be possible to send me the image that you tried to render in header? This will help me investigating further on this issue.
Regards,
Dhivya.
TS
Teddy Smith
December 8, 2006 12:51 PM UTC
this is the image I tested with.
Thanks!!
Jonathan
test62.zip
DK
Dhivya K
Syncfusion Team
December 11, 2006 05:37 AM UTC
Hi Jonathan
Thanks for the file. I tested this image with 4.4.0.51 and seem to be working fine. Here is a sample word document generated with your image.
Sample.doc
Could you please let me know your Essential studio version you are currently using? This will help me investigating further on this issue.
Regards,
Dhivya.
TS
Teddy Smith
December 12, 2006 10:33 AM UTC
Hi,
Well this is really strange!
I'm using the demo version of Essential Studio 4.3.0.30
Attached are the 4 files I included in the bin directory of the project. Maybe I'm using the wrong versions?
Thanks a lot for your help!
Jonathan
bin.zip
DK
Dhivya K
Syncfusion Team
December 12, 2006 03:10 PM UTC
Hi Jonathan,
Yes. You are right. There were some issues with some images in 4.3.0.30. These are now fixed. Could you please install our latest version[4.4.0.51] and test this issue? Please let me know if you have any other queries.
Regards,
Dhivya.
TS
Teddy Smith
December 13, 2006 03:00 PM UTC
Ok thank you I'm in the process of downloading the latest version, I'll keep you posted.
TS
Teddy Smith
December 13, 2006 04:11 PM UTC
works great
cheers :o)
DK
Dhivya K
Syncfusion Team
December 14, 2006 04:17 AM UTC
Hi Jonathan,
Thanks for your instant updates. Glad to know it works fine. Please let me know if you have any queries.
Regards,
Dhivya.
PC
paras charpe
replied to Dhivya K
February 23, 2018 11:11 AM UTC
Hi Jonathan,
Yes.We do have option for drawing images in the header/footer as follows:
C#:
// Add the paragraph to the header section.
section.HeadersFooters.Header.Paragraphs.Add ( headerPar );
// Inserting logo image to the table first cell.
headerPar.AppendPicture( Image.FromFile( @"..\..\..\..\..\Data\syncfusion_logo.gif" ));
You can find the sample at the following url:
C:\Program Files\Syncfusion\Essential Studio\4.4.0.51\Windows\DocIO.Windows\Samples\Header And Footer\HeaderAndFooter\
Could you please take a look into it and let me know if you have any queries.
Regards,
Dhivya.
Thanks for support...!!!