Is it possible to modify a Gerber silkscreen before production?

The correct way to modify Gerber files is normally go back to the original CAD files that generated the Gerber files in the first place. Then use that software to modify the design to your requirements and re-generate the outputs. This process does require that you also have access to both the original CAD data files and the use of the CAD program itself.

If the originator did not release the original CAD files this may have been done for proprietary reasons.

So there are a number of other possibilities for you to directly modify the Gerber files. Keep in mind that these procedures are highly discouraged because of the confusion that can occur in environments where both the CAD files in various versions coexist with the Gerber files.

One method is to use a Gerber Editor tool. These are tools that can take in the existing Gerber file data and allow small changes to be made to the gerber design. Typically these tools are extensions of the various free Gerber Viewer tools that you can download off the web (such as ViewMate and GC-Prevu). Unfortunately as you have already found these upgraded tool versions are not free.

The other method is to directly edit the Gerber data files. If you open the Gerber file, for example the SilkScreen layer, in a text editor you will notice that it is a regular text file with a format that you can quickly deduce by inspection. You can add additional lines to this file to make more draw, flash and move commands. If you do this it is very important to make sure to follow the proper syntax and to use one of the free viewers to review the work that you do.

I would discourage this direct edit technique though and propose another approach instead. First study the existing Gerber file format with a viewer. Note the coordinate system origin and figure out an area of coordinates within which you want to add your additional details. Then download and install one of the free PCB layout CAD software packages that are able to produce Gerber output. Two examples of CAD programs that can do this are DesignSpark and Eagle. Then use the program that you select to design the items (logo, texts and lines) that you wish to add. Add them the in the add-on CAD layout at coordinates that match to what you learned from the study of the original Gerber files. Once they are designed, use the free CAD program to plot out Gerber data for the layer(s) that contain the data that you wish to add. Now using a text editor open both this interim add-on Gerber and the original Gerber file. Block copy the new data and paste it on at the end of the original Gerber file. Make sure that the data formats are exactly the same and if not go adjust the plot settings in the free CAD package and replot the add-on Gerber data. Once again test the results of your work with one of the free Gerber viewer tools.


The Gerber File Format Specification is freely available and it is indeed an ASCII format that could be edited using a text editor. While human readable it's a vector format so everything on the silkscreen will be formed by a large number of line segments. As you already have the Gerber files I'd recommend opening with a text editor and referencing the specification and a print-out of the layer see if you can follow it.

One risk you would run is doing something in a non-standard way that happened to look OK in your Gerber viewer but wouldn't be interpreted properly by the manufacturer. Another thing you could do is ask the PCB fab for a quote on making the changes. Many have reasonable rates for those sorts of changes and it shouldn't take long for someone experienced who has the right tools. Maybe you could just send them a mock-up of the changes made as a regular image and ask what formats they prefer for the logo.


I have successfully used Cenon (http://www.cenon.info) to open, modify, and rewrite the silkscreen Gerber files for PCB production. Cenon is free and available for Mac OS X, Linux, Free BSD, and other unix-like platforms. Cenon requires Ghostscript to read PDFs (also free software and available from the Cenon site for convenience--if you already have Ghostscript, you don't need to replace it.)

First a caution... I would not recommend doing this for the electrical layers as your edits will not be checked against the design rules and you will break the link between the CAD files and the CAM files used for production. But sometimes you just need to tweak something that can't be edited easily in CAD software. In my case, logotype creation in Eagle is basically not practical. The drawing tools are too rudimentary and purpose-built for PCB layout, not general vector graphics.

Here is the process I use to add my logo to a PCB bottom silk layer Gerber file:

  • Create logo using a vector editor (I used OmniGraffle, but Adobe Illustrator or a free vector tool like Inkscape should also work) and save as a Vector PDF.
  • Open the bottom silk Gerber file (my CAM job names it bottomsilk.ger) into Cenon.
  • Import logo PDF file onto a new layer (there's a selection for that in the import dialog).
  • Select everything on the logo layer and "scale relative" the X-axis by -100% (on the Transform Scale panel). This mirrors the image so it conforms to the way the CAM house will expect it. You may need to lock the bottom silk layer (click the pencil next to the layer in the layers inspector) so you won't select anything on that layer by accident.
  • Drag the logo into desired position or use the Cenon tools to more precisely place your logo. (I used the Transform Align tool to align the right edges of objects on both layers.)
  • You can also add new text or other markup.
  • Save the composite image as "Gerber" file type in the Save As... dialog. (You will likely need to rename it since Cenon always uses ".gerber" as the file extension.) Preserve the original bottomsilk.ger file in case things don't go according to plan.

I hope this is helpful.

Tags:

Pcb

Gerber