Forum How do I...?

newby question

sambodhiprem
Hi

I'm new to Terminal. How can Prince be called from the command-line?
In the user guide it says:
prince [OPTIONS] FILES... [ -o PDF ]

I have my html file somewhere on my computer, how can I point Prince to that file and run it so that Prince turns the html file into a pdf?

I'm trying to learn this basic step - any link where I can read up about how to make things happen in the command line with Prince would be much appreciated.

Sambodhi

http://sambodhiprem.com/

mikeday
First you have to install Prince on your machine. Have you done this?

Once Prince is installed, you can run it like this:
$ prince /Users/myname/myfile.html

This will convert myfile.html in your home directory to myfile.pdf.
sambodhiprem
Perhaps I have not installed properly…

Terminal says:

cpe-124-181-130-216:~ sambodhiprem$  /Users/sambodhiprem/Desktop/prince-9.0r2-macosx/install.sh $ ./install.sh
Prince 9.0

Install directory
    This is the directory in which Prince 9.0 will be installed.
    Press Enter to accept the default directory or enter an alternative.
-n     [/usr/local]: 


After this I pressed return and I get a whole bunch of lines saying:

install: /usr/local/lib/prince/style: No such file or directory
install: /usr/local/lib/prince/style: No such file or directory
install: /usr/local/lib/prince/style: No such file or directory


Then Terminal says:

Installation complete.
    Thank you for choosing Prince 9.0, we hope you find it useful.
    Please visit http://www.princexml.com for updates and development news.

cpe-124-181-130-216:~ sambodhiprem$ 


Does that mean Prince is now installed?

When I run what you suggest:

cpe-124-181-130-216:~ sambodhiprem$ $ prince /Users/sambodhiprem/chapter01.html 


I get:

-bash: $: command not found



I have attached the terminal log.



I very much appreciate your help

Sambodhi

http://sambodhiprem.com/

  1. Terminal-Prince.txt39.6 kB
    terminal Prince installation

Edited by sambodhiprem

mikeday
Can you rerun the install script as the root user, like this:
sudo ./install.sh

The sudo command (short for "super-user do") will prompt you to enter your password.

Alternatively, you could install Prince in your home directory by entering /Users/sambodhiprem/prince-9.0r2 when it prompts you for the install location (the default being /usr/local).
sambodhiprem
Ah, I got it to work!! Thank you!!

kind regards

Sambodhi

http://sambodhiprem.com/

  1. Terminal-Prince-02.txt43.2 kB
    now working!

Edited by sambodhiprem