NiXPS
Wednesday, September 30, 2009
  XPS Imposition
I've written a small example script for NiXPS View v3.0 that implements XPS imposition.

Given a multipage file, it imposes 2 pages on 1 landscape A4 - so a 16 page document will yield an 8 page document, where each page has 2 pages on it.

The script is fairly simple, about 50 lines of code:

First, define our A4 paper size:

// paper size, use A4
lMaxWidth=1056;
lMaxHeight=816;


Then create a new XPS file:

// create a new XPS file, with a single document
lNewXPS=new NOPackage();
lNewXPS=lNewXPS.create(true,"spreads.xps");
lNewDoc=lNewXPS.getDocument(0);


Next, we walk over all the pages is the currently active document, and put 2 pages on each page. We do some RenderTransform magic to position the pages correctly:

// get the doc
lDocument=App.getDocument();
lNumberOfPages=lDocument.getNumberOfPages();

for (i=0; i<lNumberOfPages; i++)
{
if (i % 2==0)
{
// create a new page
lNewPage=lNewDoc.createPage();
lNewFixedPage=lNewPage.getFixedPage();
lNewFixedPage.setWidth(lMaxWidth);
lNewFixedPage.setHeight(lMaxHeight);
lOffsetX=0;
lNum=0;
} else
{
lOffsetX=lMaxWidth/2;
lNum=1;
}
// access the page
lPage=lDocument.getPage(i);
lFixedPage=lPage.getFixedPage();
lPageWidth=lFixedPage.getWidth();
lPageHeight=lFixedPage.getHeight();

// calculate the factor
lFactorWidth=(lMaxWidth/2)/lPageWidth;
lFactorHeight=lMaxHeight/lPageHeight;
lFactor=lFactorWidth;
if (lFactorHeight<lFactor)
lFactor=lFactorHeight;

// copy page on top
lNewPage.copyPageOnTop(lPage);
lCanvas=lNewFixedPage.getCanvas(lNum);
lCanvas.setRenderTransform(lFactor+",0,0,"+lFactor+","+lOffsetX+",0");
}


And that's it. Only thing left to do now at this point is give the newly created XPS file to the application, so the user can work with it further.

App.addPackage(lNewXPS);


As you can see you can fairly easy leverage the NiXPS SDK in Javascript this way. It's great for tools and customizations, and also for experimenting, as it is also fairly easy to convert this script to a C-Sharp or C++ source, and use it in conjunction with our SDK.

You can download the script, and find more on scripting on http://nixps.com/scripting
You can read more about our NiXPS SDK here
 
  Fun: Arial or Helvetica?
For the Typophiles amongst you: so you say 'Helvetica is so much nicer than Arial, everyone can see that'? Prove it!

More background on the Arial/Helvetica debate here.

(via Daring Fireball)
 
Tuesday, September 29, 2009
  NiXPS View 3.0 features: Scripting

An exciting new addition to NiXPS View v3.0 is its ability to run scripts.

Granted, this is a fairly technical feature, but it can be very useful to extend the NiXPS View applications with more 'vertical' features.

Scripting is essentially programming, so to a certain degree you need to be a 'computer geek' to be able to grok how to do this. But scripting has a fairly low barrier of entry. Especially if the scripting is based on something relatively ubiquitous Javascript.

Javascript powers virtually all websites around the internet, and chances are that if you ever had a go at building your own website, that you have encountered, and even tried writing, a Javascript.

Fact is: Javascript is fairly easy to learn and use, and if technology is not really your thing, which is very possible, than it isn't hard to find someone with the technical ability required to hack together a decent script.

We leverage our NiXPS SDK in the scripting environment, and together with some hooks for the application, one can build fairly powerful scripts which very little coding.

To aid the development of scripts, we have started a wiki where we give a small introduction to how to get around making scripts for NiXPS View v3.0. You can find this at http://nixps.com/scripting.


We are big proponents of 'learning by example', and for this we are posting example scripts on the wiki. This is a great way to experiment, and get the hang of writing small scripts.
And for technical help you could also post your question on the NiXPS mailing list

One of the first scripts that we are posting in the example section is a script that performs XPS imposition.
I'm going to write a bit more about this in a next blog post.
 
Thursday, September 24, 2009
  NiXPS View 3.0 features: UI
This is the first of a series of posts that takes an in-depth look at our latest NiXPS View release.

The subject of this post is UI, one of the most , if the most, important aspects of a desktop application. I've written before about how important, and how much work it is to get a UI right.
We've invested a lot of time and effort to make the UI of NiXPS View v3.0 more efficient, and aesthetically pleasing.

Toolbar
One of the things that you'll first notice when starting up the application, is the new toolbar:


We have chosen not to fill this up with 'everything but the kitchen sink', like a lot of applications tend to do, but in stead we have opted to only offer the most used features, and put all others on the menu. This makes the application look a lot less complex, which is good, as complexity alienates users. Advanced functionality can be discovered in the menus.

So the toolbar contains:


These are the most important functions one need when interacting with an electronic document.
We have decided against putting the 'print' in the toolbar, as it would add to the visual clutter, and everyone is accustomed to finding the print feature in the file menu.

Sidebar
The sidebar contains all kinds of 'lists': an optional document outline (aka table of contents), page thumbnails, document thumbnails and the search results. These are very useful lists, but showing them by default make the UI too busy. We chose an approach to only show the sidebar when there is a reason for it (if the document has an outline, it will show by default; if the user searches, the results will be shown), otherwise it is hidden, but can be discovered by the user via the sidebar button.

Quick search
Searching through a document is a very important function; we spend a lot of time speeding it up, and made sure it works well with large documents. The moment you start typing in the quick search control, the app will start searching, without blocking the UI. This is a very natural, and pleasing way to do a search. We also provide extensive feedback during the search, so the user knows what is going on when the search takes a long while, which can be the case for very large documents.

OS specifics
We carefully crafted the application to really 'fit in' the native OS it runs on.
On Windows this means that we start-up with an empty windows, which is a drag target for opening files. Dropping a file on the icon will also open the file.
The application will open documents in separate windows, as this gives a clear 1 file = 1 window metaphor, which we fee is more natural than an MDI interface, which quickly gives a 'cramped' and 'busy' feel.

On OSX we make sure we do not show an empty window on start-up. We also implemented the proxy icon, which is a great way to map a document to it's place in the finder.
Being a document centric app, we also made sure that starting in v3, XPS files can be viewed via QuickLook - all you need is the NiXPS View v3.0 installed on your Mac.

Here's a small demo of our NiXPS View v3.0 running on Windows 7:

NiXPS View v3.0 UI Demo from nixps on Vimeo.

 
Wednesday, September 23, 2009
  PR online: NiXPS View v3.0 brings annotations, scripting and PDF/A conversion to XPS
Here's the link to the PR.
Download it in xps format here.
 
Friday, September 18, 2009
  NiXPS View v3.0 released!

Today we are releasing NiXPS View v3.0!
We have worked hard to make this version the best version ever, and we are introducing a truckload of new and unique features:

For a short period of time we are offering this fantastic new version at a special launch price of USD 49 (EU 35)!
(Existing v2.6 customers get this version for free.)

Give it a try and let us know what you think!

You can read more about this release here.
You can download a 30-day trial here.
You can buy a license here.
 
Thursday, September 10, 2009
  Quick, look!

We introduced the world's first XPS Macintosh viewer exactly 2 years ago (more here, or here, or here).
We are very committed to the Mac, and to honour this we are introducing QuickLook support in our upcoming NiXPS View 3.0.
Because, we really think you can do more with XPS!
 
Monday, September 07, 2009
  NiXPS SDK powers future products of Dane Prairie Systems LLC




NiXPS is proud to announce that Dane Prairie Systems LLC has chosen its NiXPS SDK v2.6.3 for inclusion in the next generation of their software products.
Read more here.
 
Thursday, September 03, 2009
  Javascript and XPS, a match made in heaven.
Javascript is pretty ubiquitous these days. Great for quick, usefull scripts.
Like drawing a barcode on top of an XPS, for instance.



Do more with XPS!
 
Wednesday, September 02, 2009
  Meet our twins



Same genes, different character, equally loved.
Our upcoming NiXPS View v3.0 for Mac and PC.

Do more with XPS.
 

Archives
September 2006 / October 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / October 2008 / November 2008 / December 2008 / January 2009 / February 2009 / March 2009 / April 2009 / May 2009 / June 2009 / July 2009 / August 2009 / September 2009 / October 2009 / November 2009 / December 2009 / January 2010 / February 2010 / March 2010 / April 2010 / May 2010 / June 2010 / July 2010 / September 2010 / October 2010 / November 2010 / January 2011 /

NiXPS home
XPS info from the creators
    follow me on Twitter
    Add to Technorati Favorites

    Subscribe to
    Posts [Atom]