11-15-2011 02:53 PM
I am running 11.0.1 on server 2008 (64). I am trying to convert a simple PDF to a Tif. (Yes we have a PDF Foundation License). I get this error is the Diag console:
An error occurred within the Unity API: Value cannot be null.
Parameter name: DefaultPageHandler requires a DocumentPage object. Use different overload.
I added a test for a non-null rendition and that did not help. The only other overload adds another parameter of type imagegetdocumentproperties which does not make sense.
Here is my code:
Rendition rendition = document.DefaultRenditionOfLatestRevision;
ImageDataProvider OBProvider = app.Core.Retrieval.Image;
string fullPath;
using (PageData pageData = OBProvider.GetDocument(rendition)) // Failure point
{
// use extension from page data object
fullPath = String.Format(@"{0}\{1}.{2}", BasePath, docname, pageData.Extension);
// Create file
using (Stream stream = pageData.Stream)
{
Utility.WriteStreamToFile(stream, fullPath);
}
}
Suggestions?
11-18-2011 08:52 AM
Authur
Unless I am missing something that would not work. I need a TIF file not a PDF as a output.
11-18-2011 12:06 PM
This issue helped us figure out a bug in the data provider. Aparently it will fail out when trying to convert more than 1 page.
A temporary fix would be to add the following lines:
ImageGetDocumentProperties imgProps = prov.CreateImageGetDocumentProperties();
imgProps.PageRanges = app.Core.Retrieval.Image.CreatePageRangeSet("1");
...and then using the imgProps as the second parameter in the GetDocument call.
Unfortunately, it only works to convert 1 page, anything else will fail out. An SCR has been created and I will update this thread once the fix is made and tested.
09-12-2012 01:56 PM
The SCR referenced above is completed and is now in the latest OnBase 12 release.
09-13-2012 07:34 AM
Tim
Do you mean Core 12.0.0.47?
Thanks
Scott
09-13-2012 02:09 PM
Yes, the fix is in 12.0.0.47
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.