Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.
Now I was able to print to PDF. I'd like to achieve automatically save. I've tried save pdf OnLoadEnd but the generated file is blank. It looks like is some delay for the pdf to be displayed after load end.
How could I know for sure when the pdf file was completely displayed? Through the LoadingProgressChange method, testing the progress = 1 parameter also did not work.
You need to use the TChromium.OnPdfPrintFinished event to know when it's ready to be used.
The MiniBrowser demo uses that event in the "Chromium1PdfPrintFinished" procedure.
Salvador, sorry, but I do not think that's be right. The OnPdfPrintFinished method is executed after the PrintToPDF function has been executed and returns whether it was successfully printed or not, that is, after printing was requested by the PrintToPDF method. My goal is to actually know when the PDF document has already been fully loaded in the browse and then call the PrintToPDF method. When calling the PrintToPDF method in the LoadEnd event for example, even checking the status is 200 the generated file is blank.