Debugging for backend conversion

This commit is contained in:
Rick Falkvinge
2017-10-01 19:25:42 +02:00
parent 45cff0fd6e
commit dea8f0419d
+11 -1
View File
@@ -48,8 +48,18 @@ namespace Swarmops.Backend.SocketServices
BackendLoop.ProcessMetapackage(SocketMessage.FromXml((string) json["XmlData"]));
break;
case "ConvertPdfHires":
try
{
PdfProcessor.Rerasterize(Document.FromIdentity((int)json["DocumentId"]), PdfProcessor.PdfProcessorOptions.HighQuality);
}
catch (Exception exc)
{
JObject newJson = new JObject();
newJson["MessageType"] = "Exception";
newJson["ExceptionString"] = exc.ToString();
Sessions.Broadcast(newJson.ToString());
}
// Convert with high quality -- done on backend with lower priority than the immediate frontend conversion
PdfProcessor.Rerasterize(Document.FromIdentity((int) json["DocumentId"]), PdfProcessor.PdfProcessorOptions.HighQuality);
break;
default:
// do nothing;