Help needed with pdf files
Posted
#1
(In Topic #603)
Regular

I don't see a pdf component in Gambas 3.15.2
Any help would be welcome
Posted
Regular

bill-lancaster said
…I don't see a pdf component in Gambas 3.15.2…
Take a look at gb.Poppler, but this component is still in the unstable state.
Posted
Guru

<IMG src="https://www.cogier.com/gambas/poppler.png">
</IMG>EDIT
Sorry, beaten by 2 mins by Steve. Going to the loo now for a cry!
Posted
Regular

Posted
Guru

or gb.poppler
no pdf without one of those installed
Posted
Regular

Posted
Regular

bill-lancaster said
The problem is that neither is available in Project properties/components
OK, you probably need to install them, as they may not have been included during your install of gambas3.
If you are running a Debian derivative (e.g. Ubuntu) then either open Synaptic of go to a terminal and type:-
sudo apt install gambas3-gb-poppler
gb.pdf is deprecated.
Posted
Regular

Thanks
Posted
Guru

bill-lancaster said
That's great, didn't realise you could install individual components like that!
Thanks
Yes there's a number of components that are not included with the standard gambas3 install and have to be installed explicitly.
If you load Synaptic or another software manager and type gambas in the search box you can see all off them and what ones you have installed.
Or to just install all open a terminal and type sudo apt-get install gambas3*
Here's the complete list……
<HIGHLIGHT highlight="shell">
bonus@bonus-G33M-DS2R:~$ apt-cache search gambas3
gambas3 - Complete visual development environment for Gambas
gambas3-dev - transitional package
gambas3-devel - Gambas compilation tools
gambas3-gb-args - Gambas arguments parser
gambas3-gb-cairo - Gambas bindings for cairo
gambas3-gb-chart - Gambas charting component
gambas3-gb-clipper - Gambas Clipper component
gambas3-gb-complex - Gambas Complex component
gambas3-gb-compress - Gambas compression component
gambas3-gb-compress-bzlib2 - Gambas bzlib2 component
gambas3-gb-compress-zlib - Gambas zlib compression component
gambas3-gb-crypt - Gambas crypt encription component
gambas3-gb-data - Gambas abstract datatypes component
gambas3-gb-db - Gambas database access common libraries
gambas3-gb-db-form - Gambas database bound controls
gambas3-gb-db-mysql - MySQL driver for the Gambas database
gambas3-gb-db-odbc - ODBC driver for the Gambas database
gambas3-gb-db-postgresql - PostgreSQL driver for the Gambas database
gambas3-gb-db-sqlite2 - Gambas sqlite2 driver database
gambas3-gb-db-sqlite3 - Gambas sqlite3 driver database
gambas3-gb-dbus - Gambas bindings for DBUS
gambas3-gb-dbus-trayicon - Gambas support for KDE & Unity tray icon DBus protocols
gambas3-gb-desktop - Gambas Portland project compatibility component
gambas3-gb-desktop-x11 - Gambas X11 component
gambas3-gb-eval-highlight - Gambas syntax highlighting component
gambas3-gb-form - Gambas native form component
gambas3-gb-form-dialog - Gambas enhanced standard dialogs component
gambas3-gb-form-editor - Gambas Text Editor component
gambas3-gb-form-mdi - Gambas multiple document interface management component
gambas3-gb-form-print - Gambas generic preview and printing
gambas3-gb-form-stock - Gambas form stock icons
gambas3-gb-form-terminal - Gambas terminal emulator
gambas3-gb-gmp - Gambas GMP component
gambas3-gb-gsl - Gambas GNU Scientific Library component
gambas3-gb-gtk - Gambas GTK+ component
gambas3-gb-gtk-opengl - Gambas GTK+ OpenGL component
gambas3-gb-gtk3 - Gambas GTK+3 component
gambas3-gb-httpd - Gambas HTTP server
gambas3-gb-image - Gambas image effects
gambas3-gb-image-effect - Gambas image effects: effects
gambas3-gb-image-imlib - Gambas image effects: IMLIB bindings
gambas3-gb-image-io - Gambas image effects: I/O
gambas3-gb-inotify - Gambas inotify component
gambas3-gb-libxml - Gambas libxml component
gambas3-gb-logging - Gambas logging system component
gambas3-gb-map - Gambas online map viewer
gambas3-gb-markdown - Gambas markup syntax
gambas3-gb-media - Gambas media component
gambas3-gb-media-form - Gambas media player component
gambas3-gb-memcached - Gambas memcached client
gambas3-gb-mime - Gambas MIME message management
gambas3-gb-mysql - Gambas MySQL component
gambas3-gb-ncurses - Gambas NCurses component
gambas3-gb-net - Gambas networking component
gambas3-gb-net-curl - Gambas advanced networking component
gambas3-gb-net-pop3 - Gambas POP3 client implementation
gambas3-gb-net-smtp - Gambas smtp protocol component
gambas3-gb-openal - Gambas OpenAL component
gambas3-gb-opengl - Gambas OpenGL component
gambas3-gb-opengl-glsl - Gambas OpenGL component: GL Shading Language subcomponent
gambas3-gb-opengl-glu - Gambas OpenGL utility
gambas3-gb-opengl-sge - Gambas SDL Game Engine
gambas3-gb-openssl - Gambas OpenSSL component
gambas3-gb-option - Gambas option component
gambas3-gb-pcre - Gambas regexp component
gambas3-gb-pdf - Gambas PDF component
gambas3-gb-poppler - Gambas PDF component
gambas3-gb-qt5 - Gambas Qt5 GUI component
gambas3-gb-qt5-ext - Gambas QT5 toolkit extensions
gambas3-gb-qt5-opengl - Gambas OpenGL component with QT5 toolkit
gambas3-gb-qt5-webkit - Gambas QT5 WebKit component
gambas3-gb-report - Gambas report component
gambas3-gb-report2 - Gambas interpreter utility routines component.
gambas3-gb-scanner - Gambas frontend to scanimage provided by the SANE toolkit.
gambas3-gb-sdl - Gambas SDL component
gambas3-gb-sdl-sound - Gambas SDL component
gambas3-gb-sdl2 - Gambas SDL2 component
gambas3-gb-sdl2-audio - Gambas SDL2 component
gambas3-gb-settings - Gambas utilities class
gambas3-gb-signal - Gambas OS signal library
gambas3-gb-term - Gambas VT-100 terminal emulator
gambas3-gb-term-form - Gambas VT-102 terminal emulator
gambas3-gb-util - Gambas interpreter utility routines component.
gambas3-gb-util-web - Gambas interpreter utility routines component.
gambas3-gb-v4l - Gambas video for Linux component
gambas3-gb-vb - Gambas Visual Basic(tm) compatibility component
gambas3-gb-web - Gambas CGI for web applications
gambas3-gb-web-feed - Gambas web feed parser and generator
gambas3-gb-web-form - Gambas web applications GUI component
gambas3-gb-web-gui - Gambas web applications GUI component using processes as session
gambas3-gb-xml - Gambas XML component
gambas3-gb-xml-html - Gambas HTML component
gambas3-gb-xml-rpc - Gambas RPC component
gambas3-gb-xml-xslt - Gambas XSLT component
gambas3-ide - Visual development environment for the Gambas programming language
gambas3-runtime - Gambas runtime interpreter
gambas3-scripter - Gambas scripter
gambas3-examples - Gambas examples
gambas3-gb-gui - Gambas graphical toolkit selector
gambas3-gb-gui-opengl - transitional package
gambas3-gb-gui-qt - transitional package
gambas3-gb-gui-qt-webkit - transitional package
gambas3-gb-gui-trayicon - transitional package
gambas3-gb-jit - Gambas Just-In-Time compiler component
gambas3-script - Gambas scripter
gambas3-templates - transitional package
bonus@bonus-G33M-DS2R:~$
</HIGHLIGHT>
Posted
Regular

gb.poppler is showing 'greyed-out' in components but I now have pdfdocuments.
Any idea how to display a document page in DocumentView?
I can load a file with:-
Code
If Not Dialog.OpenFile() Then hDoc = New PdfDocument(Dialog.Path)
An earlier example used
Code
Paint.DrawRichText(hDoc[Page + 1].Image,,,
But hDocdoes not have .image as a property. If there is an example somewhere I'd be pleased to study it but the 'Farm' has been showing as empty for a while now!
Posted
Regular

This gets the pdf image into the viewer
Code
Public Sub DocumentView1_Draw(Page As Integer, Width As Integer, Height As Integer)
Dim img As Image = hDoc[Page].Render(Desktop.Resolution)
Paint.DrawImage(img, 0, 0, Paint.Width, Paint.Height)
End
Just figuring out how to change the page and how to use the zoom
Posted
Guru

I had a look at this issue some time ago. The attached program will open and display a pdf, so I thought it might be of interest to you. Note that the program is far from complete.
1 guest and 0 members have just viewed this.


