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 Jun 19, 2019 6:41 am

Hi,

This is Vishnu we are having Spire Doc Licence . Recently we are working on the Doc to PDF conversion.My DOC size is creating around 9MB when i am trying to convert to PDF throwing exception.
Below is the code, created the file Doc(docPDFfile) file around 8MB after that i am passing to the below method.


Spire.Doc.Document document = new Spire.Doc.Document();
document.LoadFromFile(docPDFfile);
document.SaveToFile(pdfFile, Spire.Doc.FileFormat.PDF);
System.Diagnostics.Process.Start(pdfFile);



Please let me know the solution all the doc less than 8 MB working.

Please help us to resolve.

Thanks
Vishnu

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Wed Jun 19, 2019 9:12 am

Hi,

Thanks for your inquiry.
If you are using an old version, I would suggest that you download our latest version (at present, the latest version is Spire.Doc Pack(hot fix) Version:7.6.5) to have a test. If your problem still occurs after trying, please provide your input document to help us further look into your issue. You could send it to us via email (support@e-iceblue.com) or upload it to Dropbox or OneDrive and then share us with the download link. Thanks in advance.
By the way, we checked our purchase record but didn't find your license information with your email address, could you please share us with your registration email or order number?

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Thu Jun 20, 2019 2:28 pm

Hi,

No luck, after updating the Spire.Doc Pack(hot fix) Version:7.6.5).

For < 1mb docs, pdf are creating with this new dll but first page is coming correctly second page onwards complete page is fit to the window (enlarged). Not all pages are in same way.
For > 6mb not event document is creating.
We have license dll with us it might be others are having this information.


Thanks

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Fri Jun 21, 2019 3:11 am

Hi,

Thanks for your feedback.
Sorry we can't reproduce your issue without you word documents. We need the following information to do an accurate investigation. You could send them to us via email (support@e-iceblue.com) or upload the large files to Dropbox or OneDrive and then share us with the download link. Thanks in advance.
1. Your input word documents which could reproduce your issues.
2. Your testing environment such as OS information (E.g. Win7, 64bit ) and the region setting (E.g. China/Chinese).

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Fri Jun 21, 2019 5:38 am

Hi

Documents are company confidential and we can’t forward to you. Take sample document of more than 8 MB try to replicate at your end .
How it is related to region? Yes, Win 8 and 64 bit

Thanks

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Fri Jun 21, 2019 7:04 am

Hi,

Thanks for your feedback.
I have tried the large word document more than 8 MB, but we didn't find any issue. There might be some specific structures or elements in your word documents that caused your issues. So we need your word documents to do further investigations. You have no need to worry about it. 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. Perhaps you can remove sensitive information from your documents or replace sensitive information with dummy data as long as the changed documents could reproduce your issue. Besides, the region setting might have influences for issues in some occasions, so we requested this information for a better testing.

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Sat Jun 22, 2019 3:01 am

There is nothing special in the document only company logo at the header of the every document.Can you send me the doc snippet you have used to get this.

Thanks

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Mon Jun 24, 2019 2:37 am

Hi,

Thanks for your inquiry and sorry for late reply as weekend.
My test code is the same as you previously submitted on the forum. Sorry we haven't encountered the same issue as yours in previous testing cases. So, we need your word documents for further testing. We will not use them for for other purposes. Please don't worry about it. Thanks in advance.

Sincerely
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Mon Jun 24, 2019 3:58 am

nancy.yang wrote:Hi,

Thanks for your inquiry and sorry for late reply as weekend.
My test code is the same as you previously submitted on the forum. Sorry we haven't encountered the same issue as yours in previous testing cases. So, we need your word documents for further testing. We will not use them for for other purposes. Please don't worry about it. Thanks in advance.

Sincerely
Nancy
E-iceblue support team


Thanks for the update,

I have changed the implementation by split in to multiple documents and convert in to PDFs Individually, but I am facing another issue that, I created the word document of the size (824 kb each) while I am converting same in to PDF the size of the PDF is getting increased size of Work Doc to ~10 times .i.e 824 kb(Word) become 8450 kb (PDF)

Note I am using latest Spire.PDF and Spire.Doc (7.6.5)

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Mon Jun 24, 2019 4:03 am

Thanks for the update,

I have changed the implementation by split in to multiple documents and convert in to PDFs Individually, but I am facing another issue that, I created the word document of the size (824 kb each) while I am converting same in to PDF the size of the PDF is getting increased size of Work Doc to ~10 times .i.e 824 kb(Word) become 8450 kb (PDF).

Please let us know how decrease the size of the PDF doc.

Note I am using latest Spire.PDF and Spire.Doc (7.6.5)

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Mon Jun 24, 2019 9:15 am

Hi,

Thanks for your feedback.
I created a sample word document (around 800kb), and converted it to PDF file, but the size only increases hundreds of KB. Besides, Our Spire.Doc provides PS method to convert Word to PDF, you could try this way to check if the size has some reductions. If the issue still troubles you, please provide your sample Word document, so that we can investigate it accurately and provide a solution accordingly. Thanks in advance.
Code: Select all
            Document doc = new Document();
            doc.LoadFromFile("Sample.docx");
            ToPdfParameterList ps = new ToPdfParameterList();
            ps.UsePSCoversion = true;
            doc.SaveToFile("Reslut.pdf", ps);

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Mon Jun 24, 2019 1:29 pm

Thanks for the fix as it is decreased to size of PDF 50%.

But I facing another issue Doc to PDF conversion is failing with Updated dll(7.6.5) and
it working with Old dll (6.11.7) but conversion is taking long time(~10 minutes) even for 500 KB doc file.

Can you please help me fix this.

Thanks

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Tue Jun 25, 2019 2:15 am

Dear Haridhar,

Thanks for your feedback.
Please share us with your input Word that causes the new issue, also tell us the specific information about the failing, such as the exception details. You could send it to us via email (support@e-iceblue.com). We promise to keep your file confidential and won't use it for other purpose. Thanks in advance.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Tue Jun 25, 2019 1:29 pm

Spire.Doc.Document document = new Spire.Doc.Document();
document.LoadFromFile(docPDFfile);
Spire.Doc.ToPdfParameterList ps = new Spire.Doc.ToPdfParameterList();
ps.UsePSCoversion = true;
document.SaveToFile(pdfFile, ps);

Below issue i am getting while calling the method LoadFromFile()..

{
"$id": "1",
"Message": "An error has occurred.",
"ExceptionMessage": "Exception of type 'System.OutOfMemoryException' was thrown.",
"ExceptionType": "System.OutOfMemoryException",
"StackTrace": " in
}

Haridhar_Spire
 
Posts: 12
Joined: Wed Jun 19, 2019 6:28 am

Wed Jun 26, 2019 2:55 am

Hi,

Thanks for your feedback.
Sorry it is hard to replicate your issue on our side without your testing Word document, please share it with us. Meanwhile, the system available memory may also has some influences on the "OutOfMemoryException" issue. So, please also tell us the memory of your system like RAM: 8GB. Thanks in advance.

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Return to Spire.Doc