cancel
Showing results for 
Search instead for 
Did you mean: 

unity form xml data to pdf

Karen_Davenport
Champ on-the-rise
Champ on-the-rise

Hello,

I am retrieving documents via the api by document ID and displaying them in adobe.  When I retrieve a document that is a unity form, it fails when I try to use the pdfdataprovider, to get the page data.  I can use the image data provider to get a stream, then use a third party tool to convert to pdf, however I only get one page, there are three tabs.  Is there another way of converting the unity form document to PDF?  Below is the code I am using and an image of what I get displayed, there are three tabs, I only see one.  if I used the native provider, the document is xml, they don't want to display xml. 

Rendition rendition = document.DefaultRenditionOfLatestRevision;

ImageDataProvider iProvider = app.Core.Retrieval.Image;

using (PageData pageData = iProvider.GetDocument(rendition))
{
                    pageData.Stream.CopyTo(streamReader);
}

SautinSoft.PdfVision v = new SautinSoft.PdfVision();

v.Serial = "XXX";
d.stream = v.ConvertImageStreamToPdfStream(streamReader.ToArray());

Thank you for any help!

Karen

1 ACCEPTED ANSWER
3 REPLIES 3

I am using a third party tool, I am using the imageprovider for the xml document and converting it to pdf using the third party tool. The issue is the other tabs that have data not displaying. Would converting this to an eform then doing html to pdf correct this issue? It would be ugly to have to create an eform for the sole purpose of exporting a unity form to pdf. Would a better way to go be document composition tool, I see that takes a workview object or an XML file.

Hi! Karen, if you use Native data provider, you only get fields and data of the Unity Form in XML. If you use DefaultDataProvider, you should be able to the Unity From in HTML (containing all tabs’ fields and data and the display). I verified it against the 16.0.0.14. Then, you still need a third party tool to convert the HTML to a pdf.

Sorry for any inconvenience! There is a completed SCR which enables converting Unity Form into PDF for 17. Please look for this enhancement, once the 17 is released. www.onbase.com/.../730523