Diff Tool for some binary (non-executable) formats - macos

I'm looking for a visual diff tool for Mac OS X that will allow me to see differences in Pages (from Apple's iWork suite) and Adobe Illustrator documents. I realize a visual diff may be a little much to ask, so I'd settle for some sort of XML or plain-text comparison. I'm using Pages to maintain my Spec and Illustrator for my mockups, which are all version-controlled, and would love to be able to easily see the differences.
FileMerge (which ships with Xcode) just barfs up gobbledygook, so binary comparisons definitely won't work. I know about Kaleidoscope, which does support diffs on various image formats (and seems to be an all-around good solution), but it doesn't seem that it supports Pages or Illustrator.

Araxis Merge has a lot of different file-format viewers. Straight up binary is one of them, if that will get the job done for you. It will do PDF and various other image formats as well.

I don't know about Illustrator files, but Pages has an XML portion. If you open the .pages file with unzip, there is an index.xml file containing all of the text and style information for the file, which you can then compare with diff or FileMerge.

Related

Flattening annotations from Preview without rasterizing existing text

I'm trying to flatten annotations I make to PDF files in macOS Preview (El Capitan) to ensure that they cannot be modified. I especially want to ensure that redactions cannot be deleted or unhidden to reveal the text beneath. Ideally, I would also like to preserve the machine-readability and vector quality of the text.
Currently, I achieve this by exporting to .tif, then converting back to .pdf, and then OCR'ing with Abbyy FineReader Express. That's a bit ridiculous, but the final result is almost exactly what I want: permanent annotations and searchable/copyable text. It loses some quality though... and grows in size.
I'm comfortable with the CLI and I've got MacPorts installed and pdftk. I hoped that the pdftk "flatten" option would do the trick, but it does not. It only seems to flatten form fields.
Does anything else out there do this? I swear there was a way to do this on some old built-in imaging program for Windows 2000 or something. (but I'm ok not going back to that) :-)
I would settle for a command that rasterizes the file if and only if it:
did everything in one step
kept the file small
kept the file as a pdf
kept the file as almost as readable and pretty as it was before
The "Best Practice" for Redactions in PDF is to either use Acrobat's Redaction tool, or the (long time industry leader) Redax Acrobat plug-in for Acrobat (although that one is not made for MacOS, as far as I remember).
Of course, the export as picture and then run OCR over it does work, but you have to absolutely make sure that you also clean up the file(s) from any private data and metadata.
Note that with the "real" redaction tools, you have the possibility for smart searches, even involving Regular Expressions.
With Redaction, as with other safety and security-related issues, it is up to you to decide how much it is worth to you.
Use "Export as PDF" (in the File Menu) which seems definitely a proper way to do it (on 10.9.5).
It seemed that the way to make these annotations permanent is printing to PDF with Preview, but that didn't succeed.

How do I convert a pdf to an image?

How do I convert a pdf to an image (say a .png or .tiff file)?
Is there a way to do this without purchasing a third-party component?
Take a look at Imagemagic you can call these programs from roughly any programing language. And it is available on Unix, Windows, Mac, ...
I assume that you want to manually convert a PDF. Yo have two ways of doing it:
Online:
PRO: very very easy.
CONTRA: if your document is somewhat private your are giving it away.
I used last week Neevia and worked perfectly: http://convert.neevia.com/pdfconvert/
In your machine
PRO: More Secure.
CONTRA: You need to download a program and have it setup.
Here you can find 3 ways of converting it online and another three from your pc.
http://www.makeuseof.com/tag/6-ways-to-convert-a-pdf-file-to-a-jpg-image/
You can use any softwares available in market to convert a pdf to an image, like adobe, ClassicPDF or may be nitro. There are trials available you can download any one of them easily.
For example, try the trial of ClassicPDF and convert your file in seconds, as you asked, its a free one and it does not require purchasing any software, its completely free:
http://www.classicpdf.com/
EDIT: Removed direct download to .exe file and made link to main website. This is a serious no no and should be the users choice to download a file.

Pretty print code to PDF

I'm searching for a tool that will take a source directory and produce a single PDF containing the source code, preferably with syntax highlighting.
I would like to read the PDF on my phone, in order to get familiar with a code-base, or just to see what I can learn by reading a lot of code. I will most often be reading Ruby.
I would prefer if the tool ran on Linux. I don't mind paying for a tool if it is particularly good.
Any suggestions?
You could wipe something up yourself with Prawn and Ultraviolet.
PDF is no good for reflowing. You might like a html based solution better.
And in reading existing code, a lineair model is no good. You need to jump from one file to the other. A hypertext model with history would probably work best on the limited screen estate of a phone. It should borrow some features of the smalltalk IDEs (jump to senders, implementors).
For the UI, take a look at clamato
GNU source-highlight supports many languages and can output LaTeX in particular that can be converted to pdf.
The SciTE editor can export the currently edited file (with syntax highlighting) to PDF (and HTML, RTF, LaTeX and XML).
Alas, it doesn't have batch conversion capability, but IIRC somebody made a batch tool out of this code base.
I realize this is very late, but I wanted to do the same thing, except I wanted it for my tablet, which is a Galaxy Note 10.1 with a Wacom digitizer that I can use to annotate code. I found that one good solution is to use Doxygen to generate a PDF which will have hyperlinks and everything you would want in a PDF. For my use case, I would pair it with EzPDF on Android to annotate the code. This was also for the purpose of learning a new codebase. In the end I ended up not using the generated PDF but it was pretty usable.

Clipboard Tool to Paste Several Version Back

I'm working on migrating some Flash files from AS2 to AS3, and I'm realizing that there are several pieces of text that I need to copy over and over and over.
Right now I have those pieces of text in an open notepad file, but I would love to have the ability to store those pieces in a clipboard so I can easily access them like by pushing something like CTRL+1, CTRL+2, etc.
Does anyone know of a good tool to do this?
Thanks,
If you have visual studio installed you can use that instead of notepad. Then you can copy multiple strings to clipboard and use Ctrl+Shift+Ins to paste them one by one.
Another alternative is Microsoft Office, here's a nice little write-up on their Clipboard utility.
It's also nice in that it's type agnostic, so you can clip multiple levels of text, images, whatever. I haven't used the Visual Studio version so I don't know how it compares, but I use it all the time.

Is there a tool that can convert common image formats (.bmp, jpg,..) to .emf files?

I'm using the GoDiagrams suite which seems to recommend .emf files for node images since they scale better on resizing. Bitmaps get all blurry.
Google doesn't show up any good tools that seem to do this... So to reiterate I'm looking for a image converter (preferably free) that converts an image (in one of the common formats like Bitmaps or JPEGs or GIFs) to an .EMF File.
Update: I dont need to do it via code. Simple batch-conversion of images will do.
Inkscape works well, it was recommended to me here.
Irfanview (http://www.irfanview.com) supports many image formats (including .emf). It's also small, fast, and very full-featured. It is free for non-commercial and educational use. I use it for all my image-conversion needs as it will work on batches of files and can rename them as it saves.
Image Magick contains a tool called convert, that will convert from just about anything to EMF files. You can either use this as a separate application, or interface to it using an API that is available in several different languages.
XnView (http://www.xnview.com). Very good viewer and converter.
Try ImageConverter Plus
Try http://autotrace.sourceforge.net/. It is opensource and it has good results. Download from here: http://sourceforge.net/project/showfiles.php?group_id=11789
Really funny one Microsoft. Now this might seem outlandish but it works... (I have Visio2007). Just found this out from a colleague
You can drop a JPEG into Microsoft Visio (no less), Do a 'Save As' to .emf and voila! nice quality of a picture too.

Resources