I need to add version info and retrieve it from the CHM file to make it possible to make an alert message to a user about a new CHM-file version available and downloaded.
It means, that I should compare versions of CHM on different machines (Server and clients).
The other way is date and time checking, but I should remember about time zones, so this is complicated, because also one should remember about different file systems, according to Windows SDK help about SetFileTime function and FILETIME structure.
If someone knows the trick - please share.
.chm files don't have version information. You will need to find some alternative way to mark the file version.
One way that occurs to me is to include a topic in the help file that contains the version. I imagine that this topic would be hidden, that is not linked by any other topic, not in the table of contents, etc.
All that remains is for your application to be able to read that topic from the help file. I'm sure that can be done with a .chm file parser, if you can obtain one. Perhaps more easily you can get the platform browser to read the topic for you. You can use IHTMLDocument2 to read a URI like this:
mk:#MSITStore:C:\somedir\somefile.chm::/html/SomeTopic.html
I need a web based document viewer, open sourced(free), in which i can show my tiff images.
I've gone through so many links however couldn't found any product which supports the tiff format, and can be used within my java code.
I have used Viewone-Pro and it completly fulfill all our needs, however, its not an open source product, so if any other product providing such features available, we would like to use that further.
Please suggest.
I wanted to if it is possible to read a KeyID from an encrypted file using WMDRM 10?
Of course it is a clear text somehow, but is it possible? how?
Thanks!
One easy answer is that you can binary-parse the file and look for the <WMRMHEADER> tag and the <KID> tag within it (both Unicode-encoded). The key ID is within the <KID> tag.
The correct (but much harder) way is to use Windows Media Format 11 SDK and the IWMDRMReader::GetDRMProperty() method with the g_wszWMDRM_DRMHeader_KeyID constant. However, you are gonna need WMDRM "stub libs" from Microsoft in order to do that (i.e. be a DRM licensee).
Using the WMF SDK is preferred, but another option is to implement ASF Parsing. The spec is available # http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14995 and there are various implementations of ASF Parsers in different languages.
How to read an excel file from cfm page?
That depends on what you want to do. If you simply need to upload the file, you can use the cffile tag (CF8 documentation here).
If you want to extract data from it, you may want to look at Ben Nadel's POI Utility CFC. (Note that it's not been updated since the release of CF9 because of the introduction of the cfspreadsheet tag in that version of ColdFusion.)
At the moment, we use MS WORD and MS EXCEL to mail merge documents that needs to be sent to multiple recepients.
For example, say there is a complaint form where the complainant needs to fill in his/her name, address, etc. So we have a .doc file set up with the content and the dynamic entities set up for mail merging, with the name and address details put in an excel file, from where we can happily mail merge to generate all or just the necessary forms/documents.
However, I would like to automate this process, like a form in a website where the complainant can fill in his/her name, address and other details, and we could use that to generate the complaint form automatically and offer it to be downloaded (preferrably as a pdf).
Now, the only solution that comes to mind, is Latex, so that I can just replace the needed entities and just compile to PDF. However, that bit has to be negotiated with the webhost, if they are offering Latex or not.
Is there any other solution? Any other way we could get this done, with something that shouldn't be a problem for most webhosting solutions to offer?
EDIT: I would prefer a non .NET or rather non microsoft solution since, the servers are running linux and while mono might be capable of getting the job done, none of our devs know any .NET languages. However, if required we might have to dwelve into it.
Generating PDF using an XSL. Check the following: Apoc XSL-FO
You will need to create an XML file with the required fields and transform that with this tool.
If you wish to avoid .NET then XSL-FO is worth a look. Try the FOray project.
XSLT can be a steep learn if you do not have experience already. Also users will not be able to change the templates without asking the XSLT guru to do it.
If your templates are already in MS Word and MS Excel then I would stick with generating MS docs on the server. These are now easy to work with from code since OpenXML - check out OfficeOpenXML and OpenXMLDeveloper
Apache FOP : http://xmlgraphics.apache.org/fop/
I suggest generating rtf on the server: it's easy enough to automatically generate using cpan's RTF::Writer, has converters generating good pdf, can be edited by hand in word, oo-writer & TextEdit, doesn't have any really bad compatibility issues between the main editing applications, and has decent text & resource extraction tools, with text extraction being rather better than pdf.
There's some support for moving between rtf & latex, although the best rtf -> latex converter, docx2tex, depends on the System.IO.Packaging .net module, whose mono implementation isn't yet rock solid.
Postscript — Not a recommendation: it's too much of an unwieldy sledgehammer for this job, but iText will generate the pdf directly from the form data. If you wanted to do fancy things like signed pdf, that would be the way to go.
Postscript #2 — If you break up the Word document into individual files using word's master document representation, then you can clobber one of the parts with hand-generated content. This makes it easy to do something approximating form-filling on word .doc files using just standard file-utils and some trivial rtf->doc tweaking.