We know that Xbrowse is the most powerfull browser and PDF's are the most used document files. I'm not able to show the pdf's like we do the jpg, bmp in browse.
From a post yesterday mr. Rao had these options. Can it be converted to include the viewing of pdf's ? At this point I need a 3the party to convert the pdf to jpg for browsing large data files.
Sample with XImage (from Mr. Rao) https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45155&sid=4d9e57d7689b479b76d45fd4c4cf140f
The sample uses Memo files, but that is NOT needed. Just a lot of pdf's in a location on disk.
Mr. Rao, if you are reading this, you once placed a preview of Xbrowse showing the Pdf's. and lots of other extensions. I would be happy if only the Pdf's can be added for this time.
Code from inside Xbrowse
From a post yesterday mr. Rao had these options. Can it be converted to include the viewing of pdf's ? At this point I need a 3the party to convert the pdf to jpg for browsing large data files.
Sample with XImage (from Mr. Rao) https://forums.fivetechsupport.com/viewtopic.php?f=3&t=45155&sid=4d9e57d7689b479b76d45fd4c4cf140f
The sample uses Memo files, but that is NOT needed. Just a lot of pdf's in a location on disk.
Mr. Rao, if you are reading this, you once placed a preview of Xbrowse showing the Pdf's. and lots of other extensions. I would be happy if only the Pdf's can be added for this time.
#include "fivewin.ch"
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFont, oBrw, oImage
if !File( "IMAGES.DBF" )
CreateImagesDBF()
endif
USE IMAGES NEW SHARED VIA "DBFCDX"
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16
DEFINE DIALOG oDlg SIZE 800,400 PIXEL TRUEPIXEL FONT oFont ;
TITLE "XBROWSE + XIMAGE"
@ 20,20 XBROWSE oBrw SIZE 380,-20 PIXEL OF oDlg ;
DATASOURCE "IMAGES" ;
COLUMNS "FOLDER", "NAME" ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:AutoFit()
:nStretchCol := 1
:bChange := { || oImage:Refresh() }
:CreateFromCode()
END
@ 20,400 XIMAGE oImage SIZE -20,-20 OF oDlg ;
SOURCE ( oBrw:cAlias )->IMAGE
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
//----------------------------------------------------------------------------//
function CreateImagesDBF()
DBCREATE( "IMAGES.DBF", { { "NAME", "C", 10, 0 }, ;
{ "FOLDER", "C", 40, 0 }, { "IMAGE", "M", 8, 0 } }, ;
"DBFCDX", .T., "IMG" )
AEval( ;
{ "..\bitmaps\olga1.jpg", "..\bitmaps\sea.bmp", ;
"..\bitmaps\pngs\2.png", "..\bitmaps\007.bmp" }, <|c|
DBAPPEND()
FIELD->NAME := UPPER( cFileName( c ) )
FIELD->FOLDER := cFilePath( c )
FIELD->IMAGE := MEMOREAD( c )
return nil
> )
CLOSE IMG
return nil#include "fivewin.ch"
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oDlg, oFont, oBrw, oImage
if !File( "IMAGES.DBF" )
CreateImagesDBF()
endif
USE IMAGES NEW SHARED VIA "DBFCDX"
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16
DEFINE DIALOG oDlg SIZE 800,500 PIXEL TRUEPIXEL FONT oFont ;
TITLE "XBROWSE WITHOUT XIMAGE"
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "IMAGES" ;
COLUMNS "FOLDER", "NAME", "IMAGE" ;
COLSIZES 200,150,400 ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:oRightCol := "IMAGE"
:oRightCol:lFullHeight := .t.
:oRightCol:nDataBmpAlign := AL_CENTER
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
//----------------------------------------------------------------------------//
function CreateImagesDBF()
DBCREATE( "IMAGES.DBF", { { "NAME", "C", 10, 0 }, ;
{ "FOLDER", "C", 40, 0 }, { "IMAGE", "M", 8, 0 } }, ;
"DBFCDX", .T., "IMG" )
AEval( ;
{ "..\bitmaps\olga1.jpg", "..\bitmaps\sea.bmp", ;
"..\bitmaps\pngs\2.png", "..\bitmaps\007.bmp" }, <|c|
DBAPPEND()
FIELD->NAME := UPPER( cFileName( c ) )
FIELD->FOLDER := cFilePath( c )
FIELD->IMAGE := MEMOREAD( c )
return nil
> )
CLOSE IMG
return nilMarc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
