Basic PDF viewer using Custom Command Definition

154 views
Skip to first unread message

Grigory Filatov

unread,
Aug 1, 2025, 5:54:42 AMAug 1
to Harbour Minigui
Hi there,

I would like to introduce a built-in PDF viewer for MiniGUI (demo source code included).

Here is the explanation.

💡 Summary

This application is a basic PDF viewer built using MiniGUI Extended. It allows users to open and view PDF documents inside a resizable window.

---

🔍 Purpose

To create a small desktop application using MiniGUI that allows the user to:

* Open a window titled "Embedded PDF Viewer"
* Click a button labeled "Open PDF"
* Select a PDF file from their system
* Display the selected PDF embedded within the application's window

---

🧩 Key Components

1. Custom Command Definition

   #command @ <row>,<col> PDFVIEWER <name> ...

   * This defines a custom command PDFVIEWER for embedding PDF viewing functionality using DefinePDFViewer() function.

2. Main() Function

   * Initializes the GUI window with:

     * A button labeled "Open PDF"
     * Event handlers for resizing the PDF viewer when the window is resized or maximized
   * Activates the window to show it to the user

3. ViewPDF() Function

   * Called when the "Open PDF" button is clicked
   * Prompts the user to select a .pdf file
   * Releases the existing PDF viewer if one exists
   * Creates a new PDF viewer embedded in the form with the selected file

---

image.png

Your feedback is welcome.

Regards,
Grigory
Main.prg

rry...@poczta.onet.pl

unread,
Aug 4, 2025, 6:52:52 AMAug 4
to Harbour Minigui
Where are that functions ? 
 I use VER 25.06 of minigui.
I got "unresolved external error"  :
RELEASEPDFVIEWER
DEFINEPDFVIEWR



Grigory Filatov

unread,
Aug 4, 2025, 7:55:30 AMAug 4
to Harbour Minigui
Hi Richard,

These  functions  will be included in the next version of MiniGUI along with the new command @ <row>,<col> PDFVIEWER <name> FILE <pdfname>.

Thank you for your attention.

Regards,
Grigory

понедельник, 4 августа 2025 г. в 12:52:52 UTC+2, rry...@poczta.onet.pl:

Aure

unread,
Aug 6, 2025, 3:07:10 AMAug 6
to minigu...@googlegroups.com
Gracias.

Un abrazo
--
Visit our website on https://www.hmgextended.com/ or https://www.hmgextended.org/
---
You received this message because you are subscribed to the Google Groups "Harbour Minigui" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minigui-foru...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/minigui-forum/4eb54e29-00e2-4149-8c56-95101b8d46a5n%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages