Q: We were using PDFTron PDF2Image to convert the first page of a PDF
to a jpeg for the purpose of generating a thumbnail for a remote
Silverlight XPS document, but would like to upgrade to PDFNet SDK.
What is the
proper way to do this using the pdfnet sdk? If you can point me to
the sample that demonstrates this it would help.
A: To convert PDF to JPEG you could use PDFDraw.Export(). As a
starting point please take a look at PDFDraw sample project (http://
Please note that PDFTron SilverDox Publisher add-on (i.e.
'pdftron.PDF.Convert.ToSilverlight()' method in PDFNet) automatically
generates thumbnails for each page in the document (as part XOD - i.e.
Silverlight XPS) and you can retrieve the first page thumbnail
directly from a remote XPS (without any additional rendering). This is
demonstrated in FileBrowser sample
(http:// www.pdftron.com/silverdox/samplecode.html). This means that
you really don't need to keep a separate file for a tumbnail. The XOD
file (i.e. Silverlight XPS) also contains document text under '/Text'
which should simplify server side text indexing.