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.
Cross Platfrom PDF viewing from rev app
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
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.
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
www.quartam.com
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 254
- Joined: Mon Apr 16, 2007 12:06 am
- Location: USA
- Contact:
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.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.