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.

Mon May 30, 2016 6:51 am

I am able to convert a word doc to pdf on my local machine using both files and streams.


but when I upload my website to azure and run the pdf conversion, I get the following error. Does Spire.Doc support azure?

Thanks,

Carl.

[ExternalException (0x80004005): A generic error occurred in GDI+.]
System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, String description) +226801
System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type) +34
spr᳇.ᜀ(PageSetup A_0, ImageType A_1, MemoryStream A_2, Int32 A_3, GraphicsUnit A_4) +260
spr᳇.ᜀ(PageSetup A_0, ImageType A_1, MemoryStream A_2, Int32 A_3) +19
spr᳇.ᜒ() +224
spr᳇.ᜁ(IDocument A_0) +247
spr᧾.ᜀ(Document A_0) +93
Spire.Doc.Document.ᜀ(Stream A_0) +99
Spire.Doc.Document.SaveToFile(Stream stream, FileFormat fileFormat) +289
Spire.Doc.Document.SaveToStream(Stream stream, FileFormat fileFormat) +45

carl_heller
 
Posts: 5
Joined: Thu May 19, 2016 7:14 pm

Mon May 30, 2016 7:14 am

Dear Carl,

Thanks for your posting.
Our products support Windows Azure WebSite but word to pdf conversion function or other function based on GDI because GDI is not well supported on Azure Shared WebSite. Our product would use the GDI when doc to pdf conversion.
In this case, the only solution for this problem is to move to Azure Cloud Services or Virtual Machine.

Best Regards,
Amy
E-iceblue support team
User avatar

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

Thu Sep 28, 2017 9:53 am

Hi,

Thanks for patient waiting.
Now the conversion issue on Azure has been fixed. Please use the latest Spire.Doc Pack(hot fix) Version:6.0.8 and PS method to have a try.
Code: Select all
Code: Select all
          Document doc = new Document();
          doc.LoadFromFile(filename);
          ToPdfParameterList tpl = new ToPdfParameterList
                {
                    UsePSCoversion = true                         
                };
           doc.SaveToFile(resultname, tpl);

If you have any issue, please feel free to contact us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc