Currently i am working to implement a Plotter functionality in our Java based CAD Application.
If we use normal printing ways or more precisely Raster printing ,life is very easy.It can be summed up as
- Create a Raster Buffer .We can do this by say capturing a screen shot and prepares a Buffered Image.
- Set up Java printing interface.
- Send this Raster data to printer.
It’s ok for normal requirements but for Industrial applications like CAD industry you don’t want jagged effects in say line which has been printed.
For high quality smooth printing we have to send data in Vector form to the Printer.
The difference in Vector and Raster data is ,in Vector to draw a Circle we send something like Circle,center,Radius information to a printer.But in Raster we send all the points or pixel buffer to printer,printer doesn’t know that it is a circle .Its just draws the pixel buffer.
Ways to send Raster Data :GIF,JPEG,PNG.
Ways to send Vector Data :PLT,PostScript.
Now i am trying to do it by PLT format.The problem i am facing is PLT depends on type of printer and so i have to get driver properties and convert neutral .plt file to printer specific .plt file.But by Java i am not been able to get Driver properties.
Still trying to figure a way out !
Note:I am still in R&D phase so i may be wrong in what i have said above.