Displaying XSLT content in Silverlight - visual-studio-2010

I am working with Silverlight 4.
I am supposed to display a XSLT inside a Silverlight page as is, read-only.
Which control is best suited for this?

XSLT files are for transforming one file format to another (generally used for taking XML and creating other XML files or HTML pages or human-readable plain-text files out of the input XML). They are not visual documents - what you actually need is to display the result of an XSLT transformation and the control you need for that will depend on what type of file the output of the transformation is (e.g. it could be an HTML file or a text file).
If you can post an example XSLT file you need to use, we might be able to offer more detailed help.

Related

ActiveX component to display in-memory MHTML in Windows

I'm creating a small Windows application (C++) which create some windows an such (CreateWindowEx and the like). And in one window I want to add a control that shows MHTML loaded from memory, i.e. the whole MHTML content is in a string, not in a file.
I already tried the Shell.Explorer component, but I can't find a way to inject to it anything other than HTML (see AtlAxCreateControl).
Is it possible to use the Shell.Explorer component or any other to show in-memory MHTML??
That is, without writing the content to a file and then giving the file path. That works, but it's not optimal and it'll have to be the last alternative if I can't do it any other way.
PS: If this can be done in another language or environment like C#, JS, VBS, WSH, HTAs, I'm all ears as well.
A bit late to answer, but still - there is a way to do it : use Microsoft's WebBrowser control (COM component, can be used in .Net apps as well).
Take a look an what the proposed solutions here - How to load mht from stream/string into a WebBrowser control? and here - How to display the string html contents into webbrowser control?. some of them refer to mhtml content but the solutions are applicable to ordinary html files as well.
Good luck.

How to read pptx engine name from pptx files

Given pptx file, how to know which engine created the file? (Ex, MSOffice, docx4j/pptx4j, etc.) Perhaps, there is some place in Office Open XML structure where it's acceptable to put the signature.
It would normally go in the extended properties part:
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
<Application>Microsoft Office PowerPoint</Application>
which Powerpoint stores at /docProps/app.xml
That part can also contain <AppVersion>
No guarantee that an application will write or update that though. docx4j, for example, will do so only if configured to.

Convert indesign output to html5

I want to write a viewer that convert in-design output format to html5 format and all the user design in adobe indesign can display in browser but i do not know which output is suitable for me, i think i can retrieve all info about the adobe indesign in idml export,but the problem is parsing such XML and display the tags in html5 format,i want to know is it possible the simple way to convert the output format into html5?
is it possible to download the adobe indesign SDK and use its method to this purpose?
You can use in5 to export HTML5 (layout intact) from InDesign.
Full disclosure: I am the creator of in5.
Exporting to EPUB would result in XHTML 1.1. The Epub file that InDesign generates is a zip file, in which you will find a number of files. (At least) one of them is an XHTML file.
XHTML 1.1 would surely be an easier source to use than the idml, however you will have to make sure that the ePub export is good enough to start with (the pages won't come out exactly the same as in InDesign).
Would that be a solution?
EPub export is supported from InDesign CS4 (JavaScript based export option, outside the object model, as I understand it and a built-in export option, part of the object model, from CS5).
You don't mention what version of InDesign you are using. CS5, CS5.5 and CS6 all allow you to export to HTML. The problem is that the HTML is version 4 and it create badly written CSS. What I like to do is to use XML to build my own HTML. Just create a set of HTML5 tags you want to use and then Map the existing Paragraph and Character styles to the XML tags.
When you're done you will have a basic content structure. Then I use the Structure pane to add different elements as needed. You can add Parents or children as you need to right there and then export to XML. When you save the file, just change its name to .HTML and edit the code to remove the one reference to "xml".
It takes a little time, but it is very doable.

Is it possible to generate XML from a EDMX model?

I'm generating my POCO's from edmx model, and would like to know if its possible to make use of the neat codegen features of Entity Framework to create my an xml document along with the POCO (which is needed for my project).
You can generate an XML document in Visual Studio using T4 templates.
In Visual Studio, a T4 text template is a mixture of text blocks and control logic that can generate a text file. The control logic is written as fragments of program code in Visual C# or Visual Basic. The generated file can be text of any kind, such as a Web page, or a resource file, or program source code in any language.
But you should note that the EDMX file itself is an XML document.
Right click on your Model.edmx file
'Open With...'
Choose 'XML (Text) Editor'
There are three main sections to the file
StorageModels - describes that database
ConceptualModels - describes your code and objects
Mappings - describes how the two models relate
Look at whether the standard EDMX file contains the type of information you want. If not, parse and shred it using T4 to extract the information you're looking for.
No need to parse the EDMX file, use TiraggoEdmx, you can install it via NuGet. See http://brewdawg.github.io/Tiraggo.Edmx/ it serves up all of the metadata from your EDMX files that Microsoft hides from you, very simple, works great. I wrote it but it's 100% free, even comes with a sample POCO template.

Converting Word to PDF Using SharePoint 2010 Word Automation Services

I have tried to find out the way I can put locks or disable the copy and paste on the PDF file after the conversion. I looked at the ConversionJobSettings properties but I couldn’t be able to accomplish this.
Based on what I have read, the sharepoint2010 Word Automation services API provides very limited capability in manipulating the conversion logics but is there any way I can lock down the content so that it cannot be copied?
Thank for your help
You will either need to code something up yourself or get a third party product such as this one, which allows conversion as well as PDF manipulation including security and watermarking.
Note that I worked on this product, so I am obviously biased. Having said that, it works brilliantly.
The only way to prevent copy and paste (as text) is to create image versions of the pages and saves those as a PDF.
a possible solution:
1) Use Word automation to print to a PostScript (PS) printer driver to get a .ps file
2) Use GhostScript to convert the PS to tif files
3) Create a PDF using the tif files (possibly with GhostScript too)

Resources