Technical FAQs
In this tutorial, you’ll learn how to configure a Java project for a console application. You’ll also learn how to open a PDF and save as a new file.
-
- Make sure that you have installed JDK and ImageGear for Java PDF properly. See System Requirements and Installation. You will need to copy a sample.pdf file inside the directory where you will be creating the tutorial sample.
- Create a new Java file, and name it (e.g., MyFirstIGJavaPDFProject.java). Insert the following code there:
import com.accusoft.imagegearpdf.*;
public class MyFirstIGJavaPDFProject
{
private PDF pdf;
private Document document;
static
{
System.loadLibrary("IgPdf");
}
// Application entry point.
public static void main(String[] args)
{
boolean linearized = false;
String inputPath = "sample.pdf";
String outputPath = "sample_output.pdf";;
MyFirstIGJavaPDFProject app = new MyFirstIGJavaPDFProject();
app.loadAndSave(inputPath, outputPath, linearized);
}
// Load and save the PDF file.
private void loadAndSave(String inputPath, String outputPath, boolean linearized)
{
try
{
this.initializePdf();
this.openPdf(inputPath);
this.savePdf(outputPath, linearized);
}
catch (Throwable ex)
{
System.err.println("Exception: " + ex.toString());
}
finally
{
this.terminatePdf();
}
}
// Initialize the PDF session.
private void initializePdf()
{
this.pdf = new PDF();
this.pdf.initialize();
}
// Open input PDF document.
private void openPdf(String inputPath)
{
this.document = new Document();
this.document.openDocument(inputPath);
}
// Save PDF document to the output path.
private void savePdf(String outputPath, boolean linearized)
{
SaveOptions saveOptions = new SaveOptions();
// Set LINEARIZED attribute as provided by the user.
saveOptions.setLinearized(linearized);
this.document.saveDocument(outputPath, saveOptions);
}
// Close the PDF document and terminate the PDF session.
private void terminatePdf()
{
if (this.document != null)
{
this.document.closeDocument();
this.document = null;
}
if (this.pdf != null)
{
this.pdf.terminate();
this.pdf = null;
}
}
}
- Now, let’s go over some of the important areas in the sample code with more detail. The com.accusoft.imagegearpdf namespace:
- Allows you to load and save native PDF documents
- Allows rasterization of PDF pages by converting them to bitmaps and adding raster pages to a PDF document
- Provides multi-page read and write support for the entire document
To enable the com.accusoft.imagegearpdf namespace in your project, specify the following directive:
import com.accusoft.imagegearpdf.*;
To initialize and support processing of PDF files we need:
// Initialize the PDF session. private void initializePdf() { this.pdf = new PDF(); this.pdf.initialize(); } - There is one main object that is used in this sample code: The Document that holds the entire loaded document.
private Document document; … this.document = new Document(); this.document.openDocument(inputPath);
- You can save the loaded document using:
SaveOptions saveOptions = new SaveOptions(); // Set LINEARIZED attribute as provided by the user. saveOptions.setLinearized(linearized); this.document.saveDocument(outputPath, saveOptions);
See About Linearized PDF Files for more information.
- Now, you can build and run your sample. Please make sure that you have a PDF file named sample.pdf in the same directory where your sample source resided, or change the inputPath in the sample code so that it points to any existing PDF file.
- Now, open the terminal in the directory containing your source file and run the following commands:
- Compile
javac -classpath $HOME/Accusoft/ImageGearJavaPDF1-64/java/IgPdf.jar MyFirstIGJavaPDFProject.java
After running this command, you should see a file named MyFirstIGJavaPDFProject.class in your current directory.
- Build
jar cfe MyFirstIGJavaPDFProject.jar MyFirstIGJavaPDFProject MyFirstIGJavaPDFProject.class
After running this command, you should see a file named MyFirstIGJavaPDFProject.jar in your current directory.
- Set the environment variable (you only have to do this one time)
export LD_PRELOAD=$HOME/Accusoft/ImageGearJavaPDF1-64/lib/libIGCORE18.so
- run
java -classpath $HOME/Accusoft/ImageGearJavaPDF1-64/java/IgPdf.jar:. MyFirstIGJavaPDFProject
- Compile
After running your sample, you should see a new PDF file, named sample_output.pdf, in your current directory.

Image viewing technology for web pages and apps has made huge leaps in recent years. Self-contained viewers that work on all browsers and platforms represent a simplified method of displaying images and documents. And given the increasingly complex graphic user interfaces of today, these new tools are needed more than ever. HTML5 viewers are the answer.
When <img> and <a> aren’t Enough
There are several basic methods for developers to display images in websites and apps. tags, of course, have been around since the beginning and are unlikely to go away given their simplicity, just like basic links that allow for the downloading of images from a page.
But most image image formats (other than JPG, GIF, and PNG) aren’t supported across all web browsers. Image files such as BMP, TIFF, and CAD cannot be reliably viewed via the tag in all web browsers. This leads to potential frustration for end users, who don’t want to have to manually request a download for an image. This is a nuisance and makes them less likely to return.
Flash vs HTML5
Adobe’s ubiquitous Flash Player has been another hugely popular option, but the company has announced it will end support of Flash in 2020. Few in the tech world, of course, were surprised by this development due to the advent of HTML5, which signaled the beginning of the end for Flash and its substantial processing overhead, back in 2014.
There are a number of reasons HTML5 viewers quickly replaced Flash as the ideal medium for the Web, but most prominent is their flexibility. HTML5 viewers support essentially all major programming platforms and web browsers, including mobile devices.
Benefits of an HTML5 Image Viewer
Supports a wide range of file types
A robust HTML5 viewer also supports file types both abundant (PDFs and JPGs, for instance) and relatively obscure, such as extremely high-resolution DICOM medical images and CAD drawing files.
This flexibility also means that multiple documents (Microsoft Office files such as spreadsheets, Word documents and PowerPoint data files, etc.) can all be opened within a single application that features the HTML5 viewer. This saves RAM, makes operations more efficient and reduces the need for licenses to use the various software packages involved.
Protects Ownership and File Integrity
Displaying documents and files within a single web-based viewer also gives developers greater control over the information being displayed, a key concern for many organizations. Developers can configure the viewer to restrict downloading, printing, or editing files based on the permissions of the individual user. Clients are always looking for ways to enhance data security, and the fewer applications that access that data, the better.
Saves on External Software Costs
If your organization is purchasing software licenses (for packages such as Microsoft Office or AutoCAD) for every employee who needs to view files, an HTML5 viewer can reduce costs significantly. Rather than purchasing licenses for each user, simply integrate an HTML5 viewer into your system and every user can view any file – without needing any additional software licenses!
Allows Annotation
Another important feature that has made HTML5 viewers popular for users is annotation. This facilitates the collaboration process by allowing multiple users to mark up a document or image with comments or graphics, emphasizing specific areas of interest for the group.
Supports Search, Redaction, and eSignatures
Other user-friendly traits of HTML5 viewers commonly include search, redaction and electronic signature functionality. The ability to search large files (and catalog results) is a common request of users, as well as the option to hide sensitive data such as financial and health information. The need to have users acknowledge viewing and understanding terms of a document gave rise to the eSignature process that modern viewers also offer.
Improved Image Viewing with Zoom
HTML5 viewers make for a positive user experience for more basic reasons as well. Their zooming function makes images and documents easier to read or to discern fine details, a huge benefit for medical and engineering applications. A modern viewer also enhances the professional look and feel of any web page or application.
Image Enhancement Functionality
Advanced viewers also aid in the refining of images, an important consideration for physicians, construction engineers and other professionals. Line thickening, for instance, is an innovation especially helpful for CAD and other vector-based images. Color sharpening and gamma adjusting, which can enhance faint images such as low-quality scans, are also features of an HTML5 viewer that were previously unavailable.
Not all applications call for the power and versatility of an HTML5 viewer. Older methods of presenting images and documents are often sufficient for basic web use. But client demands are routinely becoming more complex, particularly in the management of large sources of information and the introduction of more and more industry-specific file types that challenge old methods of data presentation. Banking institutions and architecture firms, for instance, need the extensive functionality that the newer generation of viewers provides, as their data volume and niche-specific file types have made older viewing practices obsolete.
To learn more about Accusoft’s flagship HTML5 viewer, PrizmDoc, try our free trial or view the demos of all the functions discussed above available on our site. And contact us with any questions or comments you have about this powerful modern viewer.
Accusoft sheds light on document management practices in today’s workplace through a new data study
TAMPA, Fla. — Sept. 29, 2016 — Accusoft, the leader in content and imaging solutions for developers, , released a data study uncovering standard workplace practices around document management. The report addresses common document management policies and offers solutions to create a more efficient, secure workflow.
More than 100 U.S. IT managers and 250 full-time employees were surveyed to reveal what document management challenges organizations face, and how these needs are addressed.
It’s important for us to understand where companies are struggling when it comes to document management,” said Accusoft CEO Jack Berlin. “Accusoft sets out to help solve those problems, and by gathering data around these challenges, we can continue to create tools that address top business challenges and enhances the document lifecycle process.
Key findings from the study include:
The study also takes a look at the growing use of mobile devices in the workplace and what this means for document management and security. According to Accusoft’s findings, 74 percent of organizations have implemented some form of a bring your own device (BYOD) policy, but only half of this group require that employees have their devices approved by the IT department. As more employees move toward mobile, IT departments have a growing need to create adaptable and secure processes.
“Our ultimate goal is to improve business productivity,” said Berlin. “In the study, we offer actionable solutions for organizations to fix broken processes and ensure document security.”
To learn more download the full study.
About Accusoft
Accusoft offers a robust portfolio of document and imaging tools created for developers. Our APIs and software development toolkits are built using patented technology, providing high-performance document viewing, advanced search, image compression, conversion, barcode recognition, OCR, and other image processing tools for use in application and web development.

The COVID-19 crisis has permanently changed the way banks do business. While many financial firms were already shifting away from brick-and-mortar branches toward both mobile and digital alternatives, pervasive pandemic priorities required a rapid shift in physical presence — forcing companies to rapidly react with remote work alternatives.
Some — such as JPMorgan — were already prepping for potential shifts in early March, deploying a pilot project that saw 10% of its 125,000 employees working from home. Banks like BMO, meanwhile, have embraced the new normal. The company says that around 36,000 staff members may permanently split their time between home and corporate offices.
While this focus on employee efficacy and engagement is critical, productive people aren’t the only element of remote work success. Security and speed are two of the qualities that consumers now expect across all key banking functions, and firms must prioritize digital processes that streamline these processes without compromising financial requirements.
But what does this look like in practice? How do organizations handle document management, process automation, and employee collaboration at a distance — without breaking the bank?
Facing Financial Frustrations
When work-from-home went from “maybe” to mandate, Deutsche Bank found itself racing to keep up. With just a few thousand out of its 90,000-strong workforce already working remotely, the firm was under pressure to scale capabilities quickly — from reimbursing staff for device purchase to rolling out video conferencing tools for more than 50,000 employees in less than two weeks, the bank has been under pressure to deliver remote work processes that deliver both continuity and compliance.
With finance firms historically lagging on technology adoption, however, this presents a significant problem. While cloud-based communication and collaboration tools are now commonplace — and can be readily adapted to work-from-home environments — the tools and tech necessary to underpin key financial functions are often tied to in-house server stacks and legacy applications.
This creates a digital disconnect. While staff may have access to corporate networks, many of the secure document management and financial processing solutions they need to complete day-to-day operations simply weren’t designed to operate at a distance. Security accounts for part of this separation — regulatory control is critical for banks to ensure client privacy — but many banks have also focused on familiarity over functionality, adopting a “good enough” approach to cumbersome, on-site applications. As a result, firms now face financial frustration across critical workflows, including:
- Consumer Vetting — How do banks effectively evaluate potential client credit histories and financial foundations to deliver tailored service recommendations at a distance? Insecure credit or personal data access could have significant regulatory and legal repercussions.
- Credit Approvals — Necessary credit checks require secure connections and the assurance that data won’t be subject to theft or man-in-the-middle attacks.
- Loan Applications — Bank staff must complete complex forms at a distance and firms must ensure work-from-home employees have the tools they need to handle multiple file formats.
- Account Management — Opening, closing, and modifying account information requires secure access and the ability to share key documents with specific data removed or redacted. Financial data shared outside secure workflows could result in compliance failures.
Solving for Scale
While many big banks are preparing partial return-to-work strategies or ramping up remote work solutions, smaller financial firms don’t have this luxury. The scale of large enterprises affords bigger budgets for IT management and deployment, giving them a deeper pool of resources to pull from when deciding how best to support staff and systems at a distance. From in-house IT teams capable of creating custom-built apps to legacy software solutions that can be updated to work with new collaboration tools, the scale of big banks offers a marked advantage.
For smaller financial firms with the bulk of their workforce already at home and a return to the office unlikely in the near future, fragmentation is the familiar framework. Many SMEs now use multiple document management applications to streamline key processes — but these apps don’t always work well together.
In the office, this doesn’t pose a significant problem — staff might lose time switching between software tools or moving data across digital divides — but at home, access and agility are both restricted. This becomes more complicated thanks to the rise of multi-cloud computing. While purpose-built cloud services empower small banks to keep pace with their enterprise counterparts, they introduce complexity as access points both multiply and diversify.
Driving Digital Dividends
To drive digital dividends at a distance, smaller banks are well-served by the implementation of advanced software development kits (SDKs) and application programming interfaces (APIs). These tools make it possible to integrate advanced functionality into existing apps without compromising the security of critical banking data. To deliver remote work potential, firms need SDKs capable of:
- Collaboration — Integrate key collaboration functions including in-app document viewing to enhance data security, easy annotation and commenting options to ensure all staff are on the same page for multi-step application or approval processes, and burn-in redaction to enhance the protection of client or corporate data.
- Conversion — As complex, compliance-heavy processes such as loan applications, credit evaluations, and financial investments move to remote, on-demand models, banks need no-touch data processing that makes it possible to view multiple file types — including familiar Word and Excel files along with more specialized image formats — and convert these files to PDF documents for easy search.
- Capture — Automated data capture, field recognition, and forms processing not only reduce the amount of time staff spend creating new forms and completing current applications, they also reduce the risk of human error. Enable your team to take complete control of document management functions with powerful character recognition, scanned document cleanup, and form identification — all from within your own application.
The “new normal” for banking relies on digital services. Advanced SDKs and APIs make it possible for firms to succeed over both time and distance by delivering comprehensive collaboration, conversion, and data capture without breaking the bank.

Goal
Create a Visual Basic (VB.NET) program that can generate a barcode in VB.NET from an existing table of data to represent shipping orders, then read single or multiple barcodes from image files to represent receiving orders.
Requirements
- Microsoft Windows 7 or greater
- Microsoft Visual Studio 2015 or greater
- Accusoft Barcode Xpress .NET
Programming Skill
Visual Basic Intermediate Level
Need to create a barcode generator and reader in VB.NET? Accusoft Barcode Xpress is a barcode generator and reader library that supports over 30 different types of barcodes, and can accurately read barcodes even when they are damaged or scanned at low resolution. In this tutorial we’ll create a simple order shipping and receiving example to demonstrate creating and reading barcodes in VB.NET.
VB.NET Barcode Generator/ Reader Sample Code
You can download the Visual Basic sample code here. Note that you’ll also need to install a free evaluation copy of Barcode Xpress .NET on your machine.
Getting Your Project Set Up
For this example we’ll use Microsoft Visual Studio to generate our project files. After installing the Barcode Xpress .Net SDK, start a Visual Basic project. In order for this program to be properly generated, make sure that the Framework System.Drawing, and the Extension Accusoft Barcode Xpress 12 .Net are added to the project. The easiest way is to right-click on References in the Solution Explorer in Visual Studio, then click on Framework to select System.Drawing.
Then Click on Extensions and select Accusoft Barcode Xpress 12 .Net.
In the code for your Visual Basic project, place the following commands to import the libraries into your code:
And with that, let’s get coding!
Getting Started with Data
For this example, we will assume an environment where orders are being tracked in a database. To represent this, we can use a simple table to represent orders that need to be tracked for shipping and verified that they were received. For our example, the following data is generated:
For this example, we’re going to work under the assumption that Order Numbers are unique values.
Generating Barcodes In VB.NETData
To track shipments, we can generate barcodes that that would be attached to the shipping label. With Barcode Xpress, that’s a simple task. First, we’ll have our program look through the shipping table and any orders that haven’t been shipped (shipped is False), take the shippingOrder field and give it to our GenerateBarCodes function:
The GenerateBarCodes function leverages Barcode Xpress. Barcode Xpress supports a plethora of barcode types – you can check them all out at https://help.accusoft.com/BarcodeXpress/v12.0/dotnet/webframe.html#Supported_Barcode_Types.html . For this example, we’ll use the Code 39 standard to generate our barcodes.
Here’s how we actually create our BarcodeExpress object and update the options:
What we’ve done here is create our BarcodeXpress object, set it to the Code39Barcode standard, and then set the barcode value to the current shippingOrder value. All that’s left is to generate the barcode image itself and save it to a file. After that, the files can be used however we want – print them out as labels, embed them in documents – whatever works best. We can leverage the Visual Basic object System.Drawing.Bitmap to do that for us.
That’s it! A few lines of code, and when we call the GenerateBarCode function with a shippingOrder that equals A123456, here’s the result:
In the case of our sample program, it takes a few milliseconds to generate the barcode files and be ready for shipping. Our function returns a boolean value if it’s successful, and our code then sets “shipped” to true and sets the date and time in our table of data.
Reading/Scanning Barcodes In VB.NET
So we’ve generated our barcodes to send out our shipments. But what about receiving them? Using the same Barcode Xpress object, we can have the system scan in the barcodes, get the data from the barcode, look the order up in our table, then update the table to show the order was received and what time it occurred. Depending on how we receive the images will depend on your setup – but for this example we’ll just manually set a couple of files to test it out.
Here’s a simple example using one of the barcode files we generated:
Our program has a command line switch. If you run it without any command line options, like this:
Then you’ll just have the barcode files generated off of our table. Run it like this, though:
Where “imagefile” is a bitmap image with our barcode inside (such as, for example, the “C266760.png). We’ll pick this up from our Main program like so:
Now we can scan our file with this command:
What we can do is generate an array of Accusoft.BarcodeXpressSdk.Result objects, then extract the values from there. The function ReadBarCodes can be called via this method:
The function starts by taking the filename submitted to it, loading it into a Bitmap object, then using the same BarcodeXpress object. Only this time, instead of creating a barcode image, it can read from the bitmap image, and store the results into the Result object:
Scanning the barcode above will return an array with just one value in it – the barcode data for shipment C266760 from our example, and we can update our table of values to show this order was received and the date/time we scanned it:
But what if we have more than one barcode in our image, like this one:
Not only do we have multiple barcodes – but looks like someone slapped on one of them at an angle. This is included in the sample as “received_002.jpg”.
Angled barcodes? Not a problem. In fact, we can test this by displaying the table before and after scanning the file:
Success!
Even the one that was at a different angle was detected accurately. Barcode Xpress can handle scanning barcodes in a variety of standards and formats, from multiple angles and even when the image has been degraded.
Ready to get started?
Check out the Accusoft Barcode Xpress free trial at https://www.accusoft.com/products/barcode-xpress-collection/barcode-xpress/ and give it a try. Not into Visual Basic or .Net? That’s fine – there are versions for Java, Linux and even your favorite mobile devices.
Healthcare companies and providers have to keep up with technological trends in the industry in order to best serve their patients.

Greenway Health, a health information technology (HIT) company, helps healthcare facilities do just that by providing a single-source integration ambulatory information solution that encompasses all health IT and revenue cycle services. The company partners with nearly 10,000 organizations and 75,000 progressive providers, enabling them to successfully navigate the ever-changing healthcare industry and make patient-driven care a reality.
Today, we are going to take a closer look at how Greenway Health integrated Accusoft’s DICOM SDK, ImageGear Medical, with their applications to address the needs of their customers while cutting down on development costs and focusing on their core business.
Greenway’s Challenges
When medical practices began to move toward digital processes, Greenway Health’s Medical Manager product was one of the first practice management systems on the market. The company anticipated the shift to electronic information management and decided to build a document imaging solution into Medical Manager, which was a predecessor to their Intergy product.
The team wanted to focus on developing practice management tools that would help their clients comply with industry regulations. Rather than putting their efforts toward maintaining support for a wide variety of file types, they looked for a solution that would allow them to stay focused on what’s important.
The Accusoft Solution
The Greenway team was looking for a solution that could handle most types of images as well as diagnostic images. After researching potential solutions, they chose ImageGear Medical SDK. The team was able to seamlessly integrate the DICOM SDK into Medical Manager and Intergy out of the box.
As Greenway Health continues to help providers meet meaningful use stage 3 requirements, they rely on Accusoft’s innovative technology for support. Accusoft’s licensing model makes it simple for Greenway to provide their customers with a valuable product without getting caught up in licensing restrictions.
A Positive Outcome
After integrating Accusoft’s DICOM SDK, Greenway Health was able to focus more on their core business of helping workflows in the practice without having to worry about document and image viewing. In addition, the company saved development time, speeding up the time to market.
Want to learn more about Greenway Health and how they used Accusoft’s solutions to provide better products for their customers? Read the full case study.
If you want to learn more about ImageGear Medical, our DICOM SDK, visit our product page and download a free trial today.
