Rev for PDF printing?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Rev for PDF printing?
I've got a client who wants a simple product: a CD with PDFs, and a front end to print them. I'm sure I can do it with Rev, but is it the best tool? Can I do it directly from Acrobat directly? (I have v8 pro) If I do it from Rev, do I have to use rev to open Acrobat and then print?
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
Hi Activa,
While Revolution can't do it natively, you can combine it with other tools to achieve the goal.
For Windows you can use "pdfp" - a command-line tool to print PDF files - as long as there's an Acrobat Reader installed on the client computer.
You can download the pdfp.zip package (including C source code) here: http://www.esnips.com/doc/9e2a3a72-52ca ... 5f02f/pdfp
Then you can execute a silent shell command to print the PDF file:
On Mac, you can use AppleScript to tell the Finder to print the PDF file:
Turning the above into a general-purpose cross-platform handler is left as an exercise to the reader ![Smile :-)](./images/smilies/icon_smile.gif)
Hope this helped,
Jan Schenkel.
While Revolution can't do it natively, you can combine it with other tools to achieve the goal.
For Windows you can use "pdfp" - a command-line tool to print PDF files - as long as there's an Acrobat Reader installed on the client computer.
You can download the pdfp.zip package (including C source code) here: http://www.esnips.com/doc/9e2a3a72-52ca ... 5f02f/pdfp
Then you can execute a silent shell command to print the PDF file:
Code: Select all
on mouseUp
answer file "Select a PDF file to print"
if it is empty then exit mouseUp
put revWindowsFromUnixPath(it) into tFilePath
put "pdfp.exe" && tFilePath into tCommand
put the hideConsoleWindows into tSaveHCW
set the hideConsoleWindows to true
get shell(tCommand)
set the hideConsoleWindows to tSaveHCW
end mouseUp
Code: Select all
on mouseUp
answer file "Select a PDF file to print"
if it is empty then exit mouseUp
put revMacFromWindowsPath(it) into tFilePath
put "tell application" && quote & "Finder" & quote && \
"to print file" && quote & tFilePath & quote \
into tCommand
do tCommand as AppleScript
end mouseUp
![Smile :-)](./images/smilies/icon_smile.gif)
Hope this helped,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
For windows there's also the open source pdf creator. It installs a software printer, which you can talk to like a normal printer.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode