Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, November 20, 2012 12:30:37 AM(UTC)

Groups: Registered
Posts: 1


I'm trying to display PDF-Files in a Silverlight application using LT17.5. The example "PDFDocumentDemo" installed with the LEADTOOLS libraries demonstrates the functionality I require - unfortunately it's a WinForms example and uses features not available in WPF.

To simply matters I'm trying to write a demo using WPF that allows me to hilite PDFObjects on a page.
As far as I can tell I have to convert a RasterImage generated using PDFDocument.GetPageImage() to a WriteableBitmap which I can then draw on. If I wish then to take advantage of RasterImageViewer to display my modified image I have to convert the WriteableBitmap back to a RasterImage. This strikes me as fairly complicated and possibly fairly time consuming, especially if I ultimately want to take advantage of the RasterImageViewer event "InteractiveUserRectangle" to interactively show the selecting of text.

Am I on the right track or am I missing something fundamental? I would be grateful for any pointers in the right direction or even better any WPF examples showing how RasterImages can be "interactively" modified (a WPF version of PDFDocumentDemo for instance).

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, November 20, 2012 5:49:08 AM(UTC)


Groups: Registered
Posts: 256

Since reading PDFs is not supported by our toolkit in Silverlight, implementing an approach similar to the WinForms demo is not going to be possible.

You are right that PDFDocument.GetPageImage() returns a RasterImage, but you don't have to convert it to Writeable bitmap.

A better approach might be to use our annotations features, which enable you to use our RasterImageViewer control with its RasterImage, and at the same time draw annotation (markup) object on top of it, such as highlight objects or rectangle objects.

Please take a look at our Silverlight annotations demo.

If you want to modify the raster image itself and not just draw annotations on top of it, you can use our image processing features, many of which are supported in Silverlight.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.059 seconds.