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.

Thu Feb 11, 2016 9:47 am

Hello,

I've just checked if Spire.Doc could handle pdf convertion and it does for .docx.
When I'm doing exactly the same but for .doc I'm getting "NullReferenceException" occurred in Spire.Doc.dll.

My question is, does Spire.Doc handle .doc to .pdf or just .docx to .pdf ?
In case it handles .doc to .pdf please reply with how this is done or point me to a proper example/sample.

Kind Regards,
Alan

AlanKinder
 
Posts: 3
Joined: Thu Feb 11, 2016 9:41 am

Thu Feb 11, 2016 10:37 am

Dear Alan,

Thanks for your inquiry.
The .doc and .docx can be converted to PDF.
Please provide us your document which encounters this issue to help us do an investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Thu Feb 11, 2016 3:18 pm

Hello,

I cannot send you the files as they are restricted/ security protected.

This can be reproduced by adding any .doc file inside the path in the below code.

Document docOne = new Document();
docOne.LoadFromFile(@"ADD PATH OF .DOC HERE");

Document docTwo = new Document();
docTwo.LoadFromFile(@"ADD PATH OF .DOC HERE");

foreach(Section sec in docTwo.Sections)
{
docOne.Sections.Add(sec.Clone());
}

//ERROR HERE
docOne.SaveToFile("DocToPDF.Pdf", FileFormat.PDF);

Please let me know if there is a mistake as I couldn't spot it.

Thanks,
Alan

AlanKinder
 
Posts: 3
Joined: Thu Feb 11, 2016 9:41 am

Fri Feb 12, 2016 4:04 am

Dear Alan,

Thanks for your reply.
Did you use latest Spire.Doc Pack(hot fix) Version:5.6.16?
I have tested your codes with two .doc documents, but I didn't encounter any issue, the result is ok.
It is difficult to say what the reason caused this issue if you don't send us sample documents.
Please kindly note that we take customer's confidential information as serious as them. We will never publish or disclose any information of our customer. This is always the promise we keep to our customer and the regulation we must obey. Or you can remove confidential information from sample document, and the changed document also encouters this issue.
Please send it to us(support@e-iceblue.com) via email to help us do an investigation.

Thanks,
Betsy
E-iceblue support team
User avatar

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

Fri Feb 12, 2016 9:48 am

Hi,

Version usage is a trial : 5.6.16.3040 .
Documents cannot be send to any 3rd party because of security. (important stuff :| )

All I can say is that I used the code provided to test Spire.Doc functionality and I got issues when trying to convert to PDF.
Merging is working fine from what I've seen. I merged .docx alone, .doc alone and combined .doc and .docx, all worked ok for merging. The problem is that when I'm trying to convert to pdf, the only one working is the .docx alone, while .doc alone or .doc + .docx document ( im talking about the merged documents here ) do not pass the :
docOne.SaveToFile("DocToPdf.Pdf", FileFormat.PDF);

Please feel free to reply with any suggestions that could fix this issue, or code sections which work fine for this convertion that I mentioned above.

Kind Regards,
Alan

AlanKinder
 
Posts: 3
Joined: Thu Feb 11, 2016 9:41 am

Sun Feb 14, 2016 2:27 am

Hi Alan,

Thanks for your further information.
If we don't reproduce your issue, it will be difficult to do the investigation and resolve it.
To help us work out solution soon, please provide us some sample documents without confidential information for investigation.
You can send them to support@e-iceblue.com. Thank you.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc