The Scenario:
I need to create a lightweight presentation application that offers PowerPoint-like features such as:
Simple text formatting (font, colour, size, style, etc)
Picture embedding (possibly video as well)
Simple animations (just slide, fade and appear actually)
The presentations themselves will be arrays (or Dictionaries) of strings from either a built-in database or a series of XML files (probably a combination of both).
I intend to develop and test the application, and create presentations on a Windows PC, and then display (and possibly edit) those presentations on a Linux-based PC.
The Options:
The options I know about are:
WinForms
Pros:
No external code needed
Cons:
Limited screen redrawing ability
Limited/No animations available
HTMLRenderer
Pros:
Proven reliable layout format (HTML 4.01 + CSS Level 2)
Code freely available for embedding
Cons:
Code hasn't been updated since 2009
Author's website gives 404, and his company website is incomplete.
My question is, quite simply, what other options are there? And which would be the best for my needs?
I would be very tempted to do this using Gtk-Sharp and to use WebKitSharp for rendering full HTML documents ( no need to restrict yourself )
You could possibly allow your program to consume a zip file containing html docs and images, perhaps even javascript and css.
Both libraries sould allow you to quite easily write a c# application that will run on mono on linux or OSX or windows with .Net or Mono.
That said, Webkit sharp has not had much in the way of recent checkins..
Related
I have a Photoshop Document with a few layers that I can turn on and off to make the image display different data. Is it possible to place this image in a WPF page and use C# to turn on and off layers? I've been googling for a little while but there doesn't seem to be much information on this subject. I read that you might be able to use Expression Blend to do this, however I do not have any experience using it.
Any help would be greatly appreciated, thanks!
(Disclaimer: I'm a software engineer at Microsoft, I used to work on Expression Blend)
In short, no. There is no built-in support for loading Photoshop files in the .NET Framework nor WPF (this is despite Blend's support for loading PSD documents into a project - it has its own code for this - and it doesn't support all of the features present in the PSD file format either).
If you want to load a PSD file into your own program you'll need a PSD file reader - either write your own (a fool's errand considering how complicated the file format is) or obtain/license an existing library, there are open-source implementations available (see Paint.NET's).
A problem with PSD files is that individual layers are not necessarily simple rasters by themselves, and PSD documents don't always contain a full-resolution composite either. Consider effects-layers (Brightness, Levels, etc) or layer-effects (Outer Glow, Gradient Overlay, etc).
I suggest instead having Photoshop (via an Action or a Droplet program) convert your PSD's layers to individual PNG files (after applying any effects) and then loading those into your program and displaying them according to your requirements.
I started working in a new project with a big challenge. I am working in a medical project and in that I have to read DICOM images and process the image with its properties. I gathered some basic knowledge on DICOM and PACS. As I worked on WPF around 2 years of my career so I choose to do this project using C# and WPF. I googled a lot and even I went through many articles in SO and also in codeproject, every where I found they used some libraries/ third party tools like:
gdcm , LEADTOOLS , ClearCanvas
Can any body suggest me any alternate way of doing DICOM Image processing without using any third party/library or is it impossible without using libraries/third party ?
I have gone through the link for choose a best suitable library for DICOM image processing, but looking for an alternate way to solving this.Please feel free to suggest which is the best and more flexible library from the above list only if there is not any alternate way to achieve the task.
Any idea, link, suggestion or any initiation will be appreciated, thanks in advance.
In one way or another the third-party libraries are also created from scratch, so of course it is possible to create a DICOM image processing solution without relying on any third-party libraries. Using whole or parts of an open-source library will most certainly take you to a functional solution in considerably shorter time, though.
One third-party library that is mentioned in the link you are referring to is mdcm. This is a relatively light-weight open-source library with support for WPF (and Silverlight). If you want to, I am pretty sure you should be able to extract those parts from this library that are relevant to your project.
Another light-weight library is Evil DICOM. I am not completely sure that this library has very much image processing functionality, though.
UPDATE MAY 31: SUMMARY OF DISCUSSION
mdcm is an open-source library under the LGPL license. An example of image rendering usage is given in the SL.DicomToXml (Silverlight) application, equally applicable to WPF applications. In the code-behind of the MainPage, fileNameButton_Click method, there is code to demonstrate DICOM image file loading and rendering.
There is currently no up-to-date binary distribution of mdcm available, but it should be fairly easy to build required libraries from the solution in the mdcm repository. Source code can either be obtained using a Git client or by downloading the latest revision by clicking on the ZIP button on the repository home page.
If you need to get more acquainted with DICOM image processing details, it is probably good to start by having a look at the DICOM Standard itself, and also to parse a DICOM image file to get the feeling for what information it contains. A good starting point is the official DICOM homepage. A quick introduction with links to software is given here. There is also a general, more lengthy tutorial available here.
I'm currently programming an application in Silverlight which need to have a control to display a Word 2003 document . I can also convert the document before the webservice sends it but the 2003 format seems to be quite harsh to manipulate. I know there's some softwares which can do it but you have to purchase them. Do you have any clue to help me to progress ?
What is the level of fidelity you want to achieve?
I am quite sure that the "easiest" way of doing this would be to convert the document to XPS serverside (with the XPS printer perhaps) then manipulating it to create a Silverlight compatible content (a XAP)
Why this? Because, for instance:
Silverlight does not support flow documents, therefore you don't want to have to perform the layout on the client.
Silverlight requires fonts to be included in the same XAP that is using it (even in the same assembly), therefore you need to generate an assembly with the font embedded in it serverside.
XPS is XAML in a zip (therefore a lot better to manage than Word2003 doc), but it isn't Silverlight Xaml, you need to convert it to Silverlight before being able to read it on your Silverlight App (using XSLT? beware, there are some calculations required to convert viewports into scale/translate transforms). The good news is that any layout problems were taken care of in the XPS generation process.
I had an intern design a prototype of XPS reader for Silverlight a year ago. It worked, but the rendering wasn't perfect (I could have been however, with more work)
In a word: It's possible, not really complicated, but requires lot of work and practice in a few domains (from XSLT to assembly generation, and knowledge of the XPS norms). But I am not aware of any free solutions available.
Therefore, I would recommand using an available (and working) solution, rather than taking the route of a risky development.
I am planning to write an app that can open and display PDF documents, and perform OCR on vector graphic elements within the PDFs. The user must be able to select regions of the document and I need to draw real-time annotations on the document. I don't need to alter or save the document itself.
I have plenty of experience with C# and WPF; I have written a similar application already that does the above on XPS/XAML documents rather than PDF. However that app only runs on Windows and PDF documents must be converted to XPS first.
I have done quite a bit of research and there are many, many options available, none of which seem an obvious choice. There are many libraries that can open PDFs or create PDFs, but most don't seem to give you access to individual vector graphic elements in a format that lets you draw/manipulate them on the screen (similar to what I could do with WPF graphic elements extracted from XPS documents).
I am familiar with .Net and C# (including .Net 2 GDI+ graphics) and I am very keen to stick to what I know. I am also using EmguCV for image recognition which can be compiled in Mono or .Net. As such I am looking at Silverlight (running standalone) or Mono options, both of which should run on PC and Mac.
Performance (for both graphics and number crunching) is a strong consideration, though I am just as interested in getting this up and running quickly.
Does anyone have any experience with opening PDFs, extracting vector graphic elements (perhaps as SVG) and rendering them in a Mono app? Can individual elements be rendered to bitmap?
Alternatively, does anyone have experience with opening PDFs in Silverlight and converting them to XPS or XAML at runtime? I know that WPF and Silverlight graphics libraries are not 1:1, but I'm not sure how this affects XPS contents (generally composed of Canvas, Glyphs and StreamGeometry objects).
Thank you for any advice, tips or links you have to share.
look at this
http://silverpdf.codeplex.com/
it's client side pdf reading library. actually right now it can only read files, but you could play with it and make your own "display" functionality.
You might want to examine the internals of your PDFs so you understand what they actually contain better - you might be very surprised! For example, text can often be scanned pages or images and vecotr graphics do not exist as neat little packages. We wrote a whole load of general articles about what is inside a PDF and analysis tools at http://www.jpedal.org/PDFblog which are not specific to any tool or language.
I am looking for a way to display TIF documents on a web page. It basically needs to render a Multi-page TIF in some form of container on a web page.
Do I need a control or is there a simple way to build something like this? Is there any free stuff that we could simply implement?
I have looked at the Telerik reporting product which apparently contains a Tif viewer. I haven't looked into the licensing for this though. (If I only need the TIF Viewer, do I need to purchase the entire reporting solution?
Our biggest issue at the moment (like always) is that we have a very tight deadline with very little available resource. This product will be installed at a client so ActiveX controls that request user permission to install are less than ideal.
Any suggestions and/or comments would be welcome.
Thanks
If you want to try and roll your own (this would be a lot of work), you can use the System.Drawing namespace to convert TIF images to a browser-supported format, like PNG or JPG, or a third party library like AbcPdf to go to PDF as Lazarus suggested. The problem here is that you would have to create and code-behind a toolset for magnification, cropping, and multi-page support, along with whatever else you would want, which could be quite a bit of coding (unless you went to PDF and relied on Adobe Reader). Also, the server-side conversion can be prohibitive for speed if you're dealing with large TIF files or with formats that aren't supported.
As far as vendor solutions are concerned, I don't know of any good free viewing plugins off-hand. R Ubben is right; Snowbound's viewer is nice, but if I recall, the AJAX version requires it's own website that you pass the image to, which then gets rendered to the client, which may bring up some security issues (and leaves a bad taste in my mouth anyway). Atalasoft has an excellent AJAX image viewer and a very powerful imaging SDK, but it does cost a bit. My current company has settled on an ActiveX plugin from Pegasus Imaging (recently merged with Accusoft) called Prizm Viewer. The viewer itself is quite powerful, can handle many image formats, and is scriptable. It does have drawbacks (beyond being an ActiveX control). We've had some trouble with our desktop deployments as the default install will only push for the current user as opposed to the local machine, but we've fixed that with a post-install registry hack.
I would say that, if you have the cash and want a robust imaging solution, go with Atalasoft. Otherwise, Pegasus is fairly cheap and works just fine, unless you have severe aversions to ActiveX. There are lots of other options out there, it's just a matter of how much money you have and how much coding you want to do.
Use a library server-side to convert the TIF to a PDF (assuming that it's a common plug-in that most people have) which will eliminate the need to install another, convert each page of the TIF into a GIF or JPG and present those, again fully supported by browsers eliminating the need for an additional plug-in.
You could probably do this conversion on-the-fly and then cache the output to reduce subsequent loading times.
There's a good, free viewer that has an ActiveX version for IE and a Mozilla plugin for Firefox. Alternatiff. It's free but requires registration that's fairly painless.
# R Ubben
Thanks for mentioning our AJAX application! There is a live version of the ajax document viewing application, VirtualViewer, available at http://ajaxdocumentviewers.com and a free trial download. VirtualViewer may be overkill for simply viewing TIFF images on the web - depending on the size of your organization - so we also provide the RasterMaster SDK so you can build your own file conversion and viewing apps.
Doug
Snowbound Software has a pretty good image viewer. It does not use ActiveX. Displaying tiffs is not difficult, but sometimes you need something quick.
I've used Adeptol's AJAX Document viewer to do the same thing. Works great and easy to implement.
i'm just looking for the same..
found this:
http://www.neodynamic.com/demo-faq/imagedraw-aspnet/imagedraw-aspnet-multipage-tiff-viewer-sample.aspx
hope it can help, otherwise if you find something better, please let me know by inbox :)