Jump to content

PDF in container field closes


QuinTech

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

Recommended Posts

At the risk of being ostracized by the community, i am double-posting the below because it doesn't seem to have gotten many views in the Container Fields forum and it's a matter of considerable importance to me. Please forgive me (or at least ignore the post!) I know i personally never visit the Container Fields forum, so maybe someone smarter in PDF matters than i am will pick it up here.

Begging your pardon,

Jerry

doah.gifSorry.1.gifHelp.1.gifBow.1.gif

Hi, all. We are trying to make a file that contains a bunch of PDF documentation. Two of us have worked on the file, myself and my boss. We both insert PDFs into a container field the same way, namely:

1. Right-click the field

2. Select Insert Object and then Create From File

3. Browse to the PDF or enter the path

4. Uncheck the "Link" and "Display As Icon" boxes

5. Click OK

For the PDFs that the boss has inserted, when a user double-clicks the contatiner field, the appropriate PDF is opened in Acrobat Reader as expected, with the title "Acrobat Document in FIlename.fp5" in the title bar. However (and here's the kicker), the next mouse-click inside of Filemaker causes Acrobat to close unless that click is inside the container field. It is as if de-activating that field closes Adobe.

All that is understandable, if less-than-desirable. But what really confuses me is that the PDFs i insert do not exhibit the same behavior. That is, if you double-click the container field, the PDF opens in Acrobat, and the title bar shows the original pathname for the PDF. Any actions inside of Filemaker do not affect this Acrobat session. In fact, Acrobat stays open even if FM is closed.

Behavior seems to be consistent with what i described above when the fp5 is moved to a third machine, so i don't believe it is a reference issue. I've tested it with Adobe 6 and Adobe 4, so i don't think it is an Adobe issue. Any ideas on where i should look to figure out what we are doing differently?

I have attached the Filemaker 6 file if you want to see the behavior. The first record holds a PDF that he inserted, and which (for us) closes as soon as you click elsewhere within FM; the second record holds one i inserted, and which should not close no matter what you do in FM.

Thanks for any help you can give!

Jerry

Link to comment
Share on other sites

Interesting. I wonder if it has to do with either the acrobat version or how the PDF was created. The second record in your file did open and stay open if I closed FileMaker - it did take 3 clicks for it to open.

One thing I did notice is the window title of the 2 records. Look a records 3 and 4 - they show the acrobat window titles for the respective 1 and 2 record files. Record 1 seems to be activating the Acrobat window (Acrobat Document in PDF.fp5) within the container field - similar to activating a WORD document in a container field, where the record 2 file is launching the file in Acrobat outside of FileMaker (Embedded file).

I could not reproduce the same as record 2 no matter how I inserted/copied/created the file inside the field - it always came in the same as record 1.

No solution though. sorry, QuinTech

PDFs.zip

Link to comment
Share on other sites

QuinTech - try this file.

I imported the PDF files like you said. Then I dragged the file from the container field to my desktop, which created a 'scrap' file. I then reinserted the scrap file back into the field. Not necessarily a solution, but interesting behavior.

You got my curiosity up on this one...

PDFsNo2.zip

Link to comment
Share on other sites

Are you and your boss using the same OS and same version of Acrobat?

Yes; no. Both on XP, neither of us Service Pack 2. He is using Acrobat 5, i am using Acrobat Reader 6. A co-worker who is using Acrobat Reader 6 sees the same issues as he does. I do not believe the version of Adobe used to create the file is a factor; we have both inserted PDFs that we downloaded from the IRS website and seen different behavior using the same PDFs.

Look a records 3 and 4 - they show the acrobat window titles for the respective 1 and 2 record files.

For the second PDF, where you are seeing "Embedded File", i see "C__DOCUME~1_Smith_Desktop_PDF1[1].pdf", which was the path the file was at when i inserted it. This happens only on the computer that stored the PDF when it was inserted.

On a Windows 98 machine opening the same FM file in Acrobat Reader 4, double-clicking the first document gives the same title bar you show -- "Acrobat Document in PDFs.fp5" -- and that disappears upon the next mouse-click in FM. But the second document stays open and has a title that seems to be a randomly-generated name, for example, "PKGA201.pdf" or "PKGC235.pdf". I can locate this file in my Windows temp folder, and it stays there even after i close the file. On a lark, i searched the registry for these strings and found nothing. There were no files in C:Program FilesAdobe that had been modified at the time it was opened, nor in C:PFCommon FilesAdobe, so it does not seem that name came from any Adobe program files. I wonder if the name came from any Microsoft OLE extensions, but i can't begin to imagine how i would determine that.

I then reinserted the scrap file

I did this too, and it worked for me, even when testing the file on another machine. However, i wonder if it is because you and i have the ability to insert PDFs that don't close, but my boss doesn't? What happens if you insert a PDF of your own? Does it stay open or not? I've never heard of anyone else with this issue, so it may very well boil down to an issue on the boss' computer.

Also, with the scrap file, when i open it on XP i get a File Download warning message that asks me if i want to save the file or open it (and the save option is greyed out). Do you get that? It could be disconcerting for a user.

Thanks for checking this out, DykstrL. I greatly appreciate the help and respect your opinion immensely -- you may not post as much as some others, but you always seem to come out on the big and tough issues and know exactly what's going on.

J

Link to comment
Share on other sites

OK, in the course of writing that last post i found something which deserves its own post. Go back to my original attachment. In the first record, right-click in the field and select Edit Package Package. If you're like me, this will open an Acrobat Document. This implies to me that the package is an Acrobat Document.

Now do the same for the second record: right-click, Edit Package Package. Again, if you're like me, this time the Microsoft Object Packager will open. This implies to me that the package is a package -- wish i knew exactly what that meant. With that open, task manager shows me a running process called packager.exe, and i can find that exe in C:WindowsSystem (among other places).

I unfortunately don't have my boss' computer available to look at, but here's my theory:

He is missing the Microsoft Object Packager and thus is not able to create a file that is unpackaged into the Windows OS; it stays wholly within FM and is subject to FM's whims, which is why it is closed by FM.

If this is an issue specific to that one computer and not applicable to anyone else reading this forum, boy will i feel stupid. And now i have to spend an hour researching the MS Object Packager.

Thanks again for the help.

J

Link to comment
Share on other sites

Embedding OLE objects

You can embed an OLE object on a layout or in a container field. When you embed an object in a container field, the object becomes a part of your database. You can embed a new object that will live only in your FileMaker Pro file, or you can embed an object that already exists in an external file. FileMaker Pro knows what application created the object (called the server application), and opens that application when you want to edit, work, or play with the object.

This seems key. "FileMaker Pro knows what application created the object ... and opens that application." Surmise: Case 1, FM opens Adobe, which lives for as long as the field is active and dies when the field becomes inactive. Case 2, FM opens the object packager, which spits out the Adobe file into the file system and then closes itself. This doesn't close the Adobe file, because there was an intermediary step.

I'll test this theory and let you know what went down. I am still very curious to see if Packager.exe is missing from my boss' computer. He is currently taking a well-deserved day off.

Link to comment
Share on other sites

  • 2 weeks later...

OK, i have some more news on this. No real resolution, but a cumbersome workaround.

Again, the issue: PDF files inserted into FM6 container fields on one particular computer are automatically closed when the record holding that PDF is exited. This closing happens on all computers. In the same file, when objects are inserted on a different computer, the PDF stays open even after the record is exited, which seems to be universally more desirable.

My analysis: For whatever reason, the computer that causes the problem does not use an application called Packager.exe (found in %SYSTEM%) as the default application to handle insertion of objects in FMP. Instead, it uses the application identified with the file's extension (Adobe, in this case). As a result, the object you insert is just a PDF file. Apparently, objects in FMP container fields only live as long as the record is active. Thus, when you exit the record, the object is killed, meaning (in this case) the PDF disappears.

On my computer (and, apparently, the majority of Windows computers), Packager.exe is the default application for inserting objects into FMP container fields. Thus, an object that i insert is not a PDF, but a package; again, this object (the package) lives only as long as the record is active, so the package is killed when you exit the FMP record. However -- and this is the fun part -- by the time it is killed, the package has already done its work, which is to extract the actual PDF into (i believe) the temp directory. So killing the package has no effect on the PDF.

The workaround that i used on the offending computer was this:

1. Open Packager (Start > Run > Packager).

2. From File, select Import... , browse to the desired PDF, and click Open.

3. From Edit, select Copy Package.

4. Open the FMP file that is to hold the PDFs, create a new record, and right-click on the appropriate container field.

5. Select Paste Package.

If you do this, then for all computers, the PDF selected should stay alive until the user chooses to close it.

I'd still love to know how to control FM's default application for objects, so that i can switch it to Packager for the offending computer. Still so much to learn...

HTHOALTDYFMII, *

J

* hope this helps, or at least temporarily distracts you from more important issues

Link to comment
Share on other sites

This topic is 7031 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.