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-16-2011 09:26 AM
The above code is correct, it looks like there must be a configuration problem somewhere. Check to make sure the File Format of the Document Type you are retrieving is set to PDF. I ran a test with similar code retrieving a PDF Document from a Document Type configured to Image File Format and received the same exception as you.
11-16-2011 10:36 AM
Yes the extension is PDF and file format is #16. I have a filter in my code limiting the file types. I just added this License the other day. Do I need special dll as the sdk implies? I have the files from conversionfiles.zip installed already because I have been using the Office to image framework. Is there any other configuration setting I should look at as well?
11-18-2011 07:01 AM
I got it working sometimes when I ran the MSi in web110176DatalogicsServerExtension.zip. I still get the error message PDF Library Error: Bad parameter. Error number: 1073741827 in diag console even when it works. It does not work on larger PDFs, 250 page in my tests but . It smells like a time out (Unexpected error: Thread wasbeing aborted....) suggestions anyone?
11-18-2011 07:43 AM
You can try to change the Data Provider...
Try to replace:
ImageDataProvider OBProvider = app.Core.Retrieval.Image;
TO
PDFDataProvider OBProvider = app.Core.Retrieval.PDF
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.