library or tool to convert pdf to SilverLight xaml file - silverlight

Is there any library or tool to convert a pdf file to SilverLight xaml file?

This is what my google-fu got me:
http://www.amazedsaint.com/2009/05/pdf-to-xaml-conversion-alternate.html
From that article:
Create a new Silverlight Project in Expression Blend.
As Expression Blend can import adobe illustrator files, simply rename a pdf file's extension from pdf to ai
Clicked File-> Import Adobe Illustrator files in Blend, and imported to my active window.
You'll get the whole form imported as graphical paths, preserving the whole layout

Download and install the free XAML Export plugin for Adobe Illustrator (CS, CS2, CS3, or CS4).
http://www.mikeswanson.com/XAMLExport/
Rename your .PDF to .AI (for older versions of Illustrator).
Open in Adobe Illustrator.
Choose which page (Illustrator can only open one page of your PDF at a time).
Export to XAML (choose Silverlight over WPF, it produces better results)
Rinse and repeat for other pages.

Related

How to open PDF in Pixelsense application

I'm working on an application for Pixelsense using Microsoft surface 2.0 , I wants to open PDF file in my application in scatterview control , so that i can zoom , rotate & move my PDF file . I have followed the process given http://hugeonion.com/2009/04/06/displaying-a-pdf-file-within-a-wpf-application/
In the link i'm able to open PDF file in scatterview but not able to rotate & zoom it
I would suggest conmverting your PDF file to an image or images, then using those. It may be that ScatterView doesnt have all the support for embeded activeX controls etc and has better support for images.
Processing PDF files can be done with GhostScript (open source) or commercial PDF components.

View PdfSharp document in a WPF control

I'm using the companion MigraDoc and PdfSharp libraries to generate a report.
The PdfSharp documentation repeatedly refers to WPF and talks about you can "draw on a PDF page as well as in a window", but I can't figure out how to view my PdfDocument in a viewer. All of the examples just kick the rendering off to another program by opening the documents with Process.Start().
Do either of these libraries include WPF controls for viewing the documents? Ideally I'm looking for a basic document viewer control, similar to the built-in RichTextEditor viewer for FlowDocuments.
(I'm using the PdfSharp and MigraDoc libraries that are distributed through NuGet.)
You can use WPF PDF Viewer. It wraps the Adobe PDF Reader COM Component as a WPF control
PDF Viewer is an ActiveX control which needed to be hosted using WindowsFormHost. If you need a WPF renderer for PDR, Adobe didnt introduced it yet. You need to create it yourself and parse the PDF document.
Here are few links which will help you how to host a PDF document on your WPF window :
http://www.codeproject.com/Articles/380019/Using-Adobe-Reader-in-a-WPF-app
http://hugeonion.com/2009/04/06/displaying-a-pdf-file-within-a-wpf-application/
Telerik has a PDF Viewer created using WPF which does the rendering of a PDF document using WPF. Its called RADPDFViewer
http://blogs.telerik.com/blogs/posts/12-02-29/introducing-pdf-viewer-for-silverlight-wpf.aspx
You have to either use one that is shipped by Adobe or you need to create it of your own just like Telerik did.

File loader in wpf

Is there any file loader control in WPF which allows importing files during the runtime?
(choosing any file from the file system).
Are you looking for something like the OpenFileDialog? If so, there are examples of how to use it here or here or you can google "wpf openfiledialog" and find many others.
The Windows Forms OpenFileDialog controls are still available for WPF apps:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/aa21c4b6-aa44-44e0-82c9-6e29d9e3c2e3/
I have mostly seen apps using the win forms dialog or an updated win forms one. For example:
http://gong-shell.sourceforge.net/
As a side note, the silverlight file upload picker for SharePoint 2010 looks pretty good it would be good if MS released that to the wild. :)

Importing WMF (Windows Metafile) or any other vector file into a silverlight project

Is it possible to import WMF (Windows Metafile) or any other vector based file into a silverlight project?
You can use Paste2Xaml to convert WMF/EMF to XAML
http://www.wpf-graphics.com/Paste2Xaml.aspx
And (from the same source) ViewerSvg to convert SVG to XAML
http://www.wpf-graphics.com/ViewerSvg.aspx
Also, for SVG, InkScape has a XAML export feature and there's a XAML export plugin for Adobe Illustrator somewhere, for WMF, Microsoft Expression Graphics Designer (what a short name) is supposed to be able to import WMF and export XAML, but I haven't used those myself.
You may want to have a look at free Silverlight Contrib project at codeplex. It comes with control to display WMF and EMF files.
Inkscape can import wmf and export xaml: http://www.inkscape.org.
I don't know of a direct way, but I've definitely transformed SVG into XAML successfully before. See this brief guide.

XAML Vector to Illustrator or similar

I can easily enough go from Adobe Illustrator and make a XAML file via the XPS Virtual Printer, but is there any way to import Vector graphics defined in XAML into Adobe Illustrator to continue working on it?
Cheers
Nik
You could try using Inkscape to convert your XAML into a format Illustrator understands. It support XAML import and export.
Export your drawing in Expression Designer as PDF or PSD and open it in Illustrator

Resources