I want to show several PDF's on a web page. My preferred method would be to include the thumbnails in a list. If the user clicks on it it will download or show in another browser tab/window.
Right now I have a list with images that shows click here to view PDF and then it opens in new tab.
VL-WEB Show multiple PDF's
Re: VL-WEB Show multiple PDF's
Hi Art,
Looks like you need an additional software o service (sometimes free) to be able to generate a jpg file from a pdf (pdf thumbnail service, sending the number of page you want to use, size, etc), then you could show that result jpg in the subfile. you could create the jpg when receiving the pdf or on the fly but not sure if on the fly will change the speed of the process as you have to give them the whole pdf to generate the single jpg image.
But if you want to show several PDF's in a web page, tiles could be an easy way. just add a web page inside the tile and you are done:
depending how many pdfs or how big, it could take long time.
tile example (reusable part test129c):
web page showing the tile:
Looks like you need an additional software o service (sometimes free) to be able to generate a jpg file from a pdf (pdf thumbnail service, sending the number of page you want to use, size, etc), then you could show that result jpg in the subfile. you could create the jpg when receiving the pdf or on the fly but not sure if on the fly will change the speed of the process as you have to give them the whole pdf to generate the single jpg image.
But if you want to show several PDF's in a web page, tiles could be an easy way. just add a web page inside the tile and you are done:
depending how many pdfs or how big, it could take long time.
tile example (reusable part test129c):
Code: Select all
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_Tile.iTileDesign *ListFields #ListFields) Displayposition(1) Height(177) Layoutmanager(#TableLayout_1) Left(0) Tabposition(1) Top(0) Width(352)
* Fields mapped in when the entry is added to the Tile
Group_By Name(#ListFields) Fields(#STD_DESC)
Define_Com Class(#PRIM_PANL) Name(#ImagePanel) Displayposition(1) Height(73) Image(#xImageImage32) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Width(48)
Define_Com Class(#PRIM_LABL) Name(#Title) Caption('Title') Displayposition(2) Ellipses(Word) Height(20) Left(48) Marginleft(2) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Themedrawstyle('Strong') Top(0) Verticalalignment(Center) Width(304) Wordwrap(False)
Define_Com Class(#PRIM_LABL) Name(#Caption1) Caption('Caption') Displayposition(3) Ellipses(Word) Height(53) Left(48) Marginleft(2) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(20) Verticalalignment(Center) Width(304) Wordwrap(False)
Define_Com Class(#Prim_tblo) Name(#TableLayout_1)
Define_Com Class(#Prim_tblo.Column) Name(#Column1) Parent(#TableLayout_1) Units(Pixels) Width(48) Displayposition(1)
Define_Com Class(#Prim_tblo.Column) Name(#Column2) Parent(#TableLayout_1) Displayposition(2)
Define_Com Class(#Prim_tblo.Row) Name(#Row1) Height(20) Parent(#TableLayout_1) Units(Pixels) Displayposition(1)
Define_Com Class(#Prim_tblo.Row) Name(#Row2) Parent(#TableLayout_1) Displayposition(2)
Define_Com Class(#Prim_tblo.Row) Name(#Row3) Parent(#TableLayout_1) Displayposition(3)
Define_Com Class(#Prim_tblo.Row) Name(#Row4) Parent(#TableLayout_1) Displayposition(4)
Define_Com Class(#Prim_tblo.item) Name(#Item1) Column(#Column1) Manage(#ImagePanel) Parent(#TableLayout_1) Row(#Row1) Rowspan(2)
Define_Com Class(#Prim_tblo.item) Name(#Item2) Column(#Column2) Manage(#Title) Parent(#TableLayout_1) Row(#Row1)
Define_Com Class(#Prim_tblo.item) Name(#Item3) Column(#Column2) Manage(#Caption1) Parent(#TableLayout_1) Row(#Row2)
Define_Com Class(#PRIM_TBLO.Item) Name(#TableLayout_1Item1) Manage(#Page1) Parent(#TableLayout_1) Row(#Row3) Column(#Column1) Rowspan(2) Columnspan(2)
Define_Com Class(#PRIM_WEB.Page) Name(#Page1) Description('Web Page') Displayposition(4) Height(104) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(73) Width(352)
Mthroutine Name(OnAdd) Options(*REDEFINE)
#Page1.Source := 'http://www.africau.edu/images/default/sample.pdf'
Endroutine
End_Com
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>) Height(657) Width(1512)
Define_Com Class(#PRIM_TILE<#TEST129c>) Name(#Tile1) Displayposition(1) Left(16) Parent(#COM_OWNER) Tabposition(1) Top(24) Height(537) Width(1345)
Evtroutine Handling(#Com_owner.Initialize)
Inz_List Named(#Tile1) Num_Entrys(10)
Endroutine
End_Com
Re: VL-WEB Show multiple PDF's
I never thought of showing a web page in the tile. That's a great idea. I'll give it a try. Thanks
Art Tostaine
Re: VL-WEB Show multiple PDF's
Dino where did you get RP TEST129? Is that V15? With LANSA being sold there is little to no chance we'd upgrade to V15
Art Tostaine
Re: VL-WEB Show multiple PDF's
Hi Art,
The tiles have been for a while and I think they will continue been used for a long while, just like LANSA...
I created that tile in V15, using the File, New, Reusable Part, Tile Design:
which by default creates this code where you have to fill your fields in the Group_By and your presentation logic for the tile:
The tiles have been for a while and I think they will continue been used for a long while, just like LANSA...
I created that tile in V15, using the File, New, Reusable Part, Tile Design:
which by default creates this code where you have to fill your fields in the Group_By and your presentation logic for the tile:
Code: Select all
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_Tile.iTileDesign *ListFields #ListFields) Displayposition(1) Height(80) Layoutmanager(#TableLayout_1) Left(0) Tabposition(1) Top(0) Width(160)
* Fields mapped in when the entry is added to the Tile
Group_by Name(#ListFields)
Define_Com Class(#PRIM_PANL) Name(#ImagePanel) Displayposition(1) Height(40) Image(#xImageImage32) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Width(48)
Define_Com Class(#PRIM_LABL) Name(#Title) Caption('Title') Displayposition(2) Ellipses(Word) Height(20) Left(48) Marginleft(2) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Themedrawstyle('Strong') Top(0) Verticalalignment(Center) Width(112) Wordwrap(False)
Define_Com Class(#PRIM_LABL) Name(#Caption1) Caption('Caption') Displayposition(5) Ellipses(Word) Height(20) Left(48) Marginleft(2) Parent(#COM_OWNER) Tabposition(5) Tabstop(False) Top(20) Verticalalignment(Center) Width(112) Wordwrap(False)
Define_Com Class(#PRIM_LABL) Name(#Caption2) Caption('Caption') Displayposition(4) Ellipses(Word) Height(20) Left(48) Marginleft(2) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(40) Verticalalignment(Center) Width(112) Wordwrap(False)
Define_Com Class(#PRIM_LABL) Name(#Caption3) Caption('Caption') Displayposition(3) Ellipses(Word) Height(20) Left(48) Marginleft(2) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(60) Verticalalignment(Center) Width(112) Wordwrap(False)
Define_Com Class(#Prim_tblo) Name(#TableLayout_1)
Define_Com Class(#Prim_tblo.Column) Name(#Column1) Parent(#TableLayout_1) Units(Pixels) Width(48) Displayposition(1)
Define_Com Class(#Prim_tblo.Column) Name(#Column2) Parent(#TableLayout_1) Displayposition(2)
Define_Com Class(#Prim_tblo.Row) Name(#Row1) Height(20) Parent(#TableLayout_1) Units(Pixels) Displayposition(1)
Define_Com Class(#Prim_tblo.Row) Name(#Row2) Parent(#TableLayout_1) Displayposition(2)
Define_Com Class(#Prim_tblo.Row) Name(#Row3) Parent(#TableLayout_1) Displayposition(3)
Define_Com Class(#Prim_tblo.Row) Name(#Row4) Parent(#TableLayout_1) Displayposition(4)
Define_Com Class(#Prim_tblo.item) Name(#Item1) Column(#Column1) Manage(#ImagePanel) Parent(#TableLayout_1) Row(#Row1) Rowspan(2)
Define_Com Class(#Prim_tblo.item) Name(#Item2) Column(#Column2) Manage(#Title) Parent(#TableLayout_1) Row(#Row1)
Define_Com Class(#Prim_tblo.item) Name(#Item3) Column(#Column2) Manage(#Caption1) Parent(#TableLayout_1) Row(#Row2)
Define_Com Class(#Prim_tblo.item) Name(#Item4) Column(#Column2) Manage(#Caption2) Parent(#TableLayout_1) Row(#Row3)
Define_Com Class(#Prim_tblo.item) Name(#Item5) Column(#Column2) Manage(#Caption3) Parent(#TableLayout_1) Row(#Row4)
Mthroutine Name(OnAdd) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnDelete) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnFind) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnItemGotFocus) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnItemGotReference) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnItemGotSelection) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnItemLostFocus) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnItemLostSelection) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnItemRealizing) Options(*REDEFINE)
Endroutine
Mthroutine Name(OnUpdate) Options(*REDEFINE)
Endroutine
End_Com
Re: VL-WEB Show multiple PDF's
Thanks. I thought you had sent a sample RP from the LANSA repository.
Art Tostaine