//TH-Header //***************************************************************************************** // Copyright (c) 2022 Antwise Solutions // All rights reserved. // // $FileName : SyncFusion\AppSrc\csfWebPdfViewer.pkg // $ProjectName : SyncFusion Library // $Authors : Wil van Antwerpen // $Created : 2022-08-10 // // Contents: // This is a web framework wrapper class for the PdfViewer control. // Documentation for the API is here: // https://ej2.syncfusion.com/documentation/api/pdfviewer // and tips & tricks here: // https://ej2.syncfusion.com/documentation/pdfviewer/getting-started/ // Syncfusion demo's: // https://ej2.syncfusion.com/javascript/demos/#/bootstrap5/pdfviewer/default.html // //***************************************************************************************** //TH-RevisionStart // ******************** // MODIFICATION SUMMARY // ******************** // ####### DD/MM/YYYY WHO COMMENT //TH-RevisionEnd Use csfWebBaseControl.pkg Class csfWebPdfViewer is a csfWebBaseControl Procedure Construct_Object Forward Send Construct_Object // Default is "" { WebProperty=Client } Property String psResourceUrl "" // The pdf viewer component depends on a webservice for handling the pdf components. // This can be a docker service or a .net webservice running locally at your server. // Assuming you followed the steps from the wiki then the URL for this // is "http://localhost/sfWebPdfViewer/api/pdfviewer" // That's assuming you are using the supplied .net webservice and kept the application // path as above. // Default is "" { WebProperty=Client } Property String psServiceUrl "" { WebProperty=Client } Property String psDocumentPath "" // // If set then it determines the width of the Grid. If equal to 0 then it uses the width as // automatically determined. { WebProperty=Client } Property Integer piWidth 0 // enable/disable onCreated event { WebProperty=Client } Property Boolean pbServerOnCreated False // Private properties used for configuring the viewer. Set psJSClass To "sf.WebPdfViewer" Set piColumnSpan to 0 // Schedule will span the whole width by default (0 does this) Set piHeight To 550 End_Procedure Procedure Unload String[] sData Send ClientAction "unloadViewer" End_Procedure // Hook that can be used to load data or to do any post configure grid // actions. Procedure onPostConfigureViewer End_Procedure { Visibility=Private } Procedure doPostConfigureViewer Send onPostConfigureViewer End_Procedure Procedure doRenderViewer Send OnRender Send ClientAction "renderViewer" End_Procedure { Visibility=Private } Procedure ConfigurePdfViewer String[] asParams tWebValueTree tVT Send ClientAction "configurePdfViewer" asParams tVT Send doPostConfigureViewer Send doRenderViewer End_Procedure // // Executes before we ask the grid to render itself. // This is a good hook for calling your RestoreLayout logic. // Procedure OnRender End_Procedure // Triggers when the component in the browser is created. (needs to be enabled) { MethodType=Event } Procedure OnCreated End_Procedure Procedure End_Construct_Object WebPublishProcedure ConfigurePdfViewer WebPublishProcedure OnCreated Forward Send End_Construct_Object End_Procedure End_Class