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 Authorware » 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 AuthorwareAllOpening PDFsv2.0

Summary

Impressario 2.x supports documents that conform to version 1.5 or lower of the Portable Document Format (PDF) standard (equivalent to Acrobat 6, or lower). Although many PDF documents created with Acrobat 7 will function properly in Impressario, there are some features, particularly forms, 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.5 as follows:

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

----------------------------------------------------------------------------------------------

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



Article Details
Article ID: 33
Created On: 30 May 2006 03:43 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