Word .DOCM to .PDF

Technical support for Spire.Doc

Moderator: iceblue support

Word .DOCM to .PDF

Postby gregchak » Wed Apr 03, 2013 4:57 pm

I am currently evaluating your Spire Doc for .NET. The code to implement seems simple enough, but I keep getting object reference errors. I am running on the latest hot fix/patch release 4.7.12. The Word .DOCM document has form fields in it.

My code is:

// LOAD WORD DOCUMENT
Spire.Doc.Document doc = new Spire.Doc.Document();
doc.LoadFromFile(path1);

// CONVERT FROM WORD TO PDF
doc.SaveToFile(path2, FileFormat.PDF);

When doc.SaveToFile() is called I get an object reference error:

Object reference not set to an instance of an object.
at Spire.Doc.Fields.DocPicture.CreateLayoutInfo()
at Spire.Doc.DocumentBase.Spire.Doc.Layout.IDocumentBase.get_LayoutInfo()
at ᣙ.ᜃ()
at ᣙ.ᜀ(RectangleF A_0)
at ᣻.ᜃ(ᧉ A_0)
at ᣙ.ᜀ(RectangleF A_0)
at ᣙ.ᜃ(ᧉ A_0)
at ᣙ.ᜀ(RectangleF A_0)
at ᣙ.ᜃ(ᧉ A_0)
at ᣙ.ᜀ(RectangleF A_0)
at ឬ.ᜀ(ᤶ A_0, ផ A_1, ᝀ A_2)
at ᤜ.ᜒ()
at ᤜ.ᜁ(IDocument A_0)
at ᤈ.ᜀ(Document A_0)
at Spire.Doc.Document.ᜂ(String A_0)
at Spire.Doc.Document.SaveToFile(String fileName, FileFormat fileFormat)
at CMIS.BLLayer.CaseDocument.ConvertToPdf(CaseDocument document, String& path) in C:\<my class path>.cs:line 422
gregchak
 
Posts: 17
Joined: Wed Apr 03, 2013 12:07 pm

Re: Word .DOCM to .PDF

Postby Gary.zhang » Thu Apr 04, 2013 3:15 am

Sorry for inconvience.
The issue is not be reproduced by us, Could you please send us your Word .DOCM file? Then we can do a test with your file and reproduce this error you met.

Thanks,
Gary
User avatar
Gary.zhang
 
Posts: 1390
Joined: Thu Apr 04, 2013 1:30 am

Re: Word .DOCM to .PDF

Postby gregchak » Thu Apr 04, 2013 12:58 pm

Attached is a zipped copy of one of our forms. The document is a macro-enabled word document that contains form fields. This one has the form fields filled out with sample data. Please let me know if there is any additional information I can provide.
Last edited by gregchak on Mon Jul 15, 2013 5:42 pm, edited 1 time in total.
gregchak
 
Posts: 17
Joined: Wed Apr 03, 2013 12:07 pm

Re: Word .DOCM to .PDF

Postby amy.zhao » Thu Apr 04, 2013 3:30 pm

Dear gregchak,

Thanks for your file.
I have reproduced this error you met and posted it to our dev team. Sorry for the inconvenience caused by us.
My dev colleague need to do some researches to find out the cause which caused this error and fix it.
Once the issue has been fixed, we will tell you immediately.

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Re: Word .DOCM to .PDF

Postby gregchak » Wed Apr 10, 2013 12:40 pm

Do you have an update on this?
gregchak
 
Posts: 17
Joined: Wed Apr 03, 2013 12:07 pm

Re: Word .DOCM to .PDF

Postby amy.zhao » Thu Apr 11, 2013 1:35 am

Dear gregchak,

Thanks for your inquiry.
Our dev team has fixed this issue. Our test team is testing the fix.
Once the fix is ok, we will release a hotfix and inform you.

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Re: Word .DOCM to .PDF

Postby gregchak » Thu Apr 11, 2013 12:14 pm

amy.zhao wrote:Dear gregchak,

Thanks for your inquiry.
Our dev team has fixed this issue. Our test team is testing the fix.
Once the fix is ok, we will release a hotfix and inform you.

Regards,
Amy
E-iceblue support team


If you could please, update this thread when the hotfix is release so that I am notified.

Thanks so much Amy.
gregchak
 
Posts: 17
Joined: Wed Apr 03, 2013 12:07 pm

Re: Word .DOCM to .PDF

Postby amy.zhao » Tue Apr 16, 2013 3:06 am

Dear gregchak,

Thanks for your waiting.
The new hotfix has been released. Please download and test Spire.Doc Pack (Hot Fix) Version:4.7.20(http://www.e-iceblue.com/Download/download-word-for-net-now.html).
Have you any issues, please feel free to contact us.

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Re: Word .DOCM to .PDF

Postby gregchak » Tue Apr 16, 2013 1:19 pm

The new Hotfix has resolved all the issues we had with our conversion to PDF. Thanks so much for your help and attention to our issues.
gregchak
 
Posts: 17
Joined: Wed Apr 03, 2013 12:07 pm

Re: Word .DOCM to .PDF

Postby amy.zhao » Wed Apr 17, 2013 1:41 am

Dear gregchak,

Thanks for your feedback.
Have any other issues, please feel free to contact us.
Have a nice day!

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Re: Word .DOCM to .PDF

Postby gregchak » Mon May 20, 2013 3:14 pm

I am getting the same "object reference not set to an instance of an object" error again. For most of my documents it works fine, but for 3 of my 15 templates it still fails. I am attaching those documents so you can use them as reference.

I am attempting to save as PDF using the following code:

Spire.Doc.Document doc = new Spire.Doc.Document();
doc.LoadFromFile(<document path here>);
doc.SaveToFile(<new path with PDF extension>, FileFormat.PDF); <-- this is where the error occurs
You do not have the required permissions to view the files attached to this post.
gregchak
 
Posts: 17
Joined: Wed Apr 03, 2013 12:07 pm

Re: Word .DOCM to .PDF

Postby amy.zhao » Tue May 21, 2013 2:44 am

Dear gregchak,

Sorry for the inconvenience caused by us. I have posted your issue to our dev team.
There is any update, we will tell you.

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Re: Word .DOCM to .PDF

Postby gregchak » Tue May 21, 2013 12:37 pm

Thanks Amy. I look forward to an update.
gregchak
 
Posts: 17
Joined: Wed Apr 03, 2013 12:07 pm

Re: Word .DOCM to .PDF

Postby amy.zhao » Fri May 24, 2013 10:26 am

Dear gregchak,

We have fixed these issues in your new files. Our test team is testing the fix.
Once the fix is ok, we will release a new version and inform you.

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Re: Word .DOCM to .PDF

Postby amy.zhao » Thu May 30, 2013 9:51 am

Dear gregchak,

Thanks for your waiting.
The new version has been released. Please download and test Spire.Doc Pack Version:4.9
(http://www.e-iceblue.com/Download/download-word-for-net-now.html).
There is any issue, please feel free to contact us.

Regards,
Amy
E-iceblue support team
User avatar
amy.zhao
 
Posts: 2251
Joined: Wed Jun 27, 2012 8:50 am

Next

Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests