How to support this blog?

To support this blog, you can hire me as an OmegaT consultant/trainer, or you can send translation and project management jobs my way.

Search the site:

Showing posts with label PDF. Show all posts
Showing posts with label PDF. Show all posts

Export your Numbers file to a PDF in the same folder

use AppleScript version "2.4" -- Yosemite (10.10) or later

use scripting additions


property alert_exists : "The PDF already exists. Continue?"

property dialog_yes : "Yes"

property dialog_no : "No"

property export_complete : "The PDF has been exported"


# this script exports a PDF of the frontmost Numbers file

# the Numbers file is saved before export to make sure that it exists

# the PDF file is exported to the same folder as the original file

# if the name of the original is myName.numbers, the PDF name is myName.pdf

# if the PDF already exists it is possible to cancel the export

# once the export is completed, Numbers displays an alert

# and Finder opens the enclosing folder


tell application "Numbers"

# this script exports a PDF of the frontmost Numbers file

set myDocument to (item 1 of (document of windows whose index is 1))

# the file is saved before export to make sure that it exists

save myDocument

set myDocumentName to name of myDocument

set myDocumentPath to file of myDocument as text

end tell


tell application "Finder"

# the PDF file is exported to the same folder as the original file

set myDocumentContainer to (container of file myDocumentPath) as text

end tell


# if the name of the original is myName.numbers, the PDF name is myName.pdf

set myExportedPDF to myDocumentContainer & myDocumentName & ".pdf"


tell application "System Events"

# if the PDF already exists it is possible to cancel the export

if exists file myExportedPDF then

display alert alert_exists as warning buttons {dialog_yes, dialog_no} cancel button dialog_no

end if

end tell


tell application "Numbers"

(close access (open for access (myExportedPDF)))

export myDocument to file myExportedPDF as PDF with properties {image quality:Best}

# once the export is completed, Numbers displays an alert

display alert export_complete

end tell


tell application "Finder"

# and Finder opens the enclosing folder

activate

open myDocumentContainer

end tell


# here again, save this script as an Application, with a funny name

# so that you can easily call with with Spotlight

# I chose "> Numbers → PDF"

Free vs. Proprietary software

2012 was the year when I bought the most proprietary software licenses.

Such purchases were mostly prompted by special needs that seemingly could not be answered by available free software.

I bought a license for Infix (PDF editor), for Abbyy FineReader Express and Readiris (Japanese and English OCR), for Antidote (French spelling and grammar checker), for Pdiff (visual comparison for PDF files), for Kaleidoscope (visual comparison for image files) and for Transform (XSL transformation).

Antidote from Druide is the software that I use the most often, after OmegaT. I could not work without it.

Infix from Inceni comes as a very distant second. I use it on some PDF files that I need to translate as PDF. I export the contents to Infix export format and translate that file in OmegaT thanks to the Infix XML filter that was developed a while ago. Infix does not come without problems (crashes, clunky user interface), but it works most of the time.

Abbyy and Readiris were bought when I needed to OCR a few important files, sometimes PDF, sometimes plain images. I then translated the exported files with OmegaT.

I bought Kaleidoscope from Black pixel because I needed to compare a set of multipage PDF documents. Kaleidoscope does not support PDF, but I thought I'd be able to easily convert the files to a compatible image format. That was not the case. Even though my machine is quite powerful, I could not find a practical way (free software or not) to convert two 400 pages PDF files into a single image file with a good enough resolution to process the file set in Kaleidoscope.

Then I bought Pdiff from Csci. Since there was no trial version, I asked the developers to try it on my file set and send me an excerpt of the result. What they sent me was very satisfying, but was made in the "pro" version that had an Export to PDF feature for reports, while the "lite" version had nothing like that. I bought the lite version anyway, but its report function was nowhere close to what the pro version offered at a priced that did not justify a purchase (999€). There is no way to export the report in the lite to anything useful and there is even no way to copy it for conversion to a different format.

Eventually, I did the comparison with diffpdf a free software from Mark Summerfield. diffpdf has a problem: it does the comparison page by page but does not notice when data is spread on 2 pages. To fix that, you have to manually add white pages in places where you want diffpdf to do a dummy comparison so that most of the pages are kept in sync. This is slightly cumbersome but took only about 1 hour to complete on the 400 pages x 2 pages set. The resulting comparison report in PDF was easy to read and exactly what I needed to proceed with my work.

Transform is from Neil Lang, an individual developer. I was being lazy and I wanted something more than what XSLPalette offered so I checked the App Store and found Transform. I paid the license, installed it, tried it, send a request for feature to the developer who promptly answered by telling me that the feature was already there, but "hidden" from the eyes of the user. After playing with it a bit I decided to use xsltproc on the command line to proceed with my work.


I learned 3 things:

1) Free software ended up being good enough for what I needed and I wasted money on software I did not really need.

2) Good proprietary software does not come in "lite" and "pro" versions. Either it does what you need it to do, and it does it well, or it is not worth bothering.

3) There is a business selling software output when users don't want to buy a license to a software they'll use only once every few months. I could see myself spending a few (dozen ?) euros on a nicely output PDF comparison report, or on some nicely OCRed files.

Paperless office, PDF, XML, Zip...

From the Mac Dev Center, "My paperless office" by Gordon Meyer.

Gordon writes about how he used a Fujitsu ScanSnap scanner to archive all his paper documents to digital form. He also mentions DevonThink, a digital document managing system, and 2 PDF utilities: Skim, a PDF reader and note taker for OSX released under the Modified BSD License, and hence Free software, and PDFPen, a tool to organize and overwrite PDFs.

Considering the Leopard version of Preview, it looks like Skim as well as PDFPen are becoming obsolete, as some comments seem to confirm...

The other day there was a link on Slashdot pointing to Jim King's "Inside PDF" blog, about the fact that PDF 1.7 was becoming an ISO standard.

I've been reading a number of Jim's posts and here are a few that may interest some of you. They are all a little theoretical but give very interesting insights on a number of existing major documentation formats.

Quotes from the respective pages.

PDF by Design

I named this blog "Inside PDF" because I anticipated telling you a lot about PDF technology – what is inside of a PDF file and why. I have spent most of the time so far talking about PDF and standards. So, I thought it was about time to do an entry about PDF itself. I believe that PDF has been so successful because of the caldron out of which it was brewed. By 1990 Adobe was quite successful with PostScript. By then we had helped over 60 other companies make printers, image setters, and other imaging devices that used PostScript. We had also shipped Display PostScript and the Steve Jobs NeXT machine was a computer whose operating system's imaging model was Display PostScript. So Adobe had had considerable experience in displaying documents on a screen...

XML Documents

Today I hope to tie together two previous blogs about OOXML and about XML For ....

I am sure you have often heard the term “XML Document.”  I hope you realized that that term is nearly meaningless just like the term “XML.”  We should never use either in polite conversation. Let me tell you some of the totally different uses for the term “XML Document” which render it a useless term, and maybe you will agree with me to banish it from our vocabularies...


Archiving Documents

Archiving is a rather loaded word since doing it can be a widely varying activity. In many situations, archiving PDF files is a very good solution. In fact it was so attractive to some US Government agencies that they encouraged their personnel to work on an ISO committee/working group to define a special subset of PDF called PDF/A that meets their needs better than plain old PDF might...


ZIP Archives and Portable Directories

This is a topic that is dear to my heart and I would love to spur some interest in creating an open source project or something like that. Since about 1999 I have been talking to my colleagues about a concept that I call "portable directories." It is a simple idea once you "get it."

File systems, organized around the notion of directories or folders in which to collect files and other directories, have been the staple for how we save computer material on our hard drives, data CDs and DVDs, etc. I suppose it had its invention from an analogy with a file cabinet, but on the computer we can nest folders inside folders to any depth, something hard to do with real physical folders...

Popular, if not outdated, posts...

.docx .NET .pptx .sdf .xlsx AASync accented letters Accessibility Accessibility Inspector Alan Kay alignment Apple AppleScript ApplescriptObjC AppleTrans applications Aquamacs Arabic archive Automator backup bash BBEdit Better Call Saul bug Butler C Calculator Calendar Chinese Cocoa Command line CSV CSVConverter database defaults Devon Dictionary DITA DocBook Dock Doxygen EDICT Emacs emacs lisp ergonomics Excel external disk file formats file system File2XLIFF4j Finder Fink Font franรงais Free software FSF Fun Get A Mac git GNU GPL Guido Van Rossum Heartsome Homebrew HTML IceCat Illustrator InDesign input system ITS iWork Japanese Java Java Properties Viewer Java Web Start json keybindings keyboard Keynote killall launchd LISA lisp locale4j localisation MacPorts Mail markdown MARTIF to TBX Converter Maxprograms Mono MS Office NeoOffice Numbers OASIS Ocelot ODF Okapi OLPC OLT OmegaT OnMyCommand oo2po OOXML Open Solaris OpenDocument OpenOffice.org OpenWordFast org-mode OSX Pages PDF PDFPen PlainCalc PO Preview programming python QA Quick Look QuickSilver QuickTime Player Rainbow RAM reggy regular expressions review rsync RTFCleaner Safari Santa Claus scanner Script Debugger Script Editor scripting scripting additions sdf2txt security Services shell shortcuts Skim sleep Smultron Snow Leopard Spaces Spanish spellchecking Spotlight SRX standards StarOffice Stingray Study SubEthaEdit Swordfish System Events System Preferences Tags TBX TBXMaker Terminal text editing TextEdit TextMate TextWrangler The Tool Kit Time Capsule Time Machine tmutil TMX TMX Editor TMXValidator transifex Translate Toolkit translation Transmug troubleshooting TS TTX TXML UI Browser UI scripting Unix VBA vi Virtaal VirtualBox VLC W3C web WebKit WHATWG Windows Wine Word WordFast wordpress writing Xcode XLIFF xml XO xslt YAML ZFS Zip Zotero