Jump to content

Robert Gilland

Members
  • Content Count

    27
  • Joined

  • Last visited

Everything posted by Robert Gilland

  1. I am using Delphi 10.2. How do I define an array of records in the type library editor?
  2. I have a ALL.groupproj file, and I want to rearrage the order of the projects contained within, how do I do that? Using Delpho 10.2
  3. Robert Gilland

    Indy & OpenSSL 1.1.1 & TLS 1.3

    I cannot understate the necessity to handle TLS1.3!
  4. I am having real trouble trying to create an SQLLite Database at runtime in Android. Does anyone know how to do this?
  5. Robert Gilland

    Android Create SQLLite Database at Runtime.

    Previous code was procedure Tdtmdl.CheckDatabaseExists; var EmptyDB: string; begin if not FileExists(DBPath) then begin EmptyDB := DocumentsFolderPath + 'empty.sqlite'; TFile.Copy(EmptyDB, DBPath); end; end; procedure Tdtmdl.ConfigureDatabaseAndTable; var SQL: string; SL: TStringList; begin // if fActiveApp = TActiveApp.aaNone then exit; cnctnDB.Params.Values['Database'] := DBPath; CheckDatabaseExists; try cnctnDB.Connected := true; except on e:Exception do begin end; end;
  6. Robert Gilland

    PDF to PNG and PNG to PDF

    I cannot find any component that converts pdf to png, or png to pdf, that in not .NET. Has anyone found any?
  7. Robert Gilland

    PDF to PNG and PNG to PDF

    We are trying to run this code as a linux service and the service is freezing. Can this code work under linux service conditions?
  8. Robert Gilland

    Android Create SQLLite Database at Runtime.

    Victory: I created an empty file fist by this method and then all good: lsDBPath := DBPath; if( not FileExists(lsDBPAth))then begin lhandle := System.SysUtils.FileCreate(lsDBPath); System.SysUtils.FileClose(lhandle); end; cnctnDB.Params.Values['Database'] := lsDBPath; cnctnDB.Params.Values['SQLiteAdvanced'] := 'page_size=4096'; cnctnDB.Params.Values['OpenMode'] := 'ReadWrite';
  9. Robert Gilland

    PDF to PNG and PNG to PDF

    It seems to me that this library requires gnome or kde installed is that correct? I am getting an access violation when the GtkWindowNew function is called, so I am guessing the Linux box needs a GUI installed to run this code. Is that right? LibGDKHandle := LoadLibrary(PChar(LIB_GDK)); if LibGDKHandle = 0 then raise Exception.Create('libgdk-3 not found.'); GdkAtomIntern := GetProcAddress(LibGDKHandle, 'gdk_atom_intern'); LibGLibHandle := LoadLibrary(PChar(LIB_GLIB)); if LibGLibHandle = 0 then raise Exception.Create('GLIB 2 is required to be installed.'); GFree := GetProcAddress(LibGLibHandle, 'g_free'); IntClipboardOwner := GtkWindowNew(0);
  10. Robert Gilland

    Use testflight with Delphi

    Okay, but where do you deploy it to, what target platform? ie, how to get the built apk to the MacOS Transporter from Delphi 11.3?
  11. I am using Delphi 11.3 I type a single quote in my IDE editing a pascal unit, and the quote does not appear until I press the space character. What is happening? More than this if I press a capital C after the single quote, I get a C with a tail underneath it. Very strange.
  12. Robert Gilland

    PDF to PNG and PNG to PDF

    After all this, The SynPDF library is not compiling under Linux (ALexandria 11.3)
  13. Robert Gilland

    PDF to PNG and PNG to PDF

    Thanks Alexander, This code is windows specific. I am attempting to convert it to firemonkey code so it can run under linux. This is what I have so far. O don't know how to replace TGPBitmap to a firemonkey equivalent. var PrintDoc : THtDocument; li, liPageCount : Integer; locanvas : THtCanvasFMX; loBitMap : TBitmap; loScene : THtCanvasScene; loRect : TRect; loImage : TGPBitmap; begin PrintDoc := THtDocument.Create(THtCanvasFMX.PrintCanvasClass); // Convert PDF to HTML and parse result PrintDoc.Parse(THtDocumentConverter.FiletoHTML(psPDFFile)); // Make paged layout if( LandScape )then PrintDoc.GeneratePagesForPrint(297,210) else PrintDoc.GeneratePagesForPrint(210, 297); // SetLength(PNG, D.Surface.PageCount); FLoadPNGs.Clear; for li := 0 to PrintDoc.Surface.PageCount - 1 do begin locanvas := THtCanvasFMX.Create; try loBitMap := TBitmap.Create(PrintDoc.Surface.Pages[li].WidthPx ,PrintDoc.Surface.Pages[li].HeightPx); try // Render page loRect.Create(0,0,PrintDoc.Surface.Pages[li].WidthPx ,PrintDoc.Surface.Pages[li].HeightPx); loScene.Init(loRect, loBitMap.Canvas); locanvas.BeginScene(loScene); THtPageMeta(PrintDoc.Surface.Pages[li]).Meta.Play(locanvas); locanvas.EndScene; // Save to PNG loImage := TGPBitmap.Create(loBitMap.Handle, loBitMap.Palette); try GetEncoderClsid('image/png', PNGEncoder); BS := TBytesStream.Create(nil); SA := TStreamAdapterFix.Create(BS, soOwned) as IStream; Image.Save(SA, PNGEncoder); PNG[i] := Copy(BS.Bytes, 0, BS.Size); finally Image.Free end; finally B.Free end; finally C.Free end
  14. Robert Gilland

    PDF to PNG and PNG to PDF

    I have now received the latest html components library, and have successfully generated a PDF from a list of PNG files (thank you). However, I cannot find anything within the html component library that will export PDF file to PNG Files.
  15. Robert Gilland

    PDF to PNG and PNG to PDF

    https://delphihtmlcomponents.com/office.html looks like it's task is to covert to HTML. It doesn't say it can convert PDF to PNG or PNG to PDF.
  16. I currently use Web Services Tool kit (https://wiki.freepascal.org/Web_Service_Toolkit) To generate WSDL documents, and server side implementation classes which I override to implement a SOAP web service. It is fantastic. I am looking to migrate to REST services. I have gone through all of the demos of the MARS-Curiosity REST Library. I cannot find anywhere where I can define my GET/POST/PUT API's . And then plug in my service side Delphi code. I find no instructions on how to even start building REST API's.
  17. Robert Gilland

    How to even start? WSDL to REST

    That sounds great. My current plan is to see if I can use the OpenAPI demo as a basis and see if I can get something actually working. I am a bit lost as to how to GET a large binary file (5MB) with MARS. Everything right now is explorative. As I already have implemented all this functionality in WSDL.
  18. Robert Gilland

    How to even start? WSDL to REST

    Thank you Andrea, I have already done what you describe, and I don't know how to move forward from this skeleton application. I am used to generating the interface in WSDL using Web Services Tool kit and then having the Tool Kit auto generate Delphi classes I can easily plug my actual Delphi data access code in. It does not seem that is possible in REST. It would be good to be able to build a YAML file and then have a set of pascal classes created to actually implement the REST service. Maybe I have completely missed the point. Kind Regards, Robert Gilland.
  19. I have Delphi 11.3, I run remote debugging and I get no blue dots. I have Optimisation OFF, Stack Frames ON, Debug Information ON, Use Debug DCUs ON, Include Remote Debug Symbols ON, Place debug information in separate TDS File ON, Map File Detailed. When I call Load Process I get no Blue Dots. Any Ideas?
  20. Robert Gilland

    Remote Debug not generating blue Dots in 11.3

    No just a standard VCL Application
  21. I am trying to create a function that creates a class at runtime lie this: function CreateDescentantClass( pcAncestorClass : TClass; const psDescendentClassName : String ): Class; begin Result := psDescendentClassName of pcAncestorClass; end; Is this possible? I am using Delphi Alexandria
  22. Came in the mail, got two copies, even though I only ordered one.
  23. Using the above as a starting point I have been able to write a function as asked for at the start. It has not solved my problem so far, but the function works. I have attached this function unt_myforms.pas
  24. I have downloaded Spring4D. I have looked for something to give me some idea about what it is. I cannot understand the purpose of Spring4d is, and I am not sure how it could help me, as I don't know what it is or what it does.
  25. Okay, the requirement is to build a Delphi form descendant from a pre-existing form class adding to it a set of component definitions sent to the Delphi Application in a stream. The Delphi Application has no prior knowledge on what these components are and where they will be placed. It does however receive a form name and form version for these components. The process is already running and working. But speed is a critical factor and there is a need to increase performance. As a result of this, my idea is to build a new form class, then store it locally in a component resource file. Using WriteComponentResFile and ReadComponentResFile functions. Only when the version of the set of component definitions change then to recreate this resource.
×