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.

Wed May 06, 2015 4:04 pm

Hi,

here's a small code which crash during SaveToFile (); The goal is to replace current watermark.

Exception : NullReferenceException
.NET : 4.5.2
Spire.Doc : 5.4.10.53040

Code: Select all
static void Main(string[] args)
        {
            string strTemplate = Path.GetFullPath(@".\Templates\Courrier (default).docx");
            string strDocument = Path.GetFullPath(@"Courrier.docx");

            using (Document document = new Document(strTemplate))
            {
                if (document.Watermark.Type == WatermarkType.PictureWatermark)
                {
                    PictureWatermark pw = new PictureWatermark ();
                    Console.WriteLine("Picture Watermark");
                    pw.Picture = System.Drawing.Image.FromFile(@"D:\Cloud\Qsync\Dev\DotNET\e-IceBlue\WordExport\logo_610x610.gif");
                    document.Watermark = pw;
                }

                document.SaveToFile(strDocument, FileFormat.Docx);
}

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Thu May 07, 2015 3:10 am

Hello,

Thanks for your inquiry.
Sorry that I have failed to reproduce your issue with the Spire.Doc( 5.4.10.53040), Could you please provide the sample document for our testing?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Thu May 07, 2015 7:56 am

here it is.

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Thu May 07, 2015 8:45 am

Hello,

Thanks for sharing.
I have reproduced your issue, and posted it to our dev team. We will inform you when it is fixed.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Fri May 29, 2015 9:08 am

Hello,

Sorry for keep you waiting.
Now the issue has been resolved, and the newest hotfix of Spire.Doc has been released.Please download the Spire.Doc Pack(hot fix) Version:5.4.25 from the following link and have a try:
http://www.e-iceblue.com/Download/downl ... t-now.html

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Jun 01, 2015 9:47 am

Hello,

Have you tried the up-to-date hot fix ? Has your issue been resolved ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Jun 01, 2015 2:59 pm

Hi,

I've tried today. it works :)

Thanks,

Vincent

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Tue Jun 02, 2015 1:01 am

Hello,

Please feel free to contact us if you have any questions or needs.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.Doc

cron