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 Jun 04, 2015 7:57 pm

I'm attempting to convert a directory full of docx files into pdf format. The first file converts just fine, but it hangs on the second file. I'm using the code below:

Code: Select all
            Document doc = new Document();
            foreach (string file in files)
            {
                switch (Path.GetExtension(file))
                {
                    case ".docx":
                        doc.LoadFromFile(file);
                        string newFile = Path.GetDirectoryName(file) + "\\" + Path.GetFileNameWithoutExtension(file) + ".pdf";
                        doc.SaveToFile(newFile, FileFormat.PDF);
                        break;
                }
            }


It's getting stuck on the doc.SaveToFile function for a 1,329 KB file. How can I figure out what's going on? Is there a chance that it would take more than a half hour to save a file as pdf?

victorperez
 
Posts: 3
Joined: Thu Jun 04, 2015 6:33 pm

Fri Jun 05, 2015 3:38 am

Hello,

Thanks for your inquiry.
Please provide your sample document for our test here, or send it to us (support@e-iceblue.com) via email. It would be very helpful to investigate this issue.


Best Regards,
Betsy
E-iceblue support team
User avatar

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

Tue Jun 09, 2015 12:29 pm

It's a sensitive document, so I'm unable to share it with unauthorized people.

victorperez
 
Posts: 3
Joined: Thu Jun 04, 2015 6:33 pm

Wed Jun 10, 2015 2:45 am

Hello,

Thanks for your response.
It is difficult to say what the reason causes this issue if you don’t provide a document to us, which can reproduce this issue for investigation. You could remove the security data of your document and then send it to us

Thanks,
Betsy
E-iceblue support team
User avatar

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

Wed Jun 10, 2015 12:32 pm

The entire document is sensitive, so by removing it, I'd just be sending you a blank document. I'll find another solution for my office document needs. I understand it's difficult to help when I can't send you the files I'm having problems with, but there's really no way for me to do that.

victorperez
 
Posts: 3
Joined: Thu Jun 04, 2015 6:33 pm

Thu Jun 11, 2015 2:07 am

Hello,

Thanks for your response.
Please feel free to contact us if you have any questions or needs. We will be happy to assist you soon.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Return to Spire.Doc