Hi,
I am using Aspose.Pdf.dll, I have complete Aspose.Total.lic embedded into my application.
My problem is that i wanted to convert a PDF to image per page and while doing in local it is very fast I get the result immediately but in azure for a single page it self it takes 4-5mins to convert and it hangs my azure sever. while viewing the task manager in azure remote it peeks to 50% process and hangs the PC.
I want to get this sorted.
//Method 1
PdfConverter converter = new PdfConverter();
converter.BindPdf(stream);
Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense(“Aspose.Total.lic”);
converter.StartPage = 1;
converter.EndPage = converter.PageCount;
converter.DoConvert();
while (converter.HasNextImage())
{
var t = tempFolderPath + “/” + imageCount + suffix;
converter.GetNextImage(t);
blob.UploadFile(“ClientShortName”, tempFolder + “/” + imageCount + suffix, t);
imageCount++;
}
//Method 2
var document = new Aspose.Pdf.Document(stream);
for (int pageCount = 1; pageCount <= document.Pages.Count; pageCount++)
{
var t = tempFolderPath + “/” + imageCount + suffix;
using (FileStream imageStream = new FileStream(t, FileMode.Create))
{
Resolution resolution = new Resolution(100);
JpegDevice jpegDevice = new JpegDevice(PageSize.A4, resolution, 80);
jpegDevice.Process(document.Pages[pageCount], imageStream);
imageStream.Close();
blob.UploadFile(SessionManager.Current.User.ClientShortName.ToLower(), tempFolder + “/” + imageCount + suffix, t);
}
}
Both methods i tried it was very unresponsive.
There is no documentation for aspose pdf azure like in aspose word.
Regards
Madan