YOUR FEEDBACK
andy.mulholland wrote: intriguing !!! We have full scale 'Mashup Factories' in Chicago USA and Utrec...
AJAXWorld RIA Conference
Early Bird Savings Expire Friday Register Today and SAVE !..


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
POWERBUILDER LINKS YOU MUST CLICK ON


PDF or XPS: Choose the Right Document Format for Your Applications
Providing a single source for creating, converting, and processing both PDF and XPS documents

Originally, we had also looked at the Open Document Format supported by the OASIS group. But that format looked to us as being very archaic with a concept much different than PDF or XPS. This article still includes a feature comparison table to compare the three formats but will mostly discuss PDF and XPS.

Structure of a PDF File
A PDF file is made of a sequence of objects identified by numbers, followed by an index table containing the location of each object. Each object has a set of attributes associated with it. Some of the types of objects that can be found within a PDF file are Document information, Page description, Font description, Colorspaces, Images, Form fieldobjects, Annotations... Each object can have contents associated with it. Contents are usually compressed with flate compression (also known as ZIP), whereas object descriptions and attributes cannot be compressed.
The contents of a page is a series of drawing instructions that define exactly how the page should view and print. Here's an example of a page description and its contents:

6 0 obj
<<
/Type /Page /Parent 3 0 R /MediaBox [0 0 612 792 ] /Contents [7 0 R ]
/Resources <</ProcSet [/PDF /Text]/Font <</F9 9 0 R >>>>
>>
endobj
7 0 obj
<< /Length 98 >>
stream
1 0 0 1 16.8 0 cm
n
BT /F9 12 Tf 1 0 0 1 73.2 708.96 Tm
-0.075 Tc 0.435 Tw (Hello World) Tj
ET
endstream
endobj

In the example above, we're drawing text on a page using a specified font at a specific size and location. In PDF, a text fragment is not an object; it is a series of drawing instructions. The same thing applies to vector graphics and for some images.

This file format was designed for very fast viewing and printing. Its main inconveniences are:

  • Extracting document contents in a meaningful way for analysis purposes can be very painful as the content is not structured.
  • A larger file size because only fragments of the file are compressed.
  • PDF files can be corrupted when sent by email or ftp because their content might be considered as text rather than binary (www.amyuni.com/forum/viewtopic.php?p=1063). This part is usually compressed.
Note that Adobe made an attempt at compressing the whole file contents in its latest revisions of the format, but that resulted in backward incompatible files as we now have two different file formats for PDF.

Structure of an XPS File
An XPS file is made of a sequence of objects identified by URIs (Uniform Resource Identifiers.) The URI can be of the format /images/image1.jpg. The objects are stored in a regular ZIP file where all the object descriptions and object contents are compressed. The objects in a ZIP files are not indexed, which makes access to an object much slower than in the case of PDF.

The content of a page is made of objects described in XML format rather than drawing instructions. Here's an example of a page description and contents in XPS:

<FixedPage Width="816" Height="1056"
xmlns="http://schemas.microsoft.com/xps/2005/06"
xml:lang="und">
<Glyphs Fill="#ff000000"
FontUri="/Documents/1/Resources/Fonts/71271D1B84C9.o
dttf" FontRenderingEmSize="15.9697"
StyleSimulations="None" OriginX="120"
OriginY="110.4"
Indices="43;72;79,27;79,29;82;3;58;82;85;79;71;3"
UnicodeString="Hello World " />
</FixedPage>

Text here is an object that has various attributes and can be easily processed. The same thing applies to vector graphics and images.

This XML-based format was designed to be easily extensible by simply adding attributes or objects to the schema. The main inconveniences of this format are:

  • Once decompressed, the page content tends to be quite large.
  • Processing page content can be much slower than PDF especially in printers that have more limited resources than PCs.
  • Loading a complete document or searching for text within a document tends to be much slower than PDF.
Packaging XPS documents as a ZIP file makes the manipulation of XPS files much easier:
  • Images and fonts are stored in their original format without the need for the extra processing that is required by PDF.
  • The XML parts can be easily edited even with a simple text editor.
  • One can easily add items to the ZIP package or replace some items. For example, one can substitute an image with another by simply opening the ZIP package with standard tools. Note that this facility can be seen as a disadvantage or a security threat for some applications.

YOUR FEEDBACK
Dwayne wrote: XPS looks like it will be a nice technology for me - once the incompatibility between datawindows and the XPS printer driver is straightened out. Currently reports I have that print fine only show the footer when printed to the XPS print driver.
PBDJ LATEST STORIES . . .
Virtualization is actively being used by Sybase IT to help solve power/cooling issues as well as transform the datacenter into an environment that brings greater benefits to their customers, especially the engineering organization. Average CPU utilization was very low on physical serve...
Must have at least 5 years of recent experience (within the last 7 years) in building, testing, and supporting complex (multiple interfaces with database(s) and other applications) and mission-critical Windows applications using PowerBuilder. Must have at least 5 years of experience wr...
Join Scott Guthrie as he discusses Microsoft’s commitment to web standards development, Rich Internet Applications and how Microsoft is contributing to help move the web forward. Join Adobe’s Kevin Lynch as he demonstrates how Flash and HTML come together to make the most engaging,...
Particularly in a means of moving PowerBuilder applications to the web. What I’m looking for doesn’t require a server license or the installation of unmanaged code to the web server, and works well across different browsers (not just Internet Explorer). The WPF DataWindow will help...
"The rise of Enterprise Architecture is proof that organizations need to manage the impact of changes in competition, technology and regulations across their enterprise," said Dan Lahl, director of Intelligent Enterprise for Sybase. "PowerDesigner 15's unique Link and Synch technology ...
With PowerBuilder 11 Sybase gave developers what we have long hoped for – the possibility of taking an application created in a client/server architecture and turning it into a Web application, almost without having to move the code; and it's better if you don't use a server applicat...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING POWERBUILDER / SYBASE NEWS
Medmatics, LLC, a leading vendor of on-demand, anticoagulation software for private practices and ho...