Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

Wednesday, October 19, 2016

Raspberry Pi PDF viewer

Did a search of this, found a nice solution, then when I downloaded an updated version of NOOBS it came with a much nicer PDF viewer built in along with all the Libre stuff.

This link suggested using the xpdf viewer and gives a command line example. This worked although the xpdf viewer is quite bare-bones. https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=8005

I had another link that showed how to set up the double-click response for a particular file type, but I've lost the link. This other one talks a newbie similar to myself through how to bring up the GUI menu for doing the association (just right-click on the file and find the equivalent option to "Open With..."). https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=98015




Wednesday, May 18, 2016

My technique for making assembly drawings

Assembly drawings seem like they should be quick to throw together, because all that needs to be done is to copy and paste the drawings of various parts together. However, the drawings for all the parts are all either done in a variety of different drawing tools or have to be found from vendors, many of whom aren't just giving out free DXF files. So a big wad of different software is needed to put everything together. Here's the list:

Main drawing tool: I would use AutoCAD but it's bloated plus it's expensive and nobody wants to buy it for me. So I'm using DoubleCAD XT which is free for some reason.

To convert front panel drawings: All our front panels are done in Front Panel Designer, which exports to DXF. Astonishingly though, FPD is exporting 3D DXFs, which cause me problems because I am making 2D views and DoubleCAD XT unhelpfully goes nuts trying to render holes that are 3D. The solution is to explode the 3D drawings multiple times in Model Space in DoubleCAD, then select the entire mess and scale Z=0 to flatten the parts. The downside of this is that this results in the tops and bottoms of holes and edges being rendered twice. There's probably a more elegant solution but I haven't had time to figure it out.

To convert board silkscreens to DXF: GerbView is a tool that you can get a trial version of online, but it has proven to be so useful that I had to just buy it. It can be bought from here: http://www.gerbview.com/download.html GerbView can output any layer as PDF, DXF, or other formats. The downside is that the scaling gets mangled; I think that it is outputting the DXF in metric units but I am reading it as English units in DoubleCAD. So to read the DXF that GerbView produces into DoubleCAD requires rescaling before the image can be pasted into my assembly drawing. While searching for tools to view and convert Gerber drawings, I also found GBR2DXF here, and it seemed to be free, but the download process required registering for a password and it seemed like too much information to give out so I didn't try it.

To convert part drawings from PDF to DXF: Many manufacturers will release PDFs of their part drawings, or sometimes just line drawings of their parts. To paste these into my assembly drawing, I have a couple of techniques. The main one is to use a PDF to DXF converter program called Aide PDF to DWG Converter. It uses some kind of algorithm to trace PDFs, and the result is often shaky and poorly aligned if you zoom in but it is possible to then import the DXF and trace it with regular shapes. It has a free trial version but I'm probably also going to buy it. For really clean PDFs of things that were mechanical drawings to begin with, I can just give it the PDF file name, do the conversion, then import the resulting DXF and do cleaning up. It also produces results that are at an incredibly huge scale, so downscaling to convert to 1:1 is also necessary. For drawings where all I have is a JPG or other raster image, I first convert the image to PDF using PrimoPDF or CutePDF.

Some PDFs are shaded or have other features that make them not convert to DXF well. Sometimes I have to make a drawing from a photograph. In those cases, I can feed the drawing into an online tool that produces a black and white raster drawing that looks close enough to a line drawing that I can convert it to PDF and then feed it into the Aide converter. That online tool, oddly enough, is a service for quilters, it is called RapidResizer Stencil Maker. Again, the results of this tool are just approximate enough to produce a DXF that can be cleaned up and traced.


Sunday, April 3, 2016

PDF to DXF converter

There are a lot of options for converting PDF to DXF. Many are online, meaning you upload a file to some site and ask them to return you a DXF. Creepy! Or you can download a (probably malware infested) app. I tried one of them, and it seemed to work okay. Oddly, for the PDF of the DXF drawing that I was trying to convert, it produced both an image and a DXF, and the DXF was a mess and was too big for my viewer until I saved it as a very early version of DXF, then reloaded it and selected all the lines and set the pen to .002". The result then looked basically identical to the original drawing!

The app that I used is this one. It had a 30-conversion free trial. It's normally $180.

http://www.aidecad.com/pdf-to-dxf-converter.html

This one looked nice, although it seemed a little bloated. It has monthly licensing which is insane, but supposedly had a 14 day trial with no features disabled.

http://www.scan2cad.com/pricing/

Thursday, December 15, 2011

command line HTML to PDF converter

Preferably free, of course.

I think the real answer is to somehow use the python pdf libraries. Somebody must have written this kind of converter using this library, but I haven't found it yet.

(Update, here it is. Of course, will it work with our pathetic version 2.5 python?)

http://www.xhtml2pdf.com/

Oh how interesting, they list "alternatives" to xhtml2pdf.

Here are some other options:

ImPDF seems to be the winner. It's command line, and has a free version although they are also advertising a "company license"? Needs more investigation:

http://www.tipdownload.com/ImPDF-HTML-to-PDF-Converter-Comm_103690/

The pricing page (link now lost) seemed to indicate that the command line option could only be bought under a $200 "company license", but this page seems to have a free download link:

http://www.impdf.com/html-to-pdf-cmd.htm

Here's a retail-boxed version with what's probably a trial download. Doesn't seem to have a command line though:

http://www.coolutils.com/TotalHTMLConverter