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.

Fri Jun 17, 2016 3:18 pm

Good morning,
I am writing because we have this problem, we made the deployment of our application on a machine with WINDOW SERVER 2012 R2 in Italian, when we use the library to convert docx files to PDF, images contained in the header and footer in pdf file he lost. The same thing done on a WINDOW Server 2012 R2 machine in English, it works correctly. What can we do?
This is the part of code that we use.

Document Spiredocument = new Document();
Spiredocument.LoadFromFile(pathFileWORD);

ToPdfParameterList embeddedFont = new ToPdfParameterList
{
IsEmbeddedAllFonts = true
};

Spiredocument.SaveToFile(pathFilePDF, embeddedFont);

fabio.barion@sdgitaly.it
 
Posts: 5
Joined: Mon Apr 04, 2016 3:34 pm

Mon Jun 20, 2016 2:01 am

Hi,

Thanks for your posting.
Please try the following code.
Code: Select all
CultureInfo cc = Thread.CurrentThread.CurrentCulture;
                Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

                Document Spiredocument = new Document();
                Spiredocument.LoadFromFile(pathFileWORD);
                ToPdfParameterList embeddedFont = new ToPdfParameterList
                {
                 IsEmbeddedAllFonts = true
                };
                Spiredocument.SaveToFile(pathFilePDF, embeddedFont);

                Thread.CurrentThread.CurrentCulture = cc;


Best Regards,
Amy
E-iceblue support team
User avatar

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

Wed Jun 22, 2016 6:01 am

Hi,

Has your issue been resolved?
Thanks for your feedback in advance.

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