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 Apr 21, 2016 2:36 pm

I am trying to convert a docx file which contains images, indexing, macros and action buttons using spire Assembly : Spire.Doc.DLL, v5.6.75.4040

Code Used to Convert file :

Code: Select all
using (SpireDoc.Document document = new SpireDoc.Document())
            {
                int value = extension == ".doc" ? 0 : extension == ".docx" ? 2 : extension == ".rtf" ? 15 : extension == ".txt" ? 17 : 0;
                document.LoadFromStream(data, (SpireDoc.FileFormat)value);
                using (MemoryStream stream = new MemoryStream())
                {
                    document.SaveToStream(stream, SpireDoc.FileFormat.PDF); // Issue in this statement
                    using (PdfDocument pdfdoc = new PdfDocument(stream))
                    {
                        pdfdoc.PageSettings.Orientation = PdfPageOrientation.Portrait;
                        pdfdoc.PageSettings.Size = PdfPageSize.A4;
                        pdfdoc.PageSettings.SetMargins(20F);
                        SetHeader(pdfdoc, headerText);
                        pdfdoc.SaveToStream(buffer);
                    }
                }
            }


This statement is not responding for a particular document :
Code: Select all
 document.SaveToStream(stream, SpireDoc.FileFormat.PDF);


Are there any conversion restrictions for convert word, excel, image files ?

Thanks in Advance.
Jagath

jagu102
 
Posts: 12
Joined: Mon Dec 19, 2011 1:05 pm

Fri Apr 22, 2016 2:21 am

Dear Jagath,

Thanks for your inquiry.
There is no conversion restriction, please provide us a sample document. You can remove sensitive data or replace the sensitive data with other string as long as the document can reproduce your issue. We will do an investigation and then update to you.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Return to Spire.Doc

cron