Converting .ps files to .pdf?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Converting .ps files to .pdf?

Post by thatkeith » Thu Jun 16, 2022 11:11 am

A friend has a very large number of .ps PostScript files and he wants to convert them to PDFs. When I say 'large number' I mean well over 1000, so doing it simply by opening and saving from Preview (he's a Mac user) is not practical. There's also a custom file naming convention he needs to use based on the .ps file locations, which is obviously very do-able in LiveCode... if I can figure out how to deal with the PostScript to PDF conversion process itself. Is this something that LiveCode can do itself? Or would this require using LC to drive other tools?

He's currently looking at Automator and getting hung up on the file naming and save location details, which currently are resisting actual automation. I'm really hoping this could be a way to show him how much more powerful LC is for this kind of thing. Assuming it can do it! :D

k
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Klaus
Posts: 13853
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Converting .ps files to .pdf?

Post by Klaus » Thu Jun 16, 2022 12:23 pm

Hi Keith,

on the Mac you could use SHELL with the build-in -> pstopdf
Enter:
man pstopdf
in the terminal to see a list of options for this command.


Best

Klaus

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Converting .ps files to .pdf?

Post by thatkeith » Thu Jun 16, 2022 12:25 pm

Hi Klaus,

This looks perfect! Thanks for this, I think I can sort out a helper tool for him that also just happens to show him how versatile LC can be. :)

k
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply

Return to “Talking LiveCode”