Wednesday, July 1, 2009

Solid Framework now does PDF/A

Solid Documents provides a free online PDF/A Validation service that uses our recently released Solid Framework v6 SDK behind the scenes. Solid Framework is now available through an enterprise licensing model. The Tools and Professional levels include PDF/A Validation and PDF to PDF/A conversion functionality.

The PDF/A Competence Center has a test suite for validating PDF/A Validators called the Isartor Test Suite.

Evaluate for Yourself

An easy way to test drive our PDF/A Validation technology is to download the Isartor Test Suite (4MB ZIP) and then simply submit this ZIP file to our online PDF/A (ISO 19005 -1) validation service.

The online service will validate all 205 files in the ZIP and e-mail you an XML report, in Open Compliance Report format, containing the PDF/A violations found in these file. All of the 205 files should exhibit errors, including the Isartor Test Suite Manual.

1. Download isartor-pdfa-2008-08-13.zip from http://www.pdfa.org/
2. Go to http://www.validatepdfa.com/ and step through the wizard.
3. Attach isartor-pdfa-2008-08-13.zip to the e-mail.
4. Sit back and wait for the response from our free validation service.
5. Examine the report to confirm that our PDF/A Validator is 100% compliant.

Monday, September 15, 2008

Convert PDF files to DOC Programmatically using ASP.NET

One common topic in e-mails we receive is whether Solid Framework can be used in a web application or not.

Solid Framework can be integrated into an ASP.NET project. A simple example how this might work is below:


(screen shot from the sample project)

This page provides the means for the end user to select a PDF file they wish to convert to DOC, select several conversion options and then type in their contact details so that the result may be e-mailed back to them. Clicking the Convert PDF to DOC button starts the upload and conversion process.

You can download the sample ASP.NET project [zip file] to see this in action for yourself. Those without Microsoft Visual Studio 2008 can use Microsoft Visual Web Developer 2008 for free to work with the sample project.

Most of the project is implementation and doesn't require careful study. Two sections you'll likely want to look at in the C# code-behind file are below:


This creates a new PdfToWordConverter object that you'll use to convert the PDF file to DOC. It checks the properties of several server controls on the page and sets the converter object's properties based on their values and then converts the file.


This code creates a new MailMessage, attached the converted DOC file, creates a new SmtpClient, attaches the message and sends it. Those wanting to modify this should look at the MSDN documentation for the System.Net.Mail namespace.

Configuration of the outgoing mail server settings (among other things) can be done in the web.config file in the project.

Assuming that you're using the default syntax highlighting in Microsoft Visual Web Developer just look for the friendly green comments in the web.config file for instructions. If you've configured the syntax highlighting to use an unfriendly color for comments we apologize in advance.

Note: Solid Framework is sold and licensed as a royalty-free SDK. Please review the Solid Framework licensing conditions and contact us if you need clarification.

Have any thoughts that you'd like to share? Please contact us with your feedback.

Tuesday, August 12, 2008

Using Watched Folders to Convert PDF files to PDF/A with Solid PDF Tools

Our last blog post showed how to write a command line application that watches a folder for PDF files and converts them to DOC. Due to the flexibility of scripting Solid PDF Tools Scan to PDF we can adapt this to other needs very easily.

For example, say you want your watched folder to convert PDF files to PDF/A-1b. Why would you want to convert PDF files to PDF/A? Because converting to and validating PDF/A files will help to ensure that they are archivable and will display the same now as they will in 40 years.

With a few minor changes to the script you now have a program that watches for PDF files and converts them to PDF/A:



The rest of the changes in the PDFAWatcher project [zip file] are just in implementation (e.g. checking to see if the folders that the original and converted files will be placed in exist and creating them if they do not).

If you want to adapt this project for your own needs you may wish to look at our scripting reference and our first post on scripting using Solid Documents software.

Monday, August 11, 2008

Using Watched Folders to Convert PDF files to DOC with Solid PDF Tools

Using the scripting functionality of Solid PDF Tools Scan to PDF to watch a folder for PDF files and automatically convert them to DOC is fairly easy.

Microsoft provides a .NET class in System.IO called FileSystemWatcher which takes care of watching a folder. Any time a PDF file is moved or copied into the watched folder an event will be raised. Add an event handler to run a script with Solid PDF Tools and you're done (this is a simplification, but most of the other work is just implementation).

We have created a C# project [solidwatcher.zip] which provides a good example of how to do this in a command line program. A basic outline of the project is below:



There are two main sections. The first is the Main() method that is run when you run the program (solidwatcher.exe). The second is the event handler that handles events that are raised when files are copied into the watched folder.

There are about fives lines of code in the Main() method that you need to understand. The highlighted code below shows creating the FileSystemWatcher object and getting the path for the watched folder from the first argument on the command line.



The highlighted code below allows us to filter based on file name (anything ending in .pdf in this case). The next highlighted section lets the end user running the program know that it is running and loops until they press the 'q' key and enter.



Although the event handler in the project is over twenty lines of code, you really only need to understand three of them (highlighted below) to understand what is going on.

First, we make the script. After that we create a new SolidScript object and run it's RunScript method with the script you just created.



If you're new to scripting Solid PDF Tools you may wish to look at our scripting reference and our first post on scripting using Solid Documents software.

Tuesday, July 29, 2008

Better PDF to DOC Conversion with Solid PDF Tools using Wildcards

The C# project that we wrote about last week is very informative, but it isn't perfect.

One commonly used feature in command line applications are wildcards. For example, one might want to use the command below to convert all of the PDF files in the temp folder to DOC using Solid PDF Tools Scan to PDF:

TestApp.exe /i "c:\temp\*.pdf"
Supporting this requires a few changes in our application (a foreach loop among other changes):



This provides us with all the values we need to run through the script below:



We've made a few other improvements to the project as well (download here). After you build it with Visual Studio or Visual C# Express 2008 you can run the resulting TestApp.exe with -h as an argument to see all the new options.

If you need to change the sample script we recommend that you read our first post on scripting using Solid Document software and our scripting reference [pdf file].

Any thoughts or ideas? How do you use this in your work and how would you like to use it? Contact us with any or all of your feedback.

Wednesday, July 23, 2008

Command Line PDF to DOC Conversion Using Solid PDF Tools

Earlier we talked about using a C# class library to allow you to use the scripting functionality of Solid PDF Tools Scan to PDF from the command line:



We've written a C# project [zip file] using some of the above code that demonstrates this. The compiled program from this project allows you to convert a PDF file to DOC and provides a few additional options (whether to log, provide a verbose output, etc.). Running it from the command line with -h as an argument will display all of the options you can use with it.

If you're not using Visual Studio and wish to compile it yourself we'd recommend using Visual C# Express 2008.

If you need to change the sample script we recommend that you read our first post on scripting using Solid Document software to get a better idea of how to modify this to suite your needs. Our scripting reference [pdf file] is another great source for information on how to do this.

Have any thoughts that you'd like to share? Please contact us with your feedback.

Wednesday, June 25, 2008

C# Class for Parsing Command Line Arguments

The ability to automate Solid PDF Tools Scan to PDF via scripts is very powerful, but there may be times that running it directly from the command line is needed (We're sure a couple system administrators are nodding their heads right now).

Users who need to automate repetitive tasks may want to take a look at this C# class library posted at the Code Project (thanks to Richard Lopes for writing the library).

The post shows how to use the class library with C# to parse, store and retrieve the arguments from a command line .NET application. This, when combined with the various ways you can automate PDF conversions using Solid PDF Tools allows you to create custom tools to suit your needs.

Have any great ideas or code that you'd like to share? Please contact us with your feedback.