Jump to content

Container PDF PNG issue on Mac Preview


This topic is 3107 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello

 

I'm having issues accessing a file that was added to Digital Docs tab of the Accounts Table.

Both methods drag and drop and insert button were tested to add a PDF FILE and give the same issue.

Manage Containers indicate on STORAGE the following [database location]/DB_Documents and on THUMBNAILS Generate and store thumb for images checked, Permanent storage checked.

When I try to double click inside the container NOTHING HAPPEN and when I hit the button OPEN it shows the message on the image BUT NOTE that the text on the message is referring to a PNG !!! file and not to a PDF !!!

Well using debugger and data watch the container has the correct name of the file "ASAKI prices list 2014.08.26.pdf" not PNG 

If I open the folder DB_Documents/T01_ACCOUNTS/account_container

the files(attached)  ASAKI prices list 2014.08.26.pdf AND ASAKI prices list 2014.08.26.png (generated- apparently the thumb nail with the internal storage)

are present and when double clicked open without any problems in Preview.

FINALLY this doesn't happen if the container has an Excel file or a word doc (non preview)

 

Any help will substantially reduce my level of stress !

Cheers

Beto Boton

AustraliaPreview_SCR_002.thumb.png.06e3f25e0cfb21 ASAKI prices list 2014.08.26.pdf

ASAKI prices list 2014.08.26.png

Link to comment
Share on other sites

Further investigation on this matter, reveals an issue with script 2306 Accounts_Container_Export OR the way external storage has been handled (could not find out yet).

 

IF we have set a container to store a reference to the file only, while inserting the PDF file, when you hit open, the file will open properly.

BUT.

If you set External storage for the container, the folder Datafiles is created the folder account_container also created and 3 files placed inside as follows
A copy of the original PDF file
A JPG of the original PDF file and
A PNG of the original PDF file

See attached screenshot.Finder_SCR_001.thumb.jpg.338d5cf9c430053

All of the above files will work perfectly if double clicked from the finder opening without a glitch with Preview.

But when called to open via button OPEN script 2306 Accounts_Container_Export calls to open $filename  "Replacing the contents of a field.png" and not the supposed "Replacing the contents of a field.pdf" and gives the error message like the one above 
========

The file  "Replacing the contents of a field.PNG" could not be opened.

======

I do understand the creation of thumbnails, their storage etc. BUT I don't understand why the parameter to open the file in the container is passed as PNG not the file PDF, and why preview is not opening the file, if manually it does? 

This is essential if we receive lots of PDF product catalogs from suppliers.

I hope I explained this issue properly and someone had already solved the puzzle and will be able to help with this.

I'm sure there is something I'm missing...

 

 

Cheers

Beto Boton

 

Link to comment
Share on other sites

We are aware of this issue and have fixed it in the to-be-released version of FileMaker however, I will post the fix here

 

FMSP_Fix.thumb.png.4a0274b5fc417d8d49e6d

 

All you need is the top line of code that says "getContainerAttribute" after that, you put the name of the field that was in the old line of code, then "Filename" 

 

problem Solved,

 

Thanks!

-JH

Link to comment
Share on other sites

Hi Jonathan

THANK YOU very much for your reply!
I believe I'm at a stage of modifications of the original FMSP, I reached a point of no return for a new version.(Modules included etc) 
I'm a newbie trying to do a Pro's job I know...

Let me check with you if I understood correctly.
I was able to identify the following scripts that need to be rectified:

Documents Script 2337
Contacts  Script 2301
Accounts  Script 2306
Projects  Script 2309
Projects  Script 2316, 2317, 2318, 2319 for T16_PROJECTS::contract1,T16_PROJECTS::contract2, T16_PROJECTS::contract3, T16_PROJECTS::contract4

Total of 8 Scripts, any others I missed?

There are 2 types of reference for filenames

First the ones (2316, 2317, 2318, 2319) like "T16_PROJECTS::contract4"
were replaced with
GetContainerAttribute ( T16_PROJECTS::contract4 ; "filename" )
// Middle ( GetAsText(T16_PROJECTS::contract4) ; Position ( GetAsText(T16_PROJECTS::contract4) ; "/" ; 1 ; PatternCount ( GetAsText(T16_PROJECTS::contract4) ; "/" ) ) + 1 ; 1000 )

ALL FINE AND WORKING BUT

others like on script 2306  where the reference is " T01_ACCOUNTS::account_container ; $repetition"
I tried the 2 following options without success

GetContainerAttribute ( T01_ACCOUNTS::account_container ; $repetition; "filename")
Here I get too many parameters

GetContainerAttribute ( (T01_ACCOUNTS::account_container ; $repetition) ; "filename")
an here I get too many parentesis ! hahahah

I have no idea...

HELP !!!
How do we refer to an indexed container like T01_ACCOUNTS::account_container ; $repetition ; "filename" ???

 

Thank you

Beto Boton
Australia

FOUND A POSSIBLE ANSWER, is this correct???
GetContainerAttribute ( T01_ACCOUNTS::account_container[$repetition] ; "filename" )

 

Edited by Beto Boton
FOUND A POSSIBLE ANSWER
Link to comment
Share on other sites

Hey Beto, 

Alright, two things here:

1. You do not need the second line of code that is preceded by the two forward slashes, it is unnecessary after the fix.

2. You need to ONLY change the scripts that are for container EXPORT. The OPEN/IMPORT scripts work just fin.

 

Thanks! 

-JH

  • Like 1
Link to comment
Share on other sites

This topic is 3107 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.