Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Bulk convert text files to PDF' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Bulk convert text files to PDF
Authored by: tedw on Jun 07, '11 07:10:22PM
if you have files that the system doesn't recognize (no extension, and no Finder data), you can modify the script to assign the correct mime type. for SimpleText files, for instance, you'd want to add the option -i text/plain to the convert command - that will force the utility to assume that the input files are plain-text files. You could also solve the problem by writing a separate script to run through the files and add .txt extensions, but if you just want to convert them to pdf the -i option would be quicker.

[ Reply to This | # ]
Bulk convert text files to PDF
Authored by: tingo on Jun 08, '11 12:02:11AM

Thank you, very much appreciated. Unfortunately, I have no understanding of programming scripts, so I'm a bit stuck there.

Later, CET 09:25 I only saw the later posts after reading your reply and responding to it. The last script, including your amendment, takes care of some of my text files, but not all. But I wouldn't know where to add your string.

Word files: those with embedded tables or graphics give an error message, and a pdf file Adobe Reader won't open. But OK, I guess it's maybe ascking too much, and as converting Word files is not really something I need...

Edited on Jun 08, '11 12:26:27AM by tingo

[ Reply to This | # ]