I am using the below code which is giving good quality of pdf locally but after deploying the API in the azure app service and consuming the same method using swagger, the quality of Pdf decreases(size of file also decreasing). Here parameter htmlContent is HTML data in string format.
PdfConverter pdfConverter = new PdfConverter();
pdfConverter.LicenseKey = Key;
pdfConverter.PdfDocumentOptions.EnhancedGraphicsQuality = true;
pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
pdfConverter.PdfDocumentOptions.PdfPageOrientation = PdfPageOrientation.Portrait;
pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.NoCompression;
byte[] downloadBytes = pdfConverter.GetPdfBytesFromHtmlString(htmlContent);
downloadBytes value I am saving it to blob storage.
BlobAccess.WriteBlob(blobConnectionString, blobContainerName, storagePath, downloadBytes);
Let me know what is causing this issue in the server.
Based on the DOC| Deployment to Azure Cloud states that ,
Please refer this below links for more information:
. Winnovative Software - Questions and Answers
. SO THREAD