Compare PDF and CAD Drawings Automatically with scConverter
Add automated document comparison to your application. scConverter compares supported technical file formats, highlights added and removed content using customizable colors, and saves the result as a PDF, PNG, or TIFF file.
Use the scConverter API to Compare Files
The scConverter SDK can automatically compare PDF files, DWF drawings, CAD files, TIFF images, Gerber files and many other technical document formats. The comparison engine highlights added, removed and unchanged content using customizable colors and can save the result as PDF, PNG or TIFF.
What scConverter Document Comparison Does
scConverter compares two input files and creates a visual output file showing the differences between them. For example, when comparing two PDF drawing revisions, removed content can be displayed in red and new content can be displayed in blue. Unchanged content can be displayed in black, gray or hidden completely.
The comparison result can be saved to several output formats, including PDF, PNG and TIFF. This allows the result to be archived, reviewed, printed, emailed or included in an automated document workflow.
Available Comparison Functions
scConverter provides two main API functions for file comparison:
- SaveCompareResult
Compares two files and creates an output file containing the visual comparison result.
You can define the colors used for old and new content. - SaveCompareResultEx
Compares two files and creates an output file containing the visual comparison result.
This extended method also lets you define the color used for unchanged content.
In this small tutorial you will find out how you can use these two functions create a PDF comparison.
Compare two PDF files
The following example compares two PDF revisions and creates a new PDF file that highlights all changes. Deleted or old content is drawn in red, while added or new content is drawn in blue. Unchanged content is drawn in black.
scconverter.SetSerialNumber( "Your serial number" ); scconverter.PDFWriteFormat = 0; //Output standard editable PDF scconverter.SaveCompareResult( "compare_revA.pdf", "compare_revB.pdf", "output.pdf", "PDF", 0x000000FF, 0x00FF0000, 200 );
In this example, the comparison is created using a resolution of 200 DPI. A higher DPI value may improve output quality, but it will also increase memory usage and the size of the generated output file.
The PDF file created by our code will look like the following:
Make Unchanged Content Easier to Ignore
If the drawing or document contains a lot of content, it may be difficult to see the actual changes immediately.
In that case, you can use SaveCompareResultEx and draw unchanged content in a lighter color.
scconverter.SaveCompareResultEx( "compare_revA.pdf", "compare_revB.pdf", "output2.pdf", "PDF",
0x000000FF, 0x00FF0000, 0x00D0D0D0, 200);
This code will create a output PDF file named "output2.pdf" as shown below:
Show Only the Changed Content
For some workflows, you may want the output file to show only the differences between the two files. This can be done by setting the unchanged content color to white.
scconverter.SaveCompareResultEx( "compare_revA.pdf", "compare_revB.pdf", "output3.pdf", "PDF",
0x000000FF, 0x00FF0000, 0x00FFFFFF, 200);
This code will create a output PDF file named "output3.pdf" as shown below:
Compare More Than PDF Files
Although PDF comparison is a common use case, scConverter can compare many other file formats supported by the SDK. This is useful when working with technical drawings, engineering documents, image files, PCB manufacturing files or mixed-format document archives.
Supported comparison input formats include:
- PDF files
- DWF and DWFX drawings
- TIFF image files
- HPGL and PLT plot files
- CGM files
- Gerber PCB files
- PNG and JPEG image files
- Other CAD, vector, raster and technical document formats supported by scConverter
Typical Use Cases
Engineering Revision Comparison
Compare two versions of a technical drawing and highlight what has changed between revisions.
PDF Difference Reports
Generate PDF comparison reports that can be reviewed, archived or sent to customers and suppliers.
Quality Assurance
Use automated comparison to validate document changes before production, approval or release.
Server-Side Processing
Integrate document comparison into automated systems, batch jobs or document management workflows.
Why Use scConverter for Document Comparison?
scConverter is designed for developers who need to add advanced document processing functionality to their own software. Unlike simple image comparison tools, scConverter is suitable for technical and engineering documents where formats such as PDF, DWF, TIFF, PLT, CGM and Gerber are commonly used.
The SDK gives your application control over the input files, output format, colors, resolution and comparison result. This makes it suitable for custom applications, automated workflows, server solutions and specialized engineering systems.
Development Platform Support
scConverter can be used from several development environments, including:
- C# / .NET
- C++
- VB.NET
- Delphi
- ASP.NET
- COM-compatible development tools
Frequently Asked Questions
Can scConverter compare PDF files automatically?
Yes. scConverter can compare two PDF files and generate a visual comparison result as PDF, PNG, JPEG or TIFF.
Can scConverter compare DWF and CAD drawings?
Yes. scConverter can compare DWF, DWFX, CGM, and other supported technical drawing formats.
Can I customize the comparison colors?
Yes. You can define the colors used for old content, new content and unchanged content.
Which output formats are supported?
Comparison results can be saved as PDF, PNG, JPEG or TIFF.
Can scConverter be used in server applications?
Yes. scConverter can be integrated into desktop applications, server systems, batch processing tools and automated document workflows.
Try scConverter Now
A fully functional evaluation copy can be downloaded from our web site.
The downloaded product will run in evaluation mode for a period of 30 days.
If you want to continue to use the product after this period, you're required purchase a license.