Posted 28 February 2019, 7:04 pm EST
Hello. I encountered a problem when i called to get the pdf content from the web api service.
In the device which encountered the problems, when i go to : http://localhost/MYWEB/api/pdf/pdfViewer/e6a54256-acce-4231-91c5-f86fe2b25a8e.pdf/$pdf
i got this :
{“loadedDateTime”:“2019/03/01 15:37:35”,
“expiredDateTime”:“2019/03/01 15:50:13”,
“path”:“pdfViewer/e6a54256-acce-4231-91c5-f86fe2b25a8e.pdf”,
“pageSettings”:{“paginated”:true,“height”:“11in”,“width”:“8.5in”,“topMargin”:“1in”,“leftMargin”:“1in”,“rightMargin”:“1in”,“bottomMargin”:“1in”,“landscape”:false,“paperSize”:1},
“features”:{“nonPaginated”:false,“paginated”:true,
“textSearchInPaginatedMode”:true,“pageSettings”:false},“status”:{“expiredDateTime”:“2019/03/01 15:50:13”,“hasOutlines”:false,
“status”:“Loaded”,“errorList”:,“progress”:0.0,“pageCount”:1},
“statusLocation”:“http://localhost/MYWEB/api/pdf/pdfViewer/e6a54256-acce-4231-91c5-f86fe2b25a8e.pdf/$pdf/status”,
“featuresLocation”:“http://localhost/MYWEB/api/pdf/pdfViewer/e6a54256-acce-4231-91c5-f86fe2b25a8e.pdf/$pdf/features”}
but when i go to :
http://localhost/MYWEB/api/pdf/pdfViewer/e6a54256-acce-4231-91c5-f86fe2b25a8e.pdf/$pdf/export?_=1551425664732&format=html&paged=true&outputRange=1
it has an error :
{“Message”:“An error has occurred.”,“ExceptionMessage”:“Specified cast is not valid.”,“ExceptionType”:“System.InvalidCastException”,“StackTrace”:" at C1.Util.DX.ComObject.QueryInterface(Guid guid, IntPtr& outPtr)\r\n at C1.Util.DX.ComObject.QueryInterfaceT\r\n at C1.Win.C1Document.Util.C1DXTextLayout…ctor(IC1DXTextLayoutOwner owner)\r\n at C1.Win.C1Document.Util.C1DXExportGraphics.CreateTextLayout()\r\n at C1.Win.C1Document.Util.C1DXExportGraphics…ctor()\r\n at C1.Win.C1Document.Util.C1HtmlGraphics…ctor(XmlWriter doc, C1Page page, String imageFolder, Boolean singleFile)\r\n at C1.Win.C1Document.Export.HtmlFilterBase.ExportPage(C1Page page)\r\n at C1.Win.C1Document.Export.GraphicsFilter.InternalExport(IExecutionContext context)\r\n at C1.Win.C1Document.Export.ExportFilter.Export(IExecutionContext context)\r\n at C1.Win.C1Document.C1PdfDocumentSource.InternalExport(ExportFilter exporter, IExecutionContext context)\r\n at C1.Win.C1Document.C1DocumentSource.Export(ExportFilter exportFilter)\r\n at C1.Web.Api.Document.Models.Document.Export(ExportFilterOptions exportFilterOptions)\r\n at C1.Web.Api.Document.DocumentRequestContext
1.Export(ExportFilterOptions options)\r\n at #0Ai.#cBi.#08x()\r\n at System.Threading.Tasks.Task
1.InnerInvoke()\r\n at System.Threading.Tasks.Task.Execute()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at #0Ai.#cBi.#88x.#U9e()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"}
Here are my device settings which can’t get the pdf content:
- Window Server 2008 R2 Standard SP1
-IIS 7
-.Net Framework 4.6