cancel
Showing results for 
Search instead for 
Did you mean: 

Unity API error with PDFDataProvider , OnBase Version 17.0.1.67

Lucky_Kanwal
Confirmed Champ
Confirmed Champ

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)


1 ACCEPTED ANSWER

Adam_Kuhn
Star Collaborator
Star Collaborator

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

View answer in original post

6 REPLIES 6

Lucky_Kanwal
Confirmed Champ
Confirmed Champ

OnBase Team, 

Do we know if ODT to PDF conversion supported now?

 

Thanks.

Lucky

Hi @LK ,

 

As @Adam Kuhn mentioned, the full list of available conversions is available here ...

 

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.

Getting started

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.