Hi Josip,
Thank you for the reply.
What I eventually did is wrote very simple console app that works on windows azure:
Just for fun I switched it to .net 4.0 and it's worked. Bingo! I did the same with my mvc 4 api, but no luck :(
Because of time concerns, my azure deployment running above console app and everything work, but I still don't understand what is causing this issue.
Perhaps there is issue with .net 4.5. I'd love to continue my investigation, but running out of time at the moment.
P.S. I'll be watching updates!
Thank you, Andrew.
Thank you for the reply.
What I eventually did is wrote very simple console app that works on windows azure:
static void Main(string[] args)
{
var pathToPdfFile = args[0];
var outputPath = args[1];
var lastInstalledVersion = GhostscriptVersionInfo.GetLastInstalledVersion(
GhostscriptLicense.GPL | GhostscriptLicense.AFPL, GhostscriptLicense.GPL);
Console.WriteLine(lastInstalledVersion);
var dev = new GhostscriptPngDevice(GhostscriptPngDeviceType.Png256);
dev.ResolutionXY = new GhostscriptImageDeviceResolution(76, 76);
dev.InputFiles.Add(pathToPdfFile);
dev.Pdf.FirstPage = 1;
dev.Pdf.LastPage = 1;
dev.OutputPath = outputPath;
dev.BackgroundColor = Color.White;
dev.Process();
}
When I created this simple console app based on .net 4.5 it failed to work on my local machine with same null reference exception as on azure. Just for fun I switched it to .net 4.0 and it's worked. Bingo! I did the same with my mvc 4 api, but no luck :(
Because of time concerns, my azure deployment running above console app and everything work, but I still don't understand what is causing this issue.
Perhaps there is issue with .net 4.5. I'd love to continue my investigation, but running out of time at the moment.
P.S. I'll be watching updates!
Thank you, Andrew.