Opentopia Directory Encyclopedia Tools

SNP File Format

Encyclopedia : S : SN : SNP : SNP File Format


Description

The SNP file format is used by Microsoft Access to store Report Snapshots in a single file which can be viewed and printed by the Microsoft [Snapshot Viewer], available as a free download from Microsoft. This allows report output to be exported and viewed on computers which do not have Microsoft Access installed.

File Format

SNP files are based on the Microsoft Compound File Binary Format (CFBF), which is also the basis for the Advanced Authoring Format (AAF). CFBF is a reasonably simple container format which can store multiple files, directories and so on. For SNP files, Access uses CFBF to store each page as a separate Enhanced Metafile (EMF) containing all of the graphics commands required to reproduce the page. Since CFBF files are not compressed, Microsoft's CAB format is used to reduce the size of the CFBF, resulting in a compact file format which may be only a few kilobytes in size for each page of text and simple graphics - lines, boxes, etc.

Working with the pages of an SNP file programatically involves the following steps:

  1. Extract contents of SNP file using CAB decompression routines (such as the Windows API "SetupIterateCabinet" from the "SetupAPI" library)
  2. Open the resulting file "_AccRpt_.snp" as a CFBF file
  3. Enumerate the files in the CFBF to find the EMF files for each page
  4. Extract the EMF file(s) from the CFBF for the desired page(s)
The resultant EMF files are suitable for display or import in a number of graphics programs, can be added to Word documents, Powerpoint presentations, etc. This is useful especially because there is limited or no support for SNP files in most places where EMF files can be used.

The above can be implemented in Visual Basic for Applications, which gives Access developers the ability to create custom report interfaces by loading the EMF files into Image objects and so on.

Disclaimer & License

The investigation of the SNP file format which lead to the above information was conducted with information and tools which are freely available online. The author therefore believes that the above does not represent any breach of copyright or infringement on the intellectual property of any person or organisation. As such the Author explicitly agrees to license this article under the [Text_of_the_GNU_Free_Documentation_LicenseGFDL].

Licensing information for the SNP, CAB and AAF are probably available from their respective creators/owners.

References

The following references relate to the Compound File Binary Format format:

External Links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: