Cross Platfrom PDF viewing from rev app

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Location: USA
Contact:

Cross Platfrom PDF viewing from rev app

Post by reelstuff » Fri Oct 05, 2007 3:48 pm

Hello everyone,

I was trying to find some information about using embedded PDF files in a Rev App, I came up empty in the documentation.

I did find some information however, nothing about going cross platform with viewing a PDF.

I reviewed the browser.rev file, ( I believe that is correct )

One portion of the file details embedding and viewing a PDF file using the alt browser, however, it does not appear to actually open the PDF file.

I attempted to open other PDF files from the Internet and found that this did not work either.

I am using a MAC so the safari browser was in action, anyone tested this with a windows machine?

Just curious if anyone has had any experience with using this feature in a cross platform rev app.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Tue Oct 09, 2007 11:42 am

While it should work on Mac (since it sues the same WebKit as Safari), you can also use a 'player' object to display PDF documents.
However, this doesn't work on Windows, so you may have to solve this differently, depending on the underlying platform.

<shameless plug>
If you're interested in creating PDF files from scripts, check out the Quartam PDF Library at http://www.quartam.com/pdf4rev/
</shameless plug>

Hope this helped,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Location: USA
Contact:

Post by reelstuff » Tue Oct 09, 2007 11:47 am

Hi, thanks, yes I think you are exactly correct, it does not seem to work on the MAC, interesting, will see about that,

Thanks

SparkOut
Posts: 2857
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Wed Oct 10, 2007 1:53 pm

I came across this issue - I think from what you describe it is the same as mine:
It is possible to embed the pdf document into a RunRev stack (in order to make it portable in one standalone executable file).
To view the document cross platform you can set up a browser in the stack. (A QT player should work on Mac, but Windows QT will not show pdfs.)
To set up the browser instance to show the pdf, you need to give the browser a URL to the pdf file to display.
If the pdf is embedded in the stack, you can't give the embedded location to the browser as a URL. You have to write out the embedded pdf into a file in (say) specialFolderPath("Temporary") and give the file location you wrote as the URL to the browser.
After you've finished viewing, you can then clean up by erasing the temporary file.
It's a drawback, and hopefully something that can be improved in a future release, but this is a workaround that can be used successfully.

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Location: USA
Contact:

Post by reelstuff » Fri Oct 12, 2007 6:10 pm

SparkOut wrote:I came across this issue - I think from what you describe it is the same as mine:
It is possible to embed the pdf document into a RunRev stack (in order to make it portable in one standalone executable file).
To view the document cross platform you can set up a browser in the stack. (A QT player should work on Mac, but Windows QT will not show pdfs.)
To set up the browser instance to show the pdf, you need to give the browser a URL to the pdf file to display.
If the pdf is embedded in the stack, you can't give the embedded location to the browser as a URL. You have to write out the embedded pdf into a file in (say) specialFolderPath("Temporary") and give the file location you wrote as the URL to the browser.
After you've finished viewing, you can then clean up by erasing the temporary file.
It's a drawback, and hopefully something that can be improved in a future release, but this is a workaround that can be used successfully.
Something to think about, yes, I have had an issue with safari and PDF files, some just dont work correctly, it seems that the application calls the Adobe application just fine, you locate it, but once you click open the PDF never displays, Interesting, behavior.

Post Reply

Return to “Internet”