Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

PDF Question (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: How should I delete images from a listbox/array?
Next thread: Urgent: Need Dial/Circular Slider Control


Reading *CSV Files versus *.Txt Files   -   Claude Stone
  PDF Question   -   Tom Russell
   Re: PDF Question   -   Guyren Howe
    Re: PDF Question   -   Tom Russell
   Re: PDF Question   -   Guyren Howe
   Re: PDF Question   -   Norman Palardy
    RE: PDF Question   -   rbnube gmail.com
    Re: PDF Question   -   Tom Russell
   Re: PDF Question   -   Guyren Howe
    Re: PDF Question   -   Markus Winter
     Re: PDF Question   -   Guyren Howe
   Re: PDF Question   -   Tom Benson

PDF Question
Date: 22.11.08 01:31 (Fri, 21 Nov 2008 19:31:37 -0500)
From: Tom Russell
I have looked and cant seem to locate the answer but is there a way to
show a pdf file within an RB app? Like one would show a url in the html
viewer? So basically a pdf viewer I can drop on a form is what I need.

Thanks.

Tom

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 01:36 (Fri, 21 Nov 2008 16:36:33 -0800)
From: Guyren Howe
On Nov 21, 2008, at 4:31 PM, Tom Russell wrote:

> I have looked and cant seem to locate the answer but is there a way
> to show a pdf file within an RB app? Like one would show a url in
> the html viewer? So basically a pdf viewer I can drop on a form is
> what I need.

You can do it in the HTLM Viewer. This just uses whatever the native
browser (Internet Explorer/Safari) does to display a PDF, so if there
is a suitable plugin, you'll get the pdf in the viewer.

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 01:41 (Fri, 21 Nov 2008 19:41:47 -0500)
From: Tom Russell
If there is no suitable plugin though then Im in trouble I take it?

Guyren Howe wrote:
> On Nov 21, 2008, at 4:31 PM, Tom Russell wrote:
>
>> I have looked and cant seem to locate the answer but is there a way
>> to show a pdf file within an RB app? Like one would show a url in the
>> html viewer? So basically a pdf viewer I can drop on a form is what I
>> need.
>
> You can do it in the HTLM Viewer. This just uses whatever the native
> browser (Internet Explorer/Safari) does to display a PDF, so if there
> is a suitable plugin, you'll get the pdf in the viewer.
>
> Regards,
>
> Guyren G Howe
> Relevant Logic LLC
>
> guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178
>
> REALbasic, PHP, Ruby/Rails, Python programming
> PostgreSQL, MySQL database design and consulting
> Technical writing and training
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 02:01 (Fri, 21 Nov 2008 17:01:46 -0800)
From: Guyren Howe
On Nov 21, 2008, at 4:41 PM, Tom Russell wrote:

> If there is no suitable plugin though then Im in trouble I take it?

I think it will throw over to the system pdf viewer, which I would say
is about the best you can reasonably expect.

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 03:51 (Fri, 21 Nov 2008 19:51:17 -0700)
From: Norman Palardy

On 21-Nov-08, at 5:31 PM, Tom Russell wrote:

> I have looked and cant seem to locate the answer but is there a way
> to show a pdf file within an RB app? Like one would show a url in
> the html viewer? So basically a pdf viewer I can drop on a form is
> what I need.

On OS X you can use a movieplayer

there's a sample on my web site

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

RE: PDF Question
Date: 22.11.08 05:13 (Fri, 21 Nov 2008 23:13:57 -0500)
From: rbnube gmail.com
On Windows you can use an ActiveX component. Search the Web, there are
many. Some very expensive, perhaps some free. You also might search the
NUG.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 14:15 (Sat, 22 Nov 2008 08:15:21 -0500)
From: Tom Russell
Thanks all for the input.

One item I forgot to mention(as always) it needs to be something I can
use cross platform(win/linux and osx)

Thanks.

Norman Palardy wrote:
>
> On 21-Nov-08, at 5:31 PM, Tom Russell wrote:
>
>> I have looked and cant seem to locate the answer but is there a way
>> to show a pdf file within an RB app? Like one would show a url in the
>> html viewer? So basically a pdf viewer I can drop on a form is what I
>> need.
>
> On OS X you can use a movieplayer
>
> there's a sample on my web site
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 08:20 (Fri, 21 Nov 2008 23:20:05 -0800)
From: Guyren Howe
On Nov 21, 2008, at 4:31 PM, Tom Russell wrote:

> I have looked and cant seem to locate the answer but is there a way
> to show a pdf file within an RB app? Like one would show a url in
> the html viewer? So basically a pdf viewer I can drop on a form is
> what I need.

I just looked in a project I did a couple of years ago that did this
very thing. I did use the HTMLViewer quite successfully for this.

*Except* that there was a problem at the time with the Adobe PDFViewer
plugin. As I recall, on MacOS, you weren't able to view the PDF in the
HTMLViewer (worked fine on Windows). The plugin worked in Safari but
did something evil (I don't remember what) to any other webkit viewer.
So I have this code in my startup:

#If TargetMacOS Then

Dim f As FolderItem = GetFolderItem("/Library/Internet\ Plug-Ins/
AdobePDFViewer.plugin", FolderItem.PathTypeShell)
If f.Exists Then f.Delete
//The below ought to make the plugin work, but doesn't.
//http://lists.apple.com/archives/webkitsdk-dev/2006/Apr/msg00046.html
says it should.
'Dim frameworkFolder As FolderItem =
App.ExecutableFile.Parent.Parent.Child("Frameworks")
'//Now look for Adobe Reader folder
'Dim af As FolderItem = GetFolderItem("/Applications",
FolderItem.PathTypeShell)
'If af.Exists Then
'Dim safari As FolderItem = af.Child("Safari.app")
'
'If safari.Exists Then
'Dim f As FolderItem = Safari.Child("Contents")
'If f.Exists Then f = f.Child("Frameworks")
'
'For i As Integer = 1 To f.Count
'Dim g As FolderItem = f.Item(i)
'If frameworkFolder.Child(g.Name).Exists Then
frameworkFolder.Child(g.Name).Delete
'g.CopyFileTo frameworkFolder
'Next
'End If
'End If
#endif

Thought it might be useful, but for all I know, the plugin has been
fixed in Webkit.

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 09:46 (Sat, 22 Nov 2008 09:46:25 +0100)
From: Markus Winter
> Dim f As FolderItem = GetFolderItem("/Library/Internet\ Plug-Ins/
> AdobePDFViewer.plugin", FolderItem.PathTypeShell)
> If f.Exists Then f.Delete

Whoa. Do I get this right? You are deleting your users AdobePDFviewer
plugin?

Why? And what did your users say about your software doing this?

Markus


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 10:21 (Sat, 22 Nov 2008 01:21:48 -0800)
From: Guyren Howe
On Nov 22, 2008, at 12:46 AM, Markus Winter wrote:

>> Dim f As FolderItem = GetFolderItem("/Library/Internet\ Plug-Ins/
>> AdobePDFViewer.plugin", FolderItem.PathTypeShell)
>> If f.Exists Then f.Delete
>
> Whoa. Do I get this right? You are deleting your users AdobePDFviewer
> plugin?
>
> Why? And what did your users say about your software doing this?

It was corporate software, to be used on corporate computers, so it
was fine to do this. Unfortunate, but acceptable.

I don't remember what the problem was, but it made the program
unusable on Macs. I think it crashed the program on loading a PDF.

As I say, this was a couple of years ago. It may well be that the
issue with the plugin is fixed now. But I spent quite some time on
this and couldn't find a better solution, so I thought it was worth
mentioning, and the easiest way to spell out where the problem lay was
to show the code.

To be clear, the problem was with using WebKit browsers that weren't
Safari. If the problem persists, the discussion I linked to in the
code might be useful:

<http://lists.apple.com/archives/webkitsdk-dev/2006/Apr/msg00046.html>

But note that I couldn't get the proffered solution to work from
REALbasic.

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: PDF Question
Date: 22.11.08 10:22 (Sat, 22 Nov 2008 11:22:52 +0200)
From: Tom Benson
Whoa.. evil!!!

Don't delete the users plugins! Also, this code appears to delete some
of the contents of Safari's frameworks folder!!! You should not be
able to do this (if permissions are set properly) without an admin
name/password, and it is still not a good idea even then!

The below is not good advice!

- Tom

On 22/11/2008, at 9:20 AM, Guyren Howe wrote:

> On Nov 21, 2008, at 4:31 PM, Tom Russell wrote:
>
>> I have looked and cant seem to locate the answer but is there a way
>> to show a pdf file within an RB app? Like one would show a url in
>> the html viewer? So basically a pdf viewer I can drop on a form is
>> what I need.
>
> I just looked in a project I did a couple of years ago that did this
> very thing. I did use the HTMLViewer quite successfully for this.
>
> *Except* that there was a problem at the time with the Adobe
> PDFViewer plugin. As I recall, on MacOS, you weren't able to view
> the PDF in the HTMLViewer (worked fine on Windows). The plugin
> worked in Safari but did something evil (I don't remember what) to
> any other webkit viewer. So I have this code in my startup:
>
> #If TargetMacOS Then
>
> Dim f As FolderItem = GetFolderItem("/Library/Internet\ Plug-Ins/
> AdobePDFViewer.plugin", FolderItem.PathTypeShell)
> If f.Exists Then f.Delete
> //The below ought to make the plugin work, but doesn't.
> //http://lists.apple.com/archives/webkitsdk-dev/2006/Apr/msg00046.html
> says it should.
> 'Dim frameworkFolder As FolderItem =
> App.ExecutableFile.Parent.Parent.Child("Frameworks")
> '//Now look for Adobe Reader folder
> 'Dim af As FolderItem = GetFolderItem("/Applications",
> FolderItem.PathTypeShell)
> 'If af.Exists Then
> 'Dim safari As FolderItem = af.Child("Safari.app")
> '
> 'If safari.Exists Then
> 'Dim f As FolderItem = Safari.Child("Contents")
> 'If f.Exists Then f = f.Child("Frameworks")
> '
> 'For i As Integer = 1 To f.Count
> 'Dim g As FolderItem = f.Item(i)
> 'If frameworkFolder.Child(g.Name).Exists Then
> frameworkFolder.Child(g.Name).Delete
> 'g.CopyFileTo frameworkFolder
> 'Next
> 'End If
> 'End If
> #endif
>
> Thought it might be useful, but for all I know, the plugin has been
> fixed in Webkit.
>
> Regards,
>
> Guyren G Howe
> Relevant Logic LLC
>
> guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784
> 3178
>
> REALbasic, PHP, Ruby/Rails, Python programming
> PostgreSQL, MySQL database design and consulting
> Technical writing and training

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>