Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Aug 19, 2020 1:52 pm

Hello,
I have downloaded FreeSpire 6.2.0 via nuget packages to convert a pdf file's 1st page to an image.
My application is a .net core 3.1 razor pages app. It is working perfectly on windows10 on local machine. But when I deployed app to azure server which is a linux server the created image is a defective image and it's size is much bigger(349,2KB) than the size of image(164,6) created on local machine of the same pdf file.
Is there a way to prevent it.
My Code is:
Code: Select all
IFormFile file = Request.Form.Files[0];
PdfDocument doc = new PdfDocument();
                        doc.LoadFromStream(file.OpenReadStream());
                        Image bmp = doc.SaveAsImage(0);

                        Stream msThumbnail = new MemoryStream();
                        bmp.Save(msThumbnail, ImageFormat.Png);
                        msThumbnail.Position = 0;
                        await blob.UploadToAzureBlob(fileNameGuid + "_thumbnail.png", msThumbnail);

images of locally created, and server created are attached.

Thanks for the help.
Sati

stkeskin
 
Posts: 1
Joined: Wed Aug 19, 2020 1:12 pm

Thu Aug 20, 2020 9:38 am

Hello,

Thanks for your inquiry.
To help us investigate your issue more accurately and quickly, please provide us with your input file, and a runnable project that could reproduce your issue. You could send them to us([email protected]) via email. Thanks in advance.
Besides, I’d suggest you try to test your case with our commercial version (the latest version is Spire.Pdf version:6.8.5), since it is more stable and contains more bug fixes than the free version.

Sincerely.
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Fri Aug 28, 2020 9:53 am

Hello,

Greetings from E-iceblue.
How is your issue now? Could you please give us some feedback at your convenience?

Sincerely
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Return to Spire.PDF