Wednesday, August 3, 2016

Combine PDF files using scConverter

From scConverter version 3.10 you may add PDF combining, or merging, to your application.
The interface is very easy to use, and you may combine all pages, or a selection of pages, from the individual PDF files.
The merge interface consist of 4 methods:

  • HRESULT PDFMergeInit(void)
  • HRESULT PDFMergeAddFile(BSTR PDFFileName)
  • HRESULT PDFMergeClose(BSTR PDFOutputName)
  • HRESULT PDFMergeAddFileEx(BSTR PDFFileName, BSTR PageInformation
To create a new combined/merged PDF file you start with a call to the PDFMergeInit method. You then add files using one of two methods; PDFMergeAddFile or PDFMergeAddFileEx.
The first method, PDFMergeAddFile, will add all pages from the given file to the combined PDF file. 
The second method, PDFMergeAddFileEx, have a second parameter that may be used to control which pages to include, e.g.: "1,2,3,10" will include page 1,2,3 and 10 from the given PDF.
When all required files and pages are added you create the new PDF using PDFMergeClose, the parameter is the name of the resulting PDF.

Sample code to combine/merge 3 PDFfiles:

scconverter.PDFMergeInit();                                  //Start a new PDF
scconverter.PDFAddFile("filea.pdf");                     //Add all files from filea.pdf
scconverter.PDFAddFileEx("fileb.pdf", "1,2" );       //Add page 1 and 2 from fileb.pdf
scconverter.PDFAddFileEx("filec.pdf", "2,3,5,10);  //Add page 2,3,5 and 10 from filec.pdf
scconverter.PDFMergeClose( "output.pdf" );           //Create new file named output.pdf

output.pdf will contain: 
  • All pages from filea.pdf, 
  • Page 1 and 2 from fileb.pdf 
  • Page 2,3,5 and 10 from filec.pdf
Please also take a look at the sample named scMergePDF:
This sample shows a preview of each page in the source PDF, and let you include all or individual pages into the combined PDF.

Read more about scConverter here:

Download scConverter SDK here:

The scConverter DLL documentation can be found here:



Wednesday, October 1, 2014

PDF to CAD Conversion with ViewCompanion Premium

ViewCompanion version 9 has just been released. One of the most important additions to this update is support for reading Adobe PDF files. All three editions can now view and print PDF files. With ViewCompanion Pro and Premium you can convert PDF files to many other formats including TIFF, DWF, JPEG, and PNG.
With ViewCompanion Premium you can now extract vector information from PDF files and save this data to a AutoCAD DXF file.This feature, also known as PDF to CAD, makes it possible to convert a PDF to an editable CAD file. In addition to DXF, you can convert your PDF to AutoDesk DWF, PLT, CGM or SVG formats.
ViewCompanion Premium includes a sample file that we will use in this demonstration, the file is named "ps2board.pdf". Open this file in ViewCompanion and then locate the "Export as Vector" command, found in the "Premium Tools" category:



Now press the "Export to Vector" command and select destination file name, and the output format to use. In this demonstration we'll convert a PDF file to an AutoCAD DXF file. After the conversion You can load the newly created DXF file into AutoDesk TrueView™ (or any other CAD application), to check the result. Below is an image showing the converted DXF displayed in TrueView:


Please note that the quality of the converted CAD file is highly dependent on the original PDF file. If your PDF file was generated from a CAD application, the result should be very good.

You can download a 30-days trial of ViewCompanion Premium 9 here:

More information about ViewCompanion Premium can be found here:

AutoDesk TrueView™ can be downloaded here:

Tuesday, December 17, 2013

Using GerbView to combine positive and negative layers into a single Gerber file.

Some PCB layout programs generates traces as a positive Gerber file, and power/ground plane as a negative Gerber file, which is supposed to be combined to create a finished Gerber file.
You can use GerbView to perform this task.
To do this you can do the following:
  1. Load the negative power/ground plane file. 
  2. On the right side of the screen you will see a list of available settings for the loaded Gerber file. In the list you will find a setting  named "invert". Enable this option to create a positive display of the layer.
Sample screenshot after adding layer and inverting this:



Then load the second layer and move it to the top of the layer list.
You should now see something like this:



Finally, save the two layers to a single Gerber file using Save As option:


Press OK and select a file name for the new Gerber file.
Final result shown is below:



GerbView® is a Software Companions product, and you will find more information about it here:

Wednesday, November 6, 2013

Creating layered PDF files with GerbView

One of the nice features of GerbView is the ability to create layered PDF files.
Layered PDF files can be displayed in Acrobat, and you can here control the visibility of each layer individually. Creating a layered PDF in GerbView is easy, you just add all the layers you want to include and then convert it to a PDF file!
First you need to make sure all layers are loaded, and displayed in the order you want them to be listed in the final PDF file:

Then locate and press the Save As button. A dialog will appear where you can select which layers you want to include in the PDF. Make sure you select all layers, like this:

Press OK and another dialog will appear. From this dialog select a file name and the file format to use for the converted file. Set the destination format to Adobe PDF.

Finally press OK again and your new layered PDF is created. You can now open the PDF file in Acrobat to verify that each layer is listed correctly. The image below shows how the PDF file may look in Acrobat:

In this guide we've used GerbView release 7 to do the conversion, but you could also use it for GerbView version 6.  You can follow this guide to create layered DWF and DXF files as well.

GerbView® is a Software Companions product, and you will find more information about it here:
http://www.gerbview.com/
and here:
http://www.softwarecompanions.com/gerbview.html






Friday, November 1, 2013

ViewCompanion with Classic Interface

ViewCompanion is by default using a Ribbon interface, as shown in the picture below.
ViewCompanion with ribbon interface

If you prefer to use a classic Toolbar & Menu based interface, you can configure ViewCompanion to use this instead, and here is how to do it:
Under the Tools category you will find a button named "User Interface", click this button to open the User Interface dialog. At the bottom of this dialog you will find a radio button labeled "Use Toolbar & Menu Based Interface", select it and close the dialog. Restart the application and you will now be able to use toolbar and menus.
ViewCompanion with classic toolbar & menu interface.

This information applies to all ViewCompanion editions; Standard, Pro and Premium.
Read more about ViewCompanion and our other products at www.softwarecompanions.com.

Thursday, October 24, 2013

Add conversion to your own application or web site

Our product scConverter makes it easy to add conversion to your own application or web site. scConverter is a COM component that can be used in almost any development language (e.g.: C++, C#, VB, .NET, ASP, ASPX and more).
The component can convert DWF, CGM, TIFF and HPGL/2 plotter files to the following formats:
  • Adobe PDF
  • Adobe PDF/A
  • Autodesk DWF
  • Autodesk DXF
  • CALS Group 4 Raster
  • Computer Graphics Metafile
  • Gerber RS-274X
  • HPGL/2
  • GIF Raster
  • JPEG Raster
  • Paintbrush PCX (PCX)
  • Portable Network Graphics (PNG)
  • Scalable Vector Graphics (SVG)
  • TIFF Raster
  • Windows Bitmap (BMP)
  • Windows Metafile (EMF & WMF)
You can easily add support for more input formats, here's the complete list of available input formats:
  • HPGL and HPGL/2.
  • CALS type 1 and 2
  • Calcomp Plotter Format.
  • AutoDesk DWF and DWFx 2D.
  • Computer Graphics Metafile (CGM) Binary.
  • Excellon drill.
  • Gerber RS-274X.
  • GIF.
  • HEIC.
  • JPEG.
  • Portable Network Graphics (PNG).
  • Structured Fax Format (SFF). Multi page.
  • TIFF (uncompressed, packbits, LZW, CCITT G3 and G4). Multi page.
  • WebP.
  • Windows Bitmap (BMP).
You can find more information about the component here and here.