Content Filetypes

Applies to HTML Viewer, IE Browser publications.

By default, all HTML pages, images, JavaScript scripts, CSS files compiled in an HTML Executable publication or ebook are protected: they are never unpacked temporarily to the hard disk and thus cannot be easily copied by the end user.

However, special content like Adobe Flash files SWF, MP4, Flash video files FLV, video, audio OGG, MP3 and WAV, Adobe PDF (if you are not using the built-in PDF viewer), Windows Media Player WMA or WMP, Java applets (CLASS) is rendered by objects or external plug-ins (ActiveX controls) and these objects may require the input file to be either downloaded from an HTTP server (through an HTTP connection) or read from a physical file on the hard disk; in other words not directly from memory.

Consequently, HTML Executable offers these four methods as workarounds:

  • extract to disk“: special content files may be first extracted to a temporary location on the user’s hard disk, in order to be read by the object or plug-in. When the ebook is closed, these files are removed.

  • virtual file“: extract special content files to memory only and create virtual files (see below).

  • serve with built-in server“: the runtime module uses a built-in HTTP server that delivers special content directly to the plug-in. However, this HTTP server may be blocked by third-party firewalls, antivirus programs, or user account restrictions.

  • extract and open it in application“: the runtime module unpacks the file to a temporary location on the user’s hard disk, and start the default associated application to open the file. For instance, if you choose this method for WAV sound files, the default media player will be opened to play the WAV file.

The last method is useful if you don’t use the PDF internal viewer and you want to open it in the default PDF reader such as Adobe Reader.

HTML Viewer publications do not support the built-in HTTP server option.

It is also possible to use external files and encrypt them: refer to the Encrypt External Files topic.

How to choose a method

By default, methods were configured to handle different situations efficiently. For instance, some files will be extracted to a temporary location while others will be served with the built-in HTTP server, as you can see on this screenshot:

special content

To identify special content, IE publications use file extensions automatically while HTML Viewer publications use the Page Dependencies feature when necessary. If you are creating an HTML Viewer publication, you may need to use the Page Dependencies feature to get some objects to work like Flash.

To add a file extension, click Add and enter the extension including the dot. To remove an extension, select it and click Remove. To reset the file extension list, click Reset.

Example: an HTML page contains an object like a video player. This player requires an AVI file. When the player requests the AVI file, the ebook unpacks the AVI file to the hard disk (in a temporary location) so that the player can find it.

When you select an extension, you can choose what option should be used: “extract to disk”, “virtual file”, “serve with built-in server” or “extract and open it in application”.

For security reasons, the runtime module does not automatically extract all requested files to the hard disk. Only files whose extensions are in the Special File Extension List will be either extracted to the hard disk, virtualized or delivered by the HTTP server.

Please see dedicated topics for special content like:

A solution to protect your content: virtualization or external file encryption

HTML Executable offers a virtualization feature for files that require to be unpacked to the hard disk in order to be read by objects or plug-ins. When you have chosen the “virtual file” method for a special content file, your ebook creates virtual files: these files are actually written in memory, and not on the hard disk. External objects and plug-ins will believe that the files are on the hard disk, while they are actually in memory only.

Consequently, no content is written to the hard disk and thus it is harder to copy a virtual file.

This feature has been successfully tested both with HTML Viewer publications and IE publications. It works with Adobe PDF files, Flash files, video and audio files… However, please keep in mind that it may require a large amount of free RAM.

You can define the maximum size for a virtual file in Megabytes: if the size of a file exceeds this limit, it will be unpacked to the hard disk.

The capacity in Megabytes of the virtual memory storage created by the ebook may be configured too. If the storage exceeds its capacity, it is completely emptied.

You can also programmatically clear the virtual storage using the HEScript function called ClearVirtualCache.

For advanced users, it is possible to unpack files to the virtual memory thanks to HEScript functions: UnpackVirtualResource and RemoveVirtualResource.

It is also possible to use external files and encrypt them: refer to the Encrypt External Files topic.

The Virtualization feature works only for files compiled in the publication. If your publication downloads files from a remote server (such as Flash files hosted on a server), they will be stored in the Temporary Internet Files folder as usual.


Copyright G.D.G. Software 2018. All rights reserved