inm logo
Corporate Website | Contact | Store | Support | Login  
     


Knowledgebase
View categorized listing of all common frequently asked questions.
Downloads
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM Impressario for Director » How to find out if a PDF document is supported by Impressario
Support Page Banner
 How to find out if a PDF document is supported by Impressario
Product:Platform:Area:Version:
Impressario for DirectorAllOpening PDFs1

Summary

Impressario supports documents that conform to version 1.4 or lower of the Portable Document Format (PDF) standard (equivalent to Acrobat 5, or lower). Although many PDF documents created with Acrobat 6 will function properly in Impressario, there are some features that are not supported, and the results of working with such documents are unpredictable.

If your application allows end-users to browse and open PDFs of their choice, how can you prevent them from opening a document that is not supported, or at least warn them of the possible negative consequences?

Solution

The global method GetPDFVersion() returns a string containing the version of PDF standard that a document conforms to.

Call this method after setting the FileName property and check to see if the result is greater than 1.4 as follows:

-- check the PDF version when opening a file
member ("MyPDF").PathType = #RelativeToMovie
member ("MyPDF").Filename = "PDFs/WhitePaper.PDF"
ver = member("MyPDF").GetPDFVersion()
if ( Float( Chars(ver,1,3) ) > 1.4 ) then
     -- display warning message
     alert ("Warning: This PDF document was created using a PDF standard higher than 1.4."    \
               & RETURN & " Some features may not be supported.")
end if


-- alternatively, for greater control, close the file if it isn't supported
member ("MyPDF").PathType = #RelativeToMovie
member ("MyPDF").Filename = "PDFs/WhitePaper.PDF"
ver = member("MyPDF").GetPDFVersion()
if ( Float( Chars(ver,1,3) ) > 1.4 ) then
     -- close the file
     member ("MyPDF").Filename = "" 
     -- display message
     alert ("Sorry. The PDF document you have selected cannot be opened." & RETURN &    /
         "It uses a PDF standard greater than 1.4, which is not supported by this software.")
end if



Article Details
Article ID: 18
Created On: 30 May 2006 01:30 PM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom