Monday, June 4. 2007
I finally found the time to build a public release of Version 2.1.0. There are plenty of small improvements: - The full user interface is now available in German (thanks to Thomas Efer who translated the tons of texts found in Creative Docs .NET). If your Windows Regional and Language Settings are set to German, you will automatically benefit from the translation.
- The image export filter is now much richer: you can specify if you want to export the full page, the area covered by the graphic objects (fit to objects) or only the area covered by the active selection (fit to selection). You no longer have to rely on an external bitmap editing tool to crop the image.
- The polygon object has now additional properties which can be used to produce various effects:
Aditionally, there were a few bug fixes. Please continue to report them to bugs at creativedocs.net.
Tuesday, May 8. 2007
I have just come across this KB article from Microsoft which lists all applications which have earned the "Certified for Windows Vista" logo. I've been very surprised to see that there are currently (May 2007) just 237 such applications. If you remove those belonging to Microsoft, the number falls to 207.
I find these numbers really amazing. What does this mean? I wonder... Are the software companies not interested by the Vista logo? Is it that hard to implement the changes required to pass the certification? It cannot be the price, as Microsoft was/is still sponsoring the certification process...
For me, going through the certification process was an interesting experience. And it forced me to better understand areas such as MSI, discover new tools (such as the Orca database editor), getting access to WinQual and, best of all, play with new technologies such as the Restart Manager.
Sunday, April 22. 2007
Creative Docs .NET has its own OpenType engine. Most of it is implemented in C#, from the OpenType table analysis to the metrics extraction, glyph mapping and substitution code. For the rendering, it feeds 2D curves to the agg back-end.
In order to present the fonts in a meaningful manner to the user, I decided to group them into families, which seems logical.
The family is basically defined by the Font Family Name (ID 1) in the "name" table of the OpenType font (this would be "Arial" for "Arial", "Arial Bold", "Arial Italic" and "Arial Bold Italic", but "Arial Black" for the Arial Black font). But there is also another entry in the "name" table, called Preferred Family (ID 16), which is not mandatory and did not exist in the fonts installed with Windows XP.
Some Adobe fonts, such as Warnock Pro, which exists in 32 different variants ranging from "Light Italic Caption" to "Semibold Subhead", use this Preferred Family name ("Warnock Pro") with the Preferred Subfamily name ("Light Italic Caption"). My version of Microsoft Word does not recognize these fonts as belonging to a unique family and shows a long list with "Warnock Pro", "Warnock Pro Caption", "Warnock Pro Display", "Warnock Pro Light", etc. and it happily mixes font weights ("Light", "Semibold", etc. with the optical suffixes "Caption", "Display", etc.).
Warnock® Pro Light Italic

I chose to take into account the Preferred Family name if it was available, and if not, fall back and use the Font Family Name. That's why Creative Docs .NET presents Warnock Pro as a single family with 32 styles, yet shows "Arial", "Arial Black" and "Arial Narrow" as three different families under Windows XP.
And here comes Windows Vista... There have been a few updates to the fonts, especially "Arial Black" and the "Arial Narrow" families. Do you guess what changed? Microsoft decided to define a Preferred Family for these fonts. Great.
The trouble is, when Creative Docs .NET (up to 2.0.14) saves formatted text in its *.crdoc documents, it stores the font family name and the font style name to uniquely identify the font. But for Arial Black, this is "Arial Black" and "" under XP. Under Vista, this font cannot be found, as its identity has now changed to "Arial" and "Black".
I've fixed this issue and a new version of Creative Docs .NET will be released in a few days.
Friday, March 30. 2007
I forgot to blog about version 2.0.13, available since end of February, and you did not miss anything really important, as it was mainly a bug fix release with a different implementation for the open file and save file dialogs.
Version 2.0.14 is the first version of the year which offers really new and interesting features: - A new Freehand Drawing Tool which can be used to draw smooth curves without having to be a Bézier guru:
When you start drawing, a circle appears which shows the distance you have to move to generate the next point on the curve. You can adjust the radius of this circle with the mouse wheel or the arrow keys.
When you are done, you can modify your curve with the Shaper Tool
- We updated the PDF export filter in order to make Adobe Reader 8 happy with our text output. Somehow, Adobe Reader 8 expects to have a bounding box information for every character definition, which was optional before. Trying to providing a dummy value instead leads to a crash! But with Creative Docs .NET 2.0.14, this is no longer an issue.
- A new ICO export filter, which relies on the IconLib library, found on the CodeProject (thanks Gustavo!).
Creative Docs .NET generates either a standard icon file with the expected 48x48, 32x32 and 16x16 sizes and 32-bit ARGB, 256 color and 16 color modes, or a Vista icon file which includes a high resolution version at 256x256 pixels.
For the German users, there is a little surprise: about half of the texts and messages have already been translated in German (thanks, Thomas!).
Friday, March 23. 2007
Yes, that's right, I won't turn my computer on on March 24. I found the idea of a Shutdown Day interesting enough, and since it is on a Saturday, I can afford not to use my computer. A week day would have been rather problematic.

Thursday, March 22. 2007
I've been very surprised to find Creative Docs .NET listed in the "Top 5 Graphics & Design" on Windows Marketplace :

Thank you to all of you who are using Creative Docs .NET and are giving us positive feed-back. Keep the comments coming!
Thursday, March 15. 2007
In a previous blog post I presented my solution for automated code signing, which relied on PTFBPro to generate the necessary key strokes when the Enter Private Key Password window would pop up.
A reader proposed another solution, which is cleaner: using SignTool.exe instead of SignCode.exe.
This requires the following steps: - Convert the private key (PVK) and public key (SPC) pair to a personal information exchange file (PFX) using the pvk2pfx tool. I did this:
pvk2pfx -pvk key.pvk -spc key.spc -pi p@ssw0rd -pfx key.pfx
- Import the PFX Certificate. This is easy; just double click on the PFX file and this will launch the Certificate Import Wizard. Follow the instructions.
- Update the post build events in order to use signtool. In my case, I launch a small batch file which iterates over the specified files, signing them:
for %%f in (%1) do signtool.exe sign /a /n "OPaC" /d "OPaC bright ideas" /t http://timestamp.verisign.com/scripts/timstamp.dll "%%f" I am specifiying which certificate to use with the /n option and the /d option is necessary to make the Vista installer happy. Without it, the MSI file which appears in the UAC prompt will have a random name.
Thursday, February 15. 2007
You can now download the 2.0.12 version. This is the second extensive bug fix release since Creative Docs .NET became certified for Windows Vista. The following problems were addressed: - Fixed a bug which prevented the creation of new documents based on no template at all.
- Fixed two TIFF decoding problems (old versions of Corel Draw produce invalid tags which prevented the files from loading; 8-bit grayscale images with alpha channel trashed the memory).
- Fixed several minor problems with the open and save dialogs.
- Fixed a few other bugs related to the image cache and the image object.
Expect a 2.0.13 version soon, if the trend continues...
Wednesday, February 14. 2007
You can now download the 2.0.11 version. This is the first extensive bug fix release since Creative Docs .NET became certified for Windows Vista.
I'd like to thank everybody who submitted bug reports. Keep them coming, it will help us further improve the quality of Creative Docs .NET.
I'd also like to apologize for several issues which caused crashes in Creative Docs .NET 2.0.10. I should never have released 2.0.10 so early, but I was eager to get a version online in order to promote Creative Docs .NET on www.windowsmarketplace.com... and the rush didn't prove useful, as the Windows Marketplace site is still undergoing internal changes, which prevents them from picking up new products in their catalog  . Let's see when Creative Docs .NET shows up there. Maybe next week (before end of February 2007, I hope).
Saturday, February 3. 2007
You can now download the 2.0.10 version which is the first stable 2.x version. There are no visible changes in the application user interface, but the core engine has been significantly optimized and improved: - The application starts up in much less time; the font cache is rebuilt only when it is really needed and it no longer consumes hundreds of megabytes of memory.
- The splash screen is displayed earlier and the initialization time has been reduced to 40% of the previous 2.0.x versions.
- A new image cache is used when working with images in documents. Huge images can be used without trouble and the creation of the downsampled images used on screen is now done in the background.
- Documents which include lots of images take less time to save; the images won't be recompressed every time.
- Loading of documents from a network share is significantly faster; the application becomes available as soon as enough information has been loaded to display the first page.
- Saving a document first saves in a temporary file and only then does it replace the previous file; in the event of a crash while saving a file, you won't lose the previous version, at least.
- The text rendering engine is now 3 times faster and the layout of a text document of more than one page becomes possible without falling asleep waiting for the next key press to become visible, but more work is still needed in this area

- Our custom open/save dialogs are faster than before.
- The samples have been updated to use the new text objects.
We are aware that there are still lots of possible improvements. What are you missing? What can we do better? Please send us an e-mail (the address is bugs [at] creativedocs.net) or post a comment in the blog.
Monday, January 15. 2007
I am both thrilled and relieved to announce that Creative Docs .NET 2.x passed the certification for the Windows Vista logo program!

I knew I had tested extensively all requirements (but the 64-bit related issues, as I don't own a 64-bit machine to run Vista X64 on it), but I was very nevertheless pleased when I got the official result from VeriTest  .
When rolling out a Vista compatible installation file, I need to sign every executable (EXE and DLL) with my authenticode signature. Doing so involves executing the signcode tool numerous times (for version 2.8.0 of Creative Docs .NET, this tool is invoked more than 30 times). And every time, I have to type in a pass phrase to validate the signature:

Maybe there is a solution to avoid having this dialog pop up 30 times, but I have not been able to find out how to do so. [Note: that's no longer true, read here]
I finally decided to use a macro recorder to automate this part of the build: whenever the dialog pops up, a small utility called PTFBPro awakes and sends the key strokes followed by return to validate the private key... PTFBPro is well worth its $29.99!

As I explained in my last post (Getting ready for Vista), the MSI file generated by a Visual Studio 2005 setup project contains a few errors which prevent it from passing the Vista logo tests.
The only solution I am aware of is to patch the MSI file using the Orca tool from Microsoft.

This tool allows you to peek inside an MSI file and edit its tables. Basically, an MSI file is a database which is used by the Microsoft Installer in order to install, repair and uninstall an application. All the information is stored in a collection of about 90 tables. The left hand side of Orca lists the available tables and the right hand side the rows of the selected table:

I used Orca to apply the following modifications to the MSI file:
- In table AdvtExecuteSequence, drop the only row which has a GUID and a condition set to UpgradeCode.
- In table CustomAction, add this row: MyTargetDir, 51, ARPINSTALLLOCATION, [TARGETDIR].
- In table InstallExecuteSequence, add this row: MyTargetDir, , 798.
- In table InstallUISequence, fix row ERRCA_UIANDADVERTISED by setting its Sequence value to 2.
For me, this fixed all errors and warnings spotted by Orca. However, there is still a missing dialog in the MSI file, which would make the test case 25 fail ( Verify the application properly handles files in use during install, req: 2.12). Fortunately, I found a solution in the Microsoft forums. Derek Sanderson's post was very helpful.
The test case 18, as specified in the December 2006 version of the test document, is broken. See the discussions here: my MSI file contains two rows in the Upgrade table, one with only a VersionMin but no VersionMax and another with both a VersionMin and a VersionMax. Per test case 18 (v1.1), this is not valid. However, it should be considered as correct, as confirmed by Oliver Lundt from Microsoft Global Partner Support and this requirement has been addressed in v1.2 of the test cases. I can confirm here that VeriTest is aware of this issue and will happily accept an MSI file which does not meet test case 18 (v1.1).
Applying all these changes manually would not be realistic, so fortunately, it is possible to automate the process. Before doing any modifications in Orca, use the New Transform command which will record every modification in the MSI file. When you are done with your modifications, you can ask Orca to Generate Transform, which will produce an MST file.
Applying these transforms automatically after every build can be done in a post-build script file, using the Windows SDK tool msitran:
msitran -a xyz.mst application.msi
Finally, the MSI file has to be signed using the standard signcode procedure:
signcode -a sha1 -ky signature -spc opac.spc -t http://timestamp.verisign.com/scripts/timstamp.dll -v opac.pvk application.msi
Friday, December 22. 2006
Windows Vista will be available to a large audience a little more than a month (31 January 2007), so I wondered what it would take to make Creative Docs .NET Vista aware and pass the Certified for Vista logo program.
There are a set of requirements which must be met. Basically, for Creative Docs .NET, this means that: - All executable files must be signed with an Authenticode signature (EXEs and DLLs).
- The installer must rely on the MSI engine (or ClickOnce), behave well and be Restart Manager aware.
- The application must crash reliably, should it crash, and not try to handle unexpected exceptions; a proper crash will trigger Windows Error Reporting.
- The application must behave well when multiple users are logged on a machine (fast user switching) or when used remotely through RDP.
- The application must contain a manifest specifying its UAC level.
- The application must accept shutdown messages from the Restart Manager.
Microsoft provides techincal guidance ( Vista Requirements and Vista Test Cases), 10 hours of free support to help solve the problems which could arise and, for a limited time, pay the first $1000 of the fees incurred when submitting the application for certification, if the certification succeeds.
About two weeks ago, I registered on the Innovate on teh Windows Vista Platform site, purchased a VeriSign Authenticode certificate (there is currently a special offer at $99), signed my preliminary 2.0.8 version of Creative Docs .NET, got a WinQual account from Microsoft, checked the 30 test cases and on the 20th of December, submitted Creative Docs .NET for certification.
This was an interesting experience... and I was only mildly surprised when I discovered that the tools Microsoft provides (Visual Studio 2005) do not produce error free MSI files, and that there is no update I am aware of that fixes several issues which would disqualify the product for the logo. Fortunately, a few helpful Microsoft support engineers provided workarounds and our good friend google helped a lot too...
Next time, I'll summarize the fixes that were required for my MSI file to pass all test cases. Until then, I wish you all a (politically incorrect?) Merry Christmas!
Thursday, November 9. 2006
I've just fixed a problem with the font management code, which led to nasty crashes when characters could not be mapped to known glyphs. Internally, this led to memory corruption because a buffer was allocated with 0 rather than 65536 entries. Ooops.
|