📝 The powerpoint viewer (google gview) tweak implementation.

This implementation protects against an ordinary user from stealing a powerpoint presentation by hiding the new window pop-up and hiding the file to show if viewings source in browser. This is NOT a 100% protection, a user who is a skilled web-developer (hacker) can anyway find the location of the .pptx file used and get it by using misc. developer methods. Test of the implementation for a .pptx file can be found here: Test of a pptx and for a .pdf file here: Test of a pdf.

Stealth PPT Viewer & Management System

1. File Inventory & Directory Mapping

The system is comprised of the following files. All files should reside in the same server directory.

File Name Type Access Description
pptviewflat.shtml Main Page Public The user-facing viewer (HTML/CSS/JS).
admin.php Control Private Management GUI for adding/deleting presentations.
load-document.php Logic Engine Public Gateway that performs secret redirects via document-list.php.
document-list.php Database Server PHP array of Secret URLs (Managed by admin.php).
ppt-names.inc Database Public/SSI JS object of Friendly Names (Managed by admin.php).

2. The Master Viewer (pptviewflat.shtml)

Uses Server Side Includes (SSI) to inject metadata and JavaScript to manage the display state. The browser history (Back button) is supported via the popstate listener.

HTML Hooks & SSI Structure
<!-- DATA INJECTION -->
<!--#include virtual="ppt-names.inc" -->

<!-- UI HEADER: ID and Name injected here -->
<div class="ppt-header">
    <span id="display-id"></span>
    <span id="display-name"></span>
</div>

3. The "Center-Clip" Stealth Technique

Google's UI is hidden using a CSS "Mask" technique. By making the iframe wider than the container and shifting its position, we crop out the UI elements.

CSS Logic
.ppt-container {
    position: relative; width: 100%; height: 600px; 
    overflow: hidden; background: #000;
}
.ppt-frame {
    position: absolute; left: 50%; transform: translateX(-50%);
    top: -50px;       /* Hides Top Bar */
    width: 140%;      /* Hides Side Buttons */
    height: calc(100% + 60px); 
    border: none;
}

4. The Logic Layer (load-document.php)

This script is the security gatekeeper. It performs a referer check to ensure requests come from your domain, then includes the document-list.php vault to find the redirect destination.

include(__DIR__ . '/document-list.php'); // Direct link to URL vault
if (array_key_exists($doc_id, $documents)) {
    header("Location: " . $documents[$doc_id]);
    exit;
}

5. Administrative Management (admin.php)

The Presentation Manager provides a secure interface to update your library without writing code. Password: see the source file

6. Security & Implementation Checklist

Target Method Result
URL Privacy PHP Bridge The .pptx path never appears in the browser source code.
Control Privacy Center-Clipping Google's "Download" and "Pop-out" buttons are invisible.
Admin Security Basic Auth Unauthorized users cannot view or edit the URL list.
Pro-Tip: If the PowerPoint appears too small, increase the zoom: 1.1; on the .ppt-frame class or adjust the width: 140% to a higher value for a tighter crop.
Host: Debian Linux, Apache/2.4.63 (Unix), alf.homelinux.net
© 2026 Thunberg's @ Högåsbacke
The page was updated: 2026-02-08
4 Visitors.

Send me a message through my Contact page or just say hello in my Guest Book

"Happiness is'nt around the corner. Hapiness is the corner. No one hates winter like someone who has a motorcycle sitting in their garage"

Cookies
This website only uses a necessary session cookie when logging in to protected pages. The cookie is created when you log in and is deleted when you log out or close your browser. It is not used for statistics, marketing or tracking.