Editing PDF Forms within Silverlight

Jul 24 2012

PDF form or AcroForms allow users to interactively edit specific portions of a PDF document in supporting viewer applications. A PDF form is composed by one or more AcroForm fields that provide a name-value association once they have been edited.

Amyuni PDF for Silverlight is an online PDF viewer based on Amyuni PDF Creator as a server side component and a Silverlight viewer that runs within a browser. Amyuni PDF Creator takes care of converting a PDF file into an equivalent XAML-based package, and sends it to the Silverlight client. A full description of Amyuni PDF for Silverlight can be found in this page: http://www.amyuni.com/en/developer/pdfsilverlight.

This document will focus on how to provide AcroForm editing capabilities to your Silverlight application.

Reviewing our goals, we want to be able to:

  1. Show form fields as editable components in Silverlight
  2. Submit the values of those fields to the server (so that we can store them in a database for example)
  3. Put the values back in the PDF file.
  4. Send back the filled-out PDF to the client either as an editable form or as a flattened PDF.

Showing each form field as an editable component in Silverlight

When a PDF file containing form fields is converted into a XAML package by Amyuni PDF Creator, each text field will be converted into a TextBox XAML tag. This tag will be loaded as the corresponding editable component in Silverlight.

Example 1:

<TextBox Canvas.Left = "233.60" Canvas.Top = "242.69" Width = "215.27" Height = "37.13" FontSize="15.91" BorderThickness="0" Background="{x:Null}" Name="acField1">
<TextBox.Foreground>
<SolidColorBrush Color = "#000000" Opacity="1.00"/>
</TextBox.Foreground>
</TextBox>

Let’s first review the internal architecture of our Silverlight viewer sample, we have a library with a Silverlight control called PDFSilverlightControl where our XAML based packages are loaded from a URL provided, and we have a Silverlight sample application that is hosting this control.

In our PDFSilverlightControl sample class we have the property:

Example 2:

/// <summary>
/// Returns editable text fields from the PDF file.
/// </summary>
public List<TextBox> FormFields { get;}

This property can be used to retrieve the form fields in the Silverlight application.

Read the rest of this entry »

PDF Printing to the Cloud Using Amyuni™ PDF Converter

Mar 22 2012

By: Jose Pimentel – Amyuni Technologies

Cloud services such as Amazon S3, Google Cloud Storage, Google Docs, Dropbox, Box, Microsoft Azure and others are excellent repositories for document storage. Each of these services allows users to off-load document storage to the cloud. Although any type of document can be stored in the Cloud, it is often desirable to store all documents in the standard PDF format with all the benefits that come with using PDF. Converting documents to PDF and then uploading them to the Cloud is typically a two-step process that requires manual operations such as printing the document to a virtual printer and logging-in to web site to upload.

In this paper we will describe a solution for easily converting documents into PDF for storage in the Cloud in a single automated process.

Requirements (Server Side)

A Cloud service that exposes an API to allow developers to automate the tasks of storing and retrieving documents.

Taking a closer look at cloud services, we found a number of issues when trying to decide on a service to use.

-          There are really no “free” evaluation services.  Google Cloud Storage, Amazon S3 and Microsoft Azure services all require credit card information for evaluation.

-          Google Docs does offer a free evaluation but there is a one month time period.

-          Although both Dropbox and Box services offer free developer evaluation accounts, both of these applications require clients or users to first login to their website before file transfers occur. This breaks up the flow of the application.

In looking at the cloud storage services available we ended up focusing on Google Docs which is part of Google Apps for Business and Microsoft Azure (Blob Storage Service).

Requirements (Client Side)

When looking at the cloud storage printing solution we wanted to achieve:

-          We needed a tool to convert all user documents into PDF before sending them to the Cloud

-          We needed direct transfer or no client PC storage for safety and efficiency

-          We needed a solution that is easy to implement and use

-          We needed a high performance engine in order not to hinder the user’s workflow

The Amyuni PDF Converter responded to all our requirements. PDF Converter is a virtual printer driver that converts output sent to it from a printing application into PDF format. The printer driver which is certified by Microsoft for all 32 and 64bit editions of windows, offers the developer complete control over the printing process. The Amyuni PDF Converter product which is needed to run the sample application described in this paper can be downloaded from http://www.amyuni.com/en/enduser/pdfconverterend.

Implementation

The Amyuni PDF Converter printer driver API enables developers to intercept the datastream coming from the printer driver and handle it in their own custom application. The developer has the option to store the datastream locally, to a network drive or even to the cloud.

The intercepting of the datastream is accomplished by configuring the PDF Converter to call a custom DLL during the print job. This custom DLL will perform the “work” of uploading to the cloud.

Read the rest of this entry »

Android Security Issues - A By-Product of Using Open-Source?

May 25 2011

A lot of talk has been circulating lately about security issues in Android. Should anyone really be surprised to discover that an Open-Source system is not only open to legitimate developers but also to hackers? Is it reasonable to expect that a system developed and maintained by thousands of heterogeneous developers can be relied upon to behave reasonably well under all circumstances?

The concept of Open-Source is very appealing. Highly talented developers have created tremendous products and generously shared them with the rest of us. Individual developers are not at issue here. The issue is with the concept of building critical systems on an unsupported framework such as Android.

Having spent a good deal of time porting Android to our DevTouch Pro tablet (www.devtouchpro.com), I had the chance to take a deep look at the internals of Android and its underlying Linux kernel. I also had to support our team of developers in finding solutions to the myriad of issues that we faced.

Here are some of the difficulties that we encountered, that irremediably shook my belief that Android is a viable operating system:

  • The first major hurdle is that there is a split between the Linux Kernel and the Android Kernel. At some point in time, Linux Kernel developers decided to kick out Android developers for various reasons. Device developers ended up with two sets of source-code to deal with. Some functionality and fixes became available in one set but not the other.
  • The lack of centralized or properly maintained documentation is a real nightmare to both newcomers and experienced developers. Googling the Web trying to understand the source of an error or a crash produces tons of useless forum posts and mailing lists, outdated blog articles and incomprehensible developer jargon that never get you anywhere. To Google documentation for explaining the internals of the OS, or how to adapt it to a device, is either nonexistent or completely outdated.
  • On top of nonexistent documentation, there is no one to whom one can submit an issue or ask a question and expect a meaningful answer. Use at your own risk says the license, and the concept applies very well to Open Source Android.

Many developers have resorted to all kinds of hacks to resolve their issues - browsing through thousand of lines of source-code and applying workarounds here and there without ever knowing if there will be side-effects to the changes being made. The end result: Android phones that have to be rebooted 3 times a day, phones that refuse to start, applications that behave erratically and security issues that keep popping up here and there that make the headlines.

Many analysts have predicted a great future to Android. I am not sure these analysts have ever looked beneath the hood. I see Android as being doomed unless Google takes a serious approach to making it anything more than an experiment. Close down the code, do a complete review, charge a license fee, provide documentation and customer support. This is the only way that this system is going to survive.

Caveat Emptor!

Amyuni PDF Converter Benchmark Tested for True PDF Performance

Mar 22 2011

The results are in, and Amyuni comes in on top. For true PDF performance, the highly accurate and reliable Amyuni PDF Converter is the most efficient in its class.

Start developing with the fastest PDF conversion on the market, designed to perform in multithreaded and 64-bit Windows environments.

Benchmark Test Specifications (conversion settings common to all products):

  • All fonts partially embedded except for standard fonts
  • Jpeg compression of color images
  • CCITT compression of Black and white images


Amyuni PDFConverter 4.50

Avg. Seconds: 15 sec

Avg. Size: 1955 kb

Nuance PDF Converter Pro 7

Avg. Seconds: 23 sec

Avg. Size: 1878 kb

CutePDF Writer (uses GPL GhostScript 8.15)

Avg. Seconds: 32 sec

Avg. Size: 2666 kb

Adobe PDF (Adobe Acrobat X)

Avg. Seconds: 44 sec

Avg. Size: 2041 kb

Software:

Operating System - Win7 64 bit

File Format - Office 2010 Word.docx, 500 pages

Hardware:

64 bit, 1GB RAM, 2.80 GHz CPU

Get Started with Amyuni PDF Converter Developer Pro >

Or Download Amyuni PDF Converter Desktop Edition >

Note: The results of this test may vary depending on different system configurations.

© Amyuni Technologies Inc. All rights reserved. All trademarks are property of their respective owners.

PDF for Silverlight (Updated for Silverlight 3 and 4)

Jan 05 2011

Leveraging the power of Silverlight to view PDF documents and forms (Updated for Silverlight 3 and 4)

Using Microsoft Silverlight, developers can provide their users with content-rich web applications that are not limited to text and images, and which can now include complex graphics and better interaction with users. A useful add-on to Silverlight would be the ability to display high quality PDF documents that would be easily readable by the users as compared to displaying documents as Jpeg images. Now that PDF has become the standard format for document storage and forms processing in most corporations, we thought that Silverlight applications would benefit from the ability to natively serve PDF documents and forms.

In this paper, we will show how to use the Amyuni PDF components to dynamically view PDF documents within a Silverlight control. We will discuss how to create a Silverlight 3 control to display and interact with PDF documents. The same control can be used for viewing PDF, XPS or any type of document rather than just images. The documents would be located on the server and viewed by the client within a Silverlight object without having to download any files to the client. The framework that is presented can be easily expanded to add interactivity when the PDF files contain annotations or form fields.

Read full article with Code Samples >

View Silverlight Sample >


Amyuni Releases Customizable Touchscreen Tablet for Mobile Developers

Dec 02 2010

Amyuni Technologies Releases Customizable Touchscreen Tablet Designed for Mobile Testing and Development

New Mobile Application Development Tool Saves Developers and Managers Time and Money

Amyuni Technologies, a leading vendor of high-performance development tools announced today the release of the DevTouch Pro, a revolutionary software deployment tool designed for mobile application developers. The DevTouch Pro is a color touchscreen tablet designed to provide mobile application developers and product managers with a customizable development, testing, and deployment platform.

With the ever-increasing demand for mobile applications, the DevTouch Pro is uniquely positioned: Unlike other mobile application devices and platforms, the DevTouch Pro tablet is configurable, customizable, and most of all—open. With its 7-inch resistive touchscreen, built-in Wi-Fi™and Bluetooth® interfaces, and lightweight design, the DevTouch Pro is all about giving developers and product managers control over their product.

DevTouch

When asked about what prompted the development of the DevTouch Pro, Amyuni President/ CTO Dany Amiouny responded, “To introduce new mobile products, vendors are often left with limited options such as having to create their own costly prototypes or buy high volumes of poor quality devices often unsupported by their manufacturers, which often would mean working with pre-installed or proprietary device platforms. The DevTouch Pro is Amyuni Technologies’ answer to that problem, because it provides product managers and developers time-and-cost-saving benefits together in a single, mobile tablet solution.”

As a portable touchscreen tablet, the DevTouch Pro can be used in various professional field applications such as Health Care and Pharmaceutical or Home Consumer Devices,such as Personal Organizers, Educational Applications and E-book Readers. Capable of supporting custom installations of Windows CE, Android, and Linux operating systems, the DevTouch Pro is able to meet any mobile application development requirement.

“In today’s aggressive mobile applications market, innovative products are often not enough: When different mobile device vendors create similar products, the success one may have over another is sometimes just a matter of how quickly they reach consumers” said Amiouny. “Amyuni Technologies answers this problem with the DevTouch Pro; a mobile tablet device designed especially for small- and medium-sized mobile application vendors who want complete control over the development, testing, and distribution of their products.”

The DevTouch Pro is not only a solution designed for developers, but for product managers, too, who want to reduce the development costs and time-to-market of new mobile products. Made and distributed in North America, the DevTouch Pro is CSA-certified and features short-run tablet options, to give product managers faster, more flexible distribution capabilities. “We are very excited about the release of the DevTouch Pro,” Amiouny says. “We hope that it will be an invaluable tool for both developers and project managers alike.”

Visit www.amyuni.com to learn more about the DevTouch Pro.

Amyuni Announces Version 4.5!

Nov 08 2010

Amyuni Announces Version 4.5 of the Company’s High-Performance PDF Developer Toolkits for .Net and ActiveX

Widely Used Amyuni Solutions Version Release Includes Enhanced Accuracy, Performance and Rendering Improvements with optional OCR module

Amyuni Technologies, the leading PDF vendor for high-performance PDF development components for .Net and ActiveX applications, today announced the release of Version 4.5 of its range of tools for developers and end-users. Amyuni tools are used by thousands of industry-leading companies to integrate PDF conversion, processing and editing functionality into their applications. Amyuni introduces a wide range of new features designed to enhance accuracy and performance.

“With Windows 7 and 64-bit OS becoming the standards in the PC market, all the aspects of running under these environments have been reviewed and optimized.” said Amyuni President/CTO Dany Amiouny. “Several performance enhancements and rendering improvements have been added to the product suites.”

Amyuni Developer Pro Tools Version 4.5 Highlights

As the need for PDF integration into .Net and ActiveX continues, developers and IT managers frequently turn to Amyuni’s PDF technology, as it does not rely on external open source libraries. Building upon this foundation and the exceptionally high-performance of the products, Version 4.5 meets new demands in PDF processing and compatibility. Some of the new features include:

· Microsoft WHQL Testing and Certification for 32 and 64-bit Windows 2008 and Windows 7

· 64-bit Software Development Kits improve performance and compatibility with 64-bit applications

· Fully managed .NET assemblies enable integration with web applications

These new capabilities extend Amyuni’s position as the leading PDF vendor for .Net and ActiveX components. Customers can not only work with a proven technology that is easy to integrate, but also achieve performance and compatibility that many PDF companies simply cannot deliver.

“We are frequently asked what makes us different to other PDF vendors on the market – it is simply that we realize the challenges that come with PDF integration. Amyuni tools are continually kept ahead of current trends and meet new standards such as Certification for Windows 2008 Server, only take a few lines of code to implement, with quality online product documentation and most of all a dedicated team that promptly responds to customers’ questions and concerns. Version 4.5 provides a platform for integrating PDF that answers the individual developers’ needs, with our team of PDF experts there every step of the way” said Amyuni Customer Service Manager Jose Pimentel.

New Release includes new optional OCR Module

Amyuni has also expanded its developer tools product range including a new OCR module. “Our highly accurate OCR module can be either licensed independently of our other PDF Components or as an add-on to existing licenses. Offering developers further flexibility with licensing our tools.” said Amiouny.

All new versions and products are available for download along with free technical support throughout the trial period courtesy of Amyuni.

Visit http://www.amyuni.com or contact sales@amyuni.com to learn more.

About Amyuni Technologies Inc.

Amyuni Technologies provides developers with powerful, reliable software tools that facilitate high-performance document management. Our software tools are the PDF engines behind several leading business applications used world-wide. They are also important tools used in small businesses. Our products and quality customer service are a proven essential for software developers.

http://www.amyuni.com

Is XPS still relevant?

Sep 10 2010

A few weeks ago, I was visiting another software developer’s web site and was surprised to see: “New: Support for the XPS format.” I was quite surprised: XPS? Is anyone interested in XPS anymore?

Five years ago, the Amyuni team got very excited about XPS. I did some research myself and posted articles comparing XPS to PDF. Microsoft was heavily backing up XPS which was going to replace other document formats such as EMF or even PDF. XPS was going into printers, was going to become the universal Office document format, was going to revolutionize the document industry. A number of our partners were also very excited about XPS and everybody wanted that.

So 5 years ago, we developed an extensive library to generate and process XPS files along with our PDF library. We wanted to jump on the wagon before everybody else did. We even ported our library into Java to make it a multi-platform library and open up XPS to non-Windows developers.

Needless to say that XPS quickly became a commercial failure. After having drained much of our resources, XPS went into oblivion (Java also went into oblivion, but this is a different story.) Printer manufacturers never ported their RIP engines to support XPS. Microsoft scaled back its push on marketing XPS and never updated it (the specifications are still at version 0.9.) At one point, we even thought that XPS would not make it into Windows 7. Although our libraries still support XPS, we never brought any real enhancements.

A few months ago, we started seeing XPS picking up steam among developers. We had a few customers actually implementing XPS not only for testing but in real-life applications. And now we even see competitors wasting their energies on XPS. So what’s up with that format?

One thing that is helping XPS is the fact that the XPS printer is now installed on all Windows PCs. Even Windows XP service packs add the XPS printer to the system. This makes it very easy for application developers to create an XPS and convert it into other formats or do their usual document processing with it (archiving, printing, emailing, …) Another fact that is helping is that PDF lost its initial purpose of being a universal document representation format. With all the interactivity, dynamic features and numerous changes that were made to the PDF specifications, it is difficult to pretend today that PDF can be used for accurate document representation. XPS also has much better support for any document that involves transparencies, gradients, translucencies or semi-transparent colors (alpha channels.) Saving your great Powerpoint presentation to XPS is sure to give you a better representation than saving it to Postscript or PDF.

So let’s wait and see. A minor upgrade to our XPS library is coming in a few weeks. Maybe all the efforts that went into XPS will bear their fruits one day.

Dany Amiouny is the CTO for Amyuni Technologies
www.amyuni.com

Buggy PDF Files, should we try to fix them?

Aug 16 2010

Very frequently we come across malformed PDF files. These files view just fine in Acrobat(r) Reader but fail to load with our tools and other third-party tools. This has become a real nightmare for PDF developers. From the customer’s view, the PDF file opens with Acrobat Reader, so it has to be a perfectly valid PDF and the customer does not care about what happens in the background.

Here is one example of a situation that we encountered very recently. The PDF file is generated from a well known scanner brand whose manufacturer would probably sue us just for mentionning their name. At the end of every PDF file, there is a cross reference table that tells the PDF consumer (reader or processing engine) where the various parts of the PDF are located within the file. To locate the cross reference table, the consumer looks for the “startxref” entry towards the end of the file. Here is what this entry looks like in our problematic PDF file:


startxref
101806
%%EOF

The PDF consumer goes to the location 101806 in the file and expects to find a cross reference table that looks like this:


xref
0 153
0000000000 65535 f
0000101369 00000 n

Again, this table provides the location of each object within the PDF file. In the case of our buggy PDF, location 101806 points to a random location in the file that contains:

+1!I`˯º0îd{%þ¡µÛ‘<ÛN÷I,w\û

So how is Acrobat Reader opening the file? It actually displays a very brief warning when opening the file and then rebuilds the whole xref table by going through all the file. On most systems with Acrobat Reader already launched, the warning is so brief that users do not even notice it. There are many inconveniences and risks in doing this:

  1. If the file is fairly complex, rebuilding the xref table is time consuming and might fail for compressed objects.
  2. PDF files can be incrementally modified, which means the original information remains intact and new objects added to modify, add or delete things that existed in the original PDF. This is done by creating an updated cross reference table. A funny but dangerous thing might happen: The viewer might retrieve the old PDF data rather than the updated one, so if the user had deleted something from the PDF, the viewer might actually display the deleted information.
  3. The startxref might be valid, but the xref table itself contain invalid entries. So the problem does not appear when opening the file but only later on when scrolling through the document.

Explaining all this to a customer usually results in negative reactions such as “why do we care when the file was generated by this multi-billion-dollar corporation and is processed correctly by Adobe?” So what is the solution? Try to convince Adobe that invalid files should be rejected, or at least really warn the users? But then, some of Adobe’s own files have similar issues, so how could they explain this warning appearing on their own PDFs?

This is only one example of badly formatted PDFs that we come across. Our position has always been to inform our customers, try to fix the invalid PDF and generate a warning to the developer. But this has been going on for way too long with no end in sight.

Dany Amiouny is the CTO for Amyuni Technologies
www.amyuni.com

Amyuni named in 2010 SD Times 100

Jun 23 2010

Amyuni Technologies Blog
Amyuni Technologies has been named in the SD Times 100 under the Components & Libraries category.

The SD Times 100 recognizes top innovators and leaders in the software development industry.

2010sdt100_logo_120x1241

Alex Furness is the Marketing Director for Amyuni Technologies
www.amyuni.com