I am making a CNC laser pcb making machine and i want to use the pdf file of the layout and send it to the microcontroller(avr) serially so that it can control two steppers and the laser diode. I am not sure how to send the pdf data or how to decode it. Can somebody please provide me with links or advice where i can learn how pdf works and how to use the data in my application ? If i wanted to make the interface like a printer where i click the print option and my machine will print the pcb, what do i need to make ? I dont want to use any software but to develop it all by myself. Please help ! Thankyou.
-
1Start by having a look at the [pdf specification](http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf) and then weep. What you want to do is too complicated, the content in pdf can be vectors and bitmaps placed in any order. Probably your best best bet is to rasterize the pdf and use some generic lib to vectorize the image. – Paulo Soares May 07 '15 at 08:47
-
@PauloSoares How do you advice that i proceed ? – ironstein May 07 '15 at 08:56
-
1Google for "convert bitmap to vector", – Paulo Soares May 07 '15 at 10:02
-
2You say you are making PCBs - can you get access to the data in gerber file format? This is a much simpler vector format better suited to manufacturing (http://www.ucamco.com/files/downloads/file/81/the_gerber_file_format_specification.pdf ), and you can get code to parse them from the gerbv project. – Jon May 07 '15 at 10:43
-
1I suggest you (as @Jon already) to use a vector format representation. If you sent a bitmap to the MCU you, after, would have to convert it into something of vectorial to drive the motors from an x,y point to an x1,y1 point ... http://en.wikipedia.org/wiki/Gerber_format – Sir Jo Black May 08 '15 at 16:37
-
@SergioFormiggini i want to make a 3d printer and i want to write the software for it. What do you recommend ? – ironstein May 10 '15 at 16:05
-
I've not the knowledge of this kind of hardware. My thought is that before to start with the SW you should have a project, at least a clear idea about which hardware you have to build and which parts you'll have to drive with the SW. What do you mean when you says 3d pcb printer? Do you mean an hardware able to print multilayer PCB? – Sir Jo Black May 11 '15 at 04:05
1 Answers
On a PC, a document you want to be printed is sent to the driver of your target printer who converts it into a format acceptable by the chosen printer.
Printers by themselves use a full wealth of logic to convert acceptable input streams (Raw, PostScript, HP/PCL, EMF etc.) into print head movements (if the printer has a "head") and ribbon/ink/laser actions.
So from the architectural point of view you'd need to think about the following:
Printer side:
- which commands will my printer (need to) understand to place the head in XY and drop a piece of plastic
- can I reuse anything existing and do I get a docu for it
PC side:
- what data sources do I have (e.g. a PDF)
- what must a printer driver be capable of to convert data sources into something that the printer understands
If you don't want to develop printer drivers for the PC, you're probably stuck with PCL (ca. 370 pages) or PostScript (ca. 900 pages) for the PCB printer and a fair chance that a vanilla HP or PostScript printer driver will work for you.
If you don't mind writing printer drivers for the PC you'll have to convert application documents into the format the printer understands (go XY, drop Z, movedry, etc) ... so you are tied to application documents with well documented data formats.

- 8,861
- 2
- 28
- 50