Hello eveyone, does any one have any idea on somehow preview a pdf report documnet in print preview dialog or somehow using the UltraPrintDocument so that you can view in the print preview dialog?? Any ideas, thanks in advance,
Jose
Jose,
Take a look at the Thumbnails sample for the Documents sample project that comes with NA. Basically, you could take the images that are generated for each page in the report and hook into a PrintDocument's PrintPage event, and within there draw into the graphics object provided by the event. You would also have to set e.HasMorePages accordingly.
-Matt
Thanks, this worked and using the MetaFile image type renders the pages smooth. However, there is either a bug or it's just a feature; if your UltraChart has the GradientEffect added then RenderPdfFriendlyGraphics will *not* render colors. The 3DEffect and ShadowEffect also do not render, but at least their presence still allows colors to be rendered. I'm using version 9.1 w/ hot fix. Bug or feature? Les
I would like to thank you two for these suggestions. This was exactly what I needed. So now I am using the Documents namespace in concert with a print preview control in my own dialog form. I started 1st with the thumbnails example concept of getting an Image form the Page without writing the page file. Then with the reference to using the Metafile, I switched to a function that returned a Metafile given the Page, with that functioned based on the sample that wrote out the metafile. This concept worked so well, that I don't know why Infragistics doesn't provide that as a sample.
One thing I need to work on is to come up with a way to preview a grid control similar to the using an UltraGridPrintDocument with an UltraPrintPreviewDialog.