03-04-2019 05:31 PM
Team,
I am getting error "Object reference not set to an instance of an object." when I try to convert ODT file to PDF. This code was working fine , I think last I tested, it was working in OnBase 15. Now I am getting this error. Admin also seeing the same error on the server side.pdfProvider was separate module but it is part of OnBase.Any thing need to configure on Server side?Any Thing Change? Thanks for your help. Lucky
Sample Code :
// Retrieve the default rendition of the latest revision of the document Rendition rendition = obDoc.DefaultRenditionOfLatestRevision; // Create PDF provider objectPDFDataProvider pdfProvider = app.Core.Retrieval.PDF; PageData objPageData = pdfProvider.GetDocument(rendition); -- Error Here.
Error:
System.ServiceModel.FaultException: Error with in GetOnBaseFile -- > Hyland.Unity.UnityAPIException: An error occurred within the Unity API: Object reference not set to an instance of an object. ---> Hyland.Public.ServiceException: Object reference not set to an instance of an object.The stacktrace has been removed. Please contact your administrator and provide error id: 3fa5f827-35c0-45f3-a331-6d5ede1365a5 to get more information. --- End of inner exception stack trace --- at Hyland.Unity.UnityServiceClient.Execute(IRequest request) at Hyland.Unity.Services.HylandServices.DataProviderServiceAccess.GetPageData(Request request) at Hyland.Unity.Services.HylandServices.DataProviderServiceAccess.Hyland.Unity.Services.IDataProviderServiceAccess.PdfGetDocument(Rendition rendition, PDFGetDocumentProperties properties) at Hyland.Unity.PDFDataProvider.GetDocument(Rendition rendition, PDFGetDocumentProperties optionalProperties)
03-07-2019 07:37 AM
Hi LK --
Per the Programmer's Guide entry on working with Documents and Keywords, ODT to PDF conversion is not supported using any of the Unity API data provider classes. For more information:
https://sdk.onbase.com/unitySDK/html/2d2a3c82-550b-4be1-a557-d866f841552f.htm
Best,
Adam Kuhn
06-17-2022 03:55 PM
OnBase Team,
Do we know if ODT to PDF conversion supported now?
Thanks.
Lucky
06-20-2022 05:53 AM
Hi
As
https://sdk.onbase.com/unitySDK/html/2d2a3c82-550b-4be1-a557-d866f841552f.htm
According to the notes for SCR: #228415, with changes for SCR#181571 for OnBase 16, the Workflow action Created PDF/TIFF will handle converting an ODT file to an image. The solution is then to import the document as MS Word, this will not change the file at all and maintain the extension on the file, etc. Workflow will be able to take that file and convert it to an image or PDF.
While I did not test this, it is possible the Unity API might support the same functionality.
Best wishes.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.