Previewing PDFs in database

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Previewing PDFs in database

Bob Patin
I have a script that used to work… now it fails every time, either with FileMaker 14, 15 or whatever.

I have a long PDF (20+ pages) stored in a container, stored locally;
My script does the following:

Export PDF to temporary folder using this:

$temp_path =

Let (

[
filename = "report.pdf";
tp = Get ( TemporaryPath )
];

tp & filename

)

Open new window with web viewer in it;
Set the web viewer to the path to the PDF in the temporary folder, $temp_path

I get nothing…

Anyone know why this no longer works?

Is there a better way to view a stored PDF from within FileMaker, without exporting the PDF (which the database already does when requested)?

Thanks,

Bob Patin
Longterm Solutions
[hidden email]
615-333-6858
FileMaker 9, 10, 11, 12 & 13 Certified Developer
http://www.longtermsolutions.com
-
iChat: [hidden email]
Twitter: bobpatin

FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: Previewing PDFs in database

Bob Patin
OK, here’s an interesting bit:

I used to be able to use the script below, and the path would work as generated; for test purposes I’m using desktopPath instead of temporaryPath, but the result is the same.

THIS USED TO WORK BUT DOESN"T NOW:
(Mac Pro is my system drive)

file://Mac%20Pro/Users/bobpatin/Desktop/report.pdf <file:///Mac%20Pro/Users/bobpatin/Desktop/report.pdf>

THIS WORKS:

file:///Users/bobpatin/Desktop/report.pdf <file:///Users/bobpatin/Desktop/report.pdf>

So, the web viewer doesn’t like seeing my system drive in the path.

Anyone else seen this anomaly?

For now I’m going to write a CF to strip the system drive from the path...

Bob Patin
Longterm Solutions
[hidden email]
615-333-6858
FileMaker 9, 10, 11, 12 & 13 Certified Developer
http://www.longtermsolutions.com
-
iChat: [hidden email]
Twitter: bobpatin

FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

> On Apr 11, 2017, at 11:31 AM, Bob Patin <[hidden email]> wrote:
>
> I have a script that used to work… now it fails every time, either with FileMaker 14, 15 or whatever.
>
> I have a long PDF (20+ pages) stored in a container, stored locally;
> My script does the following:
>
> Export PDF to temporary folder using this:
>
> $temp_path =
>
> Let (
>
> [
> filename = "report.pdf";
> tp = Get ( TemporaryPath )
> ];
>
> tp & filename
>
> )
>
> Open new window with web viewer in it;
> Set the web viewer to the path to the PDF in the temporary folder, $temp_path
>
> I get nothing…
>
> Anyone know why this no longer works?
>
> Is there a better way to view a stored PDF from within FileMaker, without exporting the PDF (which the database already does when requested)?
>
> Thanks,
>
> Bob Patin
> Longterm Solutions
> [hidden email]
> 615-333-6858
> FileMaker 9, 10, 11, 12 & 13 Certified Developer
> http://www.longtermsolutions.com
> -
> iChat: [hidden email]
> Twitter: bobpatin
> —
> FileMaker Consulting
> FileMaker Hosting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: Previewing PDFs in database

Bob Patin
Solved it by using a CF that I found on Brian Dunning’s CF site to return the path to the temp folder, without the system drive in front of it… that works great in the web viewer.

Bob Patin
Longterm Solutions
[hidden email]
615-333-6858
FileMaker 9, 10, 11, 12 & 13 Certified Developer
http://www.longtermsolutions.com
-
iChat: [hidden email]
Twitter: bobpatin

FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

> On Apr 11, 2017, at 12:12 PM, Bob Patin <[hidden email]> wrote:
>
> OK, here’s an interesting bit:
>
> I used to be able to use the script below, and the path would work as generated; for test purposes I’m using desktopPath instead of temporaryPath, but the result is the same.
>
> THIS USED TO WORK BUT DOESN"T NOW:
> (Mac Pro is my system drive)
>
> file://Mac%20Pro/Users/bobpatin/Desktop/report.pdf <file:///Mac%20Pro/Users/bobpatin/Desktop/report.pdf>
>
> THIS WORKS:
>
> file:///Users/bobpatin/Desktop/report.pdf <file:///Users/bobpatin/Desktop/report.pdf>
>
> So, the web viewer doesn’t like seeing my system drive in the path.
>
> Anyone else seen this anomaly?
>
> For now I’m going to write a CF to strip the system drive from the path...
>
> Bob Patin
> Longterm Solutions
> [hidden email]
> 615-333-6858
> FileMaker 9, 10, 11, 12 & 13 Certified Developer
> http://www.longtermsolutions.com
> -
> iChat: [hidden email]
> Twitter: bobpatin
> —
> FileMaker Consulting
> FileMaker Hosting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>
>> On Apr 11, 2017, at 11:31 AM, Bob Patin <[hidden email]> wrote:
>>
>> I have a script that used to work… now it fails every time, either with FileMaker 14, 15 or whatever.
>>
>> I have a long PDF (20+ pages) stored in a container, stored locally;
>> My script does the following:
>>
>> Export PDF to temporary folder using this:
>>
>> $temp_path =
>>
>> Let (
>>
>> [
>> filename = "report.pdf";
>> tp = Get ( TemporaryPath )
>> ];
>>
>> tp & filename
>>
>> )
>>
>> Open new window with web viewer in it;
>> Set the web viewer to the path to the PDF in the temporary folder, $temp_path
>>
>> I get nothing…
>>
>> Anyone know why this no longer works?
>>
>> Is there a better way to view a stored PDF from within FileMaker, without exporting the PDF (which the database already does when requested)?
>>
>> Thanks,
>>
>> Bob Patin
>> Longterm Solutions
>> [hidden email]
>> 615-333-6858
>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>> http://www.longtermsolutions.com
>> -
>> iChat: [hidden email]
>> Twitter: bobpatin
>> —
>> FileMaker Consulting
>> FileMaker Hosting for all versions of FileMaker
>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>
>> _______________________________________________
>> FMPexperts mailing list
>> [hidden email]
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: Previewing PDFs in database

Richard DeShong
Hi Bob,

The "file" protocol uses the following format:

file://host/path

The "host" is the FQN of the system.  You can use "localhost" or
"127.0.0.1" to reference the local system.  You can also omit it - which
makes it look like:

file:///path

So it is *possible* that FM made an update to the Web Viewer to make the
syntax more "standard".  The name, "Mac%20Pro" is not a standard fqn of
the system - it's a "host" name, so to speak.  Not a standard dns name.

On 4/11/2017 10:33 AM, Bob Patin wrote:

> Solved it by using a CF that I found on Brian Dunning’s CF site to return the path to the temp folder, without the system drive in front of it… that works great in the web viewer.
>
> Bob Patin
> Longterm Solutions
> [hidden email]
> 615-333-6858
> FileMaker 9, 10, 11, 12 & 13 Certified Developer
> http://www.longtermsolutions.com
> -
> iChat: [hidden email]
> Twitter: bobpatin
> —
> FileMaker Consulting
> FileMaker Hosting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>
>> On Apr 11, 2017, at 12:12 PM, Bob Patin <[hidden email]> wrote:
>>
>> OK, here’s an interesting bit:
>>
>> I used to be able to use the script below, and the path would work as generated; for test purposes I’m using desktopPath instead of temporaryPath, but the result is the same.
>>
>> THIS USED TO WORK BUT DOESN"T NOW:
>> (Mac Pro is my system drive)
>>
>> file://Mac%20Pro/Users/bobpatin/Desktop/report.pdf <file:///Mac%20Pro/Users/bobpatin/Desktop/report.pdf>
>>
>> THIS WORKS:
>>
>> file:///Users/bobpatin/Desktop/report.pdf <file:///Users/bobpatin/Desktop/report.pdf>
>>
>> So, the web viewer doesn’t like seeing my system drive in the path.
>>
>> Anyone else seen this anomaly?
>>
>> For now I’m going to write a CF to strip the system drive from the path...
>>
>> Bob Patin
>> Longterm Solutions
>> [hidden email]
>> 615-333-6858
>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>> http://www.longtermsolutions.com
>> -
>> iChat: [hidden email]
>> Twitter: bobpatin
>> —
>> FileMaker Consulting
>> FileMaker Hosting for all versions of FileMaker
>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>
>>> On Apr 11, 2017, at 11:31 AM, Bob Patin <[hidden email]> wrote:
>>>
>>> I have a script that used to work… now it fails every time, either with FileMaker 14, 15 or whatever.
>>>
>>> I have a long PDF (20+ pages) stored in a container, stored locally;
>>> My script does the following:
>>>
>>> Export PDF to temporary folder using this:
>>>
>>> $temp_path =
>>>
>>> Let (
>>>
>>> [
>>> filename = "report.pdf";
>>> tp = Get ( TemporaryPath )
>>> ];
>>>
>>> tp & filename
>>>
>>> )
>>>
>>> Open new window with web viewer in it;
>>> Set the web viewer to the path to the PDF in the temporary folder, $temp_path
>>>
>>> I get nothing…
>>>
>>> Anyone know why this no longer works?
>>>
>>> Is there a better way to view a stored PDF from within FileMaker, without exporting the PDF (which the database already does when requested)?
>>>
>>> Thanks,
>>>
>>> Bob Patin
>>> Longterm Solutions
>>> [hidden email]
>>> 615-333-6858
>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>> http://www.longtermsolutions.com
>>> -
>>> iChat: [hidden email]
>>> Twitter: bobpatin
>>> —
>>> FileMaker Consulting
>>> FileMaker Hosting for all versions of FileMaker
>>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>>
>>> _______________________________________________
>>> FMPexperts mailing list
>>> [hidden email]
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>> _______________________________________________
>> FMPexperts mailing list
>> [hidden email]
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

--
Richard DeShong
Logic Tools
510-642-5123 office
925-285-1088 cell

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: Previewing PDFs in database

Bob Patin
Interesting… it *used to* work, but I suppose they changed it.


Bob Patin
Longterm Solutions
[hidden email]
615-333-6858
FileMaker 9, 10, 11, 12 & 13 Certified Developer
http://www.longtermsolutions.com
-
iChat: [hidden email]
Twitter: bobpatin

FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

> On Apr 11, 2017, at 12:50 PM, Richard DeShong <[hidden email]> wrote:
>
> Hi Bob,
>
> The "file" protocol uses the following format:
>
> file://host/path
>
> The "host" is the FQN of the system.  You can use "localhost" or "127.0.0.1" to reference the local system.  You can also omit it - which makes it look like:
>
> file:///path
>
> So it is *possible* that FM made an update to the Web Viewer to make the syntax more "standard".  The name, "Mac%20Pro" is not a standard fqn of the system - it's a "host" name, so to speak.  Not a standard dns name.
>
> On 4/11/2017 10:33 AM, Bob Patin wrote:
>> Solved it by using a CF that I found on Brian Dunning’s CF site to return the path to the temp folder, without the system drive in front of it… that works great in the web viewer.
>>
>> Bob Patin
>> Longterm Solutions
>> [hidden email]
>> 615-333-6858
>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>> http://www.longtermsolutions.com
>> -
>> iChat: [hidden email]
>> Twitter: bobpatin
>> —
>> FileMaker Consulting
>> FileMaker Hosting for all versions of FileMaker
>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>
>>> On Apr 11, 2017, at 12:12 PM, Bob Patin <[hidden email]> wrote:
>>>
>>> OK, here’s an interesting bit:
>>>
>>> I used to be able to use the script below, and the path would work as generated; for test purposes I’m using desktopPath instead of temporaryPath, but the result is the same.
>>>
>>> THIS USED TO WORK BUT DOESN"T NOW:
>>> (Mac Pro is my system drive)
>>>
>>> file://Mac%20Pro/Users/bobpatin/Desktop/report.pdf <file:///Mac%20Pro/Users/bobpatin/Desktop/report.pdf>
>>>
>>> THIS WORKS:
>>>
>>> file:///Users/bobpatin/Desktop/report.pdf <file:///Users/bobpatin/Desktop/report.pdf>
>>>
>>> So, the web viewer doesn’t like seeing my system drive in the path.
>>>
>>> Anyone else seen this anomaly?
>>>
>>> For now I’m going to write a CF to strip the system drive from the path...
>>>
>>> Bob Patin
>>> Longterm Solutions
>>> [hidden email]
>>> 615-333-6858
>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>> http://www.longtermsolutions.com
>>> -
>>> iChat: [hidden email]
>>> Twitter: bobpatin
>>> —
>>> FileMaker Consulting
>>> FileMaker Hosting for all versions of FileMaker
>>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>>
>>>> On Apr 11, 2017, at 11:31 AM, Bob Patin <[hidden email]> wrote:
>>>>
>>>> I have a script that used to work… now it fails every time, either with FileMaker 14, 15 or whatever.
>>>>
>>>> I have a long PDF (20+ pages) stored in a container, stored locally;
>>>> My script does the following:
>>>>
>>>> Export PDF to temporary folder using this:
>>>>
>>>> $temp_path =
>>>>
>>>> Let (
>>>>
>>>> [
>>>> filename = "report.pdf";
>>>> tp = Get ( TemporaryPath )
>>>> ];
>>>>
>>>> tp & filename
>>>>
>>>> )
>>>>
>>>> Open new window with web viewer in it;
>>>> Set the web viewer to the path to the PDF in the temporary folder, $temp_path
>>>>
>>>> I get nothing…
>>>>
>>>> Anyone know why this no longer works?
>>>>
>>>> Is there a better way to view a stored PDF from within FileMaker, without exporting the PDF (which the database already does when requested)?
>>>>
>>>> Thanks,
>>>>
>>>> Bob Patin
>>>> Longterm Solutions
>>>> [hidden email]
>>>> 615-333-6858
>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>>> http://www.longtermsolutions.com
>>>> -
>>>> iChat: [hidden email]
>>>> Twitter: bobpatin
>>>> —
>>>> FileMaker Consulting
>>>> FileMaker Hosting for all versions of FileMaker
>>>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>>>>
>>>> _______________________________________________
>>>> FMPexperts mailing list
>>>> [hidden email]
>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>> _______________________________________________
>>> FMPexperts mailing list
>>> [hidden email]
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>> _______________________________________________
>> FMPexperts mailing list
>> [hidden email]
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
> --
> Richard DeShong
> Logic Tools
> 510-642-5123 office
> 925-285-1088 cell
>
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: Previewing PDFs in database

tim ballering-2
In reply to this post by Bob Patin
We use the built in FMP Get(TemporaryPath)

Tim Ballering
[hidden email]



> On Apr 11, 2017, at 12:33 PM, Bob Patin <[hidden email]> wrote:
>
> Solved it by using a CF that I found on Brian Dunning’s CF site to return the path to the temp folder, without the system drive in front of it… that works great in the web viewer.

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: Previewing PDFs in database

Andrew Duncan
In reply to this post by Bob Patin
Hi Bob,

Did you update to macOS 10.12.4 recently by any chance? That update included a security update which prevents a file:/ url which includes the boot volume name from being valid – this is the most likely reason why this has started happening.

cheers,
Andrew


    Interesting? it *used to* work, but I suppose they changed it.
   
   
    Bob Patin
    Longterm Solutions
    [hidden email]
    615-333-6858
    FileMaker 9, 10, 11, 12 & 13 Certified Developer
    http://www.longtermsolutions.com
    -
    iChat: [hidden email]
    Twitter: bobpatin
    ?
    FileMaker Consulting
    FileMaker Hosting for all versions of FileMaker
    PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
   
    > On Apr 11, 2017, at 12:50 PM, Richard DeShong <[hidden email]> wrote:
    >
    > Hi Bob,
    >
    > The "file" protocol uses the following format:
    >
    > file://host/path
    >
    > The "host" is the FQN of the system.  You can use "localhost" or "127.0.0.1" to reference the local system.  You can also omit it - which makes it look like:
    >
    > file:///path
    >
    > So it is *possible* that FM made an update to the Web Viewer to make the syntax more "standard".  The name, "Mac%20Pro" is not a standard fqn of the system - it's a "host" name, so to speak.  Not a standard dns name.
    >
    > On 4/11/2017 10:33 AM, Bob Patin wrote:
    >> Solved it by using a CF that I found on Brian Dunning?s CF site to return the path to the temp folder, without the system drive in front of it? that works great in the web viewer.
    >>
    >> Bob Patin
    >> Longterm Solutions
    >> [hidden email]
    >> 615-333-6858
    >> FileMaker 9, 10, 11, 12 & 13 Certified Developer
    >> http://www.longtermsolutions.com
    >> -
    >> iChat: [hidden email]
    >> Twitter: bobpatin
    >> ?
    >> FileMaker Consulting
    >> FileMaker Hosting for all versions of FileMaker
    >> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
    >>
    >>> On Apr 11, 2017, at 12:12 PM, Bob Patin <[hidden email]> wrote:
    >>>
    >>> OK, here?s an interesting bit:
    >>>
    >>> I used to be able to use the script below, and the path would work as generated; for test purposes I?m using desktopPath instead of temporaryPath, but the result is the same.
    >>>
    >>> THIS USED TO WORK BUT DOESN"T NOW:
    >>> (Mac Pro is my system drive)
    >>>
    >>> file://Mac%20Pro/Users/bobpatin/Desktop/report.pdf <file:///Mac%20Pro/Users/bobpatin/Desktop/report.pdf>
    >>>
    >>> THIS WORKS:
    >>>
    >>> file:///Users/bobpatin/Desktop/report.pdf <file:///Users/bobpatin/Desktop/report.pdf>
    >>>
    >>> So, the web viewer doesn?t like seeing my system drive in the path.
    >>>
    >>> Anyone else seen this anomaly?
    >>>
    >>> For now I?m going to write a CF to strip the system drive from the path...
    >>>
    >>> Bob Patin
    >>> Longterm Solutions
    >>> [hidden email]
    >>> 615-333-6858
    >>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
    >>> http://www.longtermsolutions.com
    >>> -
    >>> iChat: [hidden email]
    >>> Twitter: bobpatin
    >>> ?
    >>> FileMaker Consulting
    >>> FileMaker Hosting for all versions of FileMaker
    >>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
    >>>
    >>>> On Apr 11, 2017, at 11:31 AM, Bob Patin <[hidden email]> wrote:
    >>>>
    >>>> I have a script that used to work? now it fails every time, either with FileMaker 14, 15 or whatever.
    >>>>
    >>>> I have a long PDF (20+ pages) stored in a container, stored locally;
    >>>> My script does the following:
    >>>>
    >>>> Export PDF to temporary folder using this:
    >>>>
    >>>> $temp_path =
    >>>>
    >>>> Let (
    >>>>
    >>>> [
    >>>> filename = "report.pdf";
    >>>> tp = Get ( TemporaryPath )
    >>>> ];
    >>>>
    >>>> tp & filename
    >>>>
    >>>> )
    >>>>
    >>>> Open new window with web viewer in it;
    >>>> Set the web viewer to the path to the PDF in the temporary folder, $temp_path
    >>>>
    >>>> I get nothing?
    >>>>
    >>>> Anyone know why this no longer works?
    >>>>
    >>>> Is there a better way to view a stored PDF from within FileMaker, without exporting the PDF (which the database already does when requested)?
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Bob Patin
    >>>> Longterm Solutions
    >>>> [hidden email]
    >>>> 615-333-6858
    >>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
    >>>> http://www.longtermsolutions.com
    >>>> -
    >>>> iChat: [hidden email]
    >>>> Twitter: bobpatin
    >>>> ?
    >>>> FileMaker Consulting
    >>>> FileMaker Hosting for all versions of FileMaker
    >>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
    >>>>
    >>>> _______________________________________________
    >>>> FMPexperts mailing list
    >>>> [hidden email]
    >>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
    >>> _______________________________________________
    >>> FMPexperts mailing list
    >>> [hidden email]
    >>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
    >> _______________________________________________
    >> FMPexperts mailing list
    >> [hidden email]
    >> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
    >
    > --
    > Richard DeShong
    > Logic Tools
    > 510-642-5123 office
    > 925-285-1088 cell
    >
    > _______________________________________________
    > FMPexperts mailing list
    > [hidden email]
    > http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
   
 


_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: Previewing PDFs in database

Bob Patin
I did; so, if you include the boot volume, it invalidates the URL? If so, that explains it—that makes a lot of sense, since it continued to work on the PC.

I could save the PDF to the temp folder without incident, since that’s not an URL, so what I do now is to export the PDF to the temp directory, then I use a CF to return the temp path *without* the boot volume, and use that for the web viewer. Works fine.

B


Bob Patin
Longterm Solutions
[hidden email]
615-333-6858
FileMaker 9, 10, 11, 12 & 13 Certified Developer
http://www.longtermsolutions.com
-
iChat: [hidden email]
Twitter: bobpatin

FileMaker Consulting
FileMaker Hosting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

> On Apr 12, 2017, at 5:42 AM, Andrew Duncan <[hidden email]> wrote:
>
> Hi Bob,
>
> Did you update to macOS 10.12.4 recently by any chance? That update included a security update which prevents a file:/ url which includes the boot volume name from being valid – this is the most likely reason why this has started happening.
>
> cheers,
> Andrew
>
>
>    Interesting? it *used to* work, but I suppose they changed it.
>
>
>    Bob Patin
>    Longterm Solutions
>    [hidden email]
>    615-333-6858
>    FileMaker 9, 10, 11, 12 & 13 Certified Developer
>    http://www.longtermsolutions.com
>    -
>    iChat: [hidden email]
>    Twitter: bobpatin
>    ?
>    FileMaker Consulting
>    FileMaker Hosting for all versions of FileMaker
>    PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
>
>> On Apr 11, 2017, at 12:50 PM, Richard DeShong <[hidden email]> wrote:
>>
>> Hi Bob,
>>
>> The "file" protocol uses the following format:
>>
>> file://host/path
>>
>> The "host" is the FQN of the system.  You can use "localhost" or "127.0.0.1" to reference the local system.  You can also omit it - which makes it look like:
>>
>> file:///path
>>
>> So it is *possible* that FM made an update to the Web Viewer to make the syntax more "standard".  The name, "Mac%20Pro" is not a standard fqn of the system - it's a "host" name, so to speak.  Not a standard dns name.
>>
>> On 4/11/2017 10:33 AM, Bob Patin wrote:
>>> Solved it by using a CF that I found on Brian Dunning?s CF site to return the path to the temp folder, without the system drive in front of it? that works great in the web viewer.
>>>
>>> Bob Patin
>>> Longterm Solutions
>>> [hidden email]
>>> 615-333-6858
>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>> http://www.longtermsolutions.com
>>> -
>>> iChat: [hidden email]
>>> Twitter: bobpatin
>>> ?
>>> FileMaker Consulting
>>> FileMaker Hosting for all versions of FileMaker
>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
>>>
>>>> On Apr 11, 2017, at 12:12 PM, Bob Patin <[hidden email]> wrote:
>>>>
>>>> OK, here?s an interesting bit:
>>>>
>>>> I used to be able to use the script below, and the path would work as generated; for test purposes I?m using desktopPath instead of temporaryPath, but the result is the same.
>>>>
>>>> THIS USED TO WORK BUT DOESN"T NOW:
>>>> (Mac Pro is my system drive)
>>>>
>>>> file://Mac%20Pro/Users/bobpatin/Desktop/report.pdf <file:///Mac%20Pro/Users/bobpatin/Desktop/report.pdf>
>>>>
>>>> THIS WORKS:
>>>>
>>>> file:///Users/bobpatin/Desktop/report.pdf <file:///Users/bobpatin/Desktop/report.pdf>
>>>>
>>>> So, the web viewer doesn?t like seeing my system drive in the path.
>>>>
>>>> Anyone else seen this anomaly?
>>>>
>>>> For now I?m going to write a CF to strip the system drive from the path...
>>>>
>>>> Bob Patin
>>>> Longterm Solutions
>>>> [hidden email]
>>>> 615-333-6858
>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>>> http://www.longtermsolutions.com
>>>> -
>>>> iChat: [hidden email]
>>>> Twitter: bobpatin
>>>> ?
>>>> FileMaker Consulting
>>>> FileMaker Hosting for all versions of FileMaker
>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
>>>>
>>>>> On Apr 11, 2017, at 11:31 AM, Bob Patin <[hidden email]> wrote:
>>>>>
>>>>> I have a script that used to work? now it fails every time, either with FileMaker 14, 15 or whatever.
>>>>>
>>>>> I have a long PDF (20+ pages) stored in a container, stored locally;
>>>>> My script does the following:
>>>>>
>>>>> Export PDF to temporary folder using this:
>>>>>
>>>>> $temp_path =
>>>>>
>>>>> Let (
>>>>>
>>>>> [
>>>>> filename = "report.pdf";
>>>>> tp = Get ( TemporaryPath )
>>>>> ];
>>>>>
>>>>> tp & filename
>>>>>
>>>>> )
>>>>>
>>>>> Open new window with web viewer in it;
>>>>> Set the web viewer to the path to the PDF in the temporary folder, $temp_path
>>>>>
>>>>> I get nothing?
>>>>>
>>>>> Anyone know why this no longer works?
>>>>>
>>>>> Is there a better way to view a stored PDF from within FileMaker, without exporting the PDF (which the database already does when requested)?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Bob Patin
>>>>> Longterm Solutions
>>>>> [hidden email]
>>>>> 615-333-6858
>>>>> FileMaker 9, 10, 11, 12 & 13 Certified Developer
>>>>> http://www.longtermsolutions.com
>>>>> -
>>>>> iChat: [hidden email]
>>>>> Twitter: bobpatin
>>>>> ?
>>>>> FileMaker Consulting
>>>>> FileMaker Hosting for all versions of FileMaker
>>>>> PHP ? Full email services ? Free DNS hosting ? Colocation ? Consulting
>>>>>
>>>>> _______________________________________________
>>>>> FMPexperts mailing list
>>>>> [hidden email]
>>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>>> _______________________________________________
>>>> FMPexperts mailing list
>>>> [hidden email]
>>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>> _______________________________________________
>>> FMPexperts mailing list
>>> [hidden email]
>>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>>
>> --
>> Richard DeShong
>> Logic Tools
>> 510-642-5123 office
>> 925-285-1088 cell
>>
>> _______________________________________________
>> FMPexperts mailing list
>> [hidden email]
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
>
>
>
>
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au