Hi. I have built a DLL that generates a PDF. The problem is that the error message "PDF rendering format is not available" appears, unless the Telerik dlls are referenced in the calling application.
How do I need to proceed?
Here is the code in the Calling Application:
This is the code that is failing in the DLL:
Of course, it fails on the "Render" call.
How do I need to proceed?
Here is the code in the Calling Application:
| byte[] b = conv.GeneratePDF(); |
| FileStream oFile = File.Open("C:\\test.pdf",FileMode.OpenOrCreate,FileAccess.Write,FileShare.None); |
| oFile.Write(b, 0, b.Length); |
| oFile.Close(); |
This is the code that is failing in the DLL:
| public byte[] GeneratePDF(List<FieldDescriptor> fieldList, DataTable dtFields, string reportName) |
| { |
| ReportDataTable = dtFields; |
| FieldList = fieldList; |
| ReportName = reportName; |
| Telerik.Reporting.Report report = GetReport(); |
| string mimeType = string.Empty; |
| string extension = string.Empty; |
| Encoding encoding = null; |
| byte[] buffer = Telerik.Reporting.Processing.ReportProcessor.Render("PDF", report, null, out mimeType, out extension, out encoding); |
| return buffer; |
| } |
Of course, it fails on the "Render" call.