commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
It's sometimes useful to strip the embedded fonts from a pdf, for importing into something like Inkscape. Be warned, this will increase the size of a pdf substantially.
I tried this with only gs writing with -sDEVICE=pdfwrite but it doesn't seem to work, so I just pipe postscript output to ps2pdf for the same effect.
If you can do better, submit your command here.
You must be signed in to comment.
On my ubuntu/debian system, there is a pdf2ps command (a script), which invokes gs in a similar manner. So you could possibly try this instead:
pdf2ps With-Fonts.pdf | ps2pdf - > No-Fonts.pdfI'm somewhat of a novice at this stuff, but I think the "stripping" happens only because postscript *cannot* embed fonts. Usually I want to embed fonts for submission of papers in PDF.
I'm pretty sure postscript embeds fonts. If you look in a ps or eps file you can actually read bits, so like pdf the specification must include standard fonts.
I'm not entirely sure how mine works, although I do get the individual flags. I really just added the pipe. It's based on a one liner I saw a long time ago that spat out postscript from postscript.
I've looked through the manpage for gs 8.61 and can't see how the specified options are asking the postscript interpreter to discard font information. This just seems more like a side effect to me rather than deliberate program action.
Yup. That's pretty much the conclusion that I came to. It could be that you need to add a flag to preserve fonts and that's what's going on. Either way, it's worked for me for years and I've found it very useful.
I should note (and sorry this is confusing!) that when I say `remove embeded fonts' what I really mean is turn all the letters into normal vector graphics. This way the file is composed without any reference to text. The obvious side effects are that text in the pdf becomes unselectable and the file size goes up. I do this because Inkscape seems to fall over when it has to handle pdf fonts, and this fixes it.
I updated it to get rid of a couple of needless bits.