Pdf conversion to jpeg via sql clr losing content depending on machine

Hi,


I originally thought this was a aspose.pdf.dll version problem - on our staging and production server, content was getting lost in the conversion (see attachments). But using the older 9.7.0 version on another test server and on my development machine gave the correct results while the newer version (10.5.0) on the staging and production servers had the problem.

version local test server staging production
9.7.0 good (413k) good (413k) bad (309k) bad (309k)
10.5.0 good (413k) good (413k) bad (309k) bad (309k)

Any thoughts what could be influencing the difference?

In the attachments, the text that does appear in TO15 (good).jpg and not in the TO15 (bad).jpg can be seen at the top right “Construction Joint Layout Plan…” and the legend below that.

Thanks,
Reuven

Hi Reuven,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 10.5.0 in VisualStudio 2010 project with target framework as .NET Framework 4.0, running over Windows 7 (x64) and I am unable to notice any issue. The PDF file is properly being converted to Image format.

Can you please share some further details regarding your working environment, which can help us in reproducing this issue in our environment. We apologize for your inconvenience.

[C#]

//open
document
<o:p></o:p>

Document pdfDocument = new Document("c:/pdftest/TO15.pdf");

for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)

{

using (FileStream imageStream = new FileStream("c:/pdftest/TO15_image" + pageCount + ".jpg", FileMode.Create))

{

//create Resolution object

Resolution resolution = new Resolution(300);

JpegDevice jpegDevice = new JpegDevice(resolution, 100);

//convert a particular page and save the image to stream

jpegDevice.Process(pdfDocument.Pages[pageCount], imageStream);

//close stream

imageStream.Close();

}

}

Hi, thanks for the response.

The CLR code I’m running is the same in both the successful and failing environments. It’s generated on my computer in VS 2012, .Net 4.5.1 (which produces a correct version). I’ve attached a spreadsheet with the assemblies loaded into SQL from both servers. The Staging server (not ok) is Windows 2008 R2 Service Pack 1. The Dev server (ok) is Windows Server 2012 standard.

Reuven

Any news about this issue?

Hi Reuven,


Thanks for sharing the details and sorry for the delayed response.

It appears that problem is appearing on stating server (Windows Server 2008 R2) and for the sake of testing, I have tried using latest release of Aspose.Pdf for .NET 10.5.0 in Visual Studio 2010 project with target framework as .NET Framework 4.0, running over Windows Server 2008 R2 (x64) and as per my observations, only the yellow rectangle inside main circuit diagram is not appearing in resultant image. For the sake of correction, I have logged it as PDFNEWNET-38903. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Would you mind sharing your CLR code? I’m struggling to get it work on my SQL2012 server - works fine on my 2008. I’m running 2012 on Windows Server 2012…

Hi,


Haven’t revisited this code for a while - it’s been in production (SQL Server 2014) and working fine. Hope it’s helpful.

Reuven

Hi Reuven,


Thanks for your patience.

The issue reported earlier is pending for review and is not yet resolved. However I have shared your findings with product team and as soon as we have some further updates, we will let you know. We are sorry for this delay and inconvenience.