Alexander Sviridenkov
Members-
Content Count
280 -
Joined
-
Last visited
-
Days Won
28
Everything posted by Alexander Sviridenkov
-
HTML Library: part of Delphi IDE and new release
Alexander Sviridenkov posted a topic in Delphi Third-Party
I'm glad to inform you about a new release of the HTML Library. It is used by thousands of developers from 50 countries, and now even the RAD Studio IDE. From version 11.2 library will be used by the IDE to render rich text. What's new in version 4.6: Core 1. Packages names are now the same for all IDE versions (starting from Delphi 11). 2. Faster parsing and style calculation 3. SAX XML parser class with special text extration mode. 4. THtLabel now allows text change in click events. 5. CSS serialization (modified CSS StyleSheet can be saved back) 6. Direct PDF export on all platforms including Linux (when using Office library) 7. Document sections (custom header, footer, page size and orientation for each section). 8. Support for different page sizes in print preview (each page can have own size) 9. System theme colors support (Windows, OSX), f.e. background: window) with ability to use custom theme color callback. 10. Converting HTML to paged payout SVG (print preview can be viewed from browser) 11. Zoom from Cursor mode in HtPanel/Editor. 12. New TElement.InsertHTML method. 13. CSS outline propety support. 14. CSS focus-within pseudoclass support. 15. CSS marker pseudoclass support. 16. CSS list-style-position property. 17. Added w-resize and h-resize for CSS cursor. 18. THtDocument now can be used from threads (Special parameter in constructor for use separate font collection). 19. Workaround for FMX bug: rectangle and rounded rectangle with large pen width incorrectly drawn on Android. 20. New HtPanel properties: MinScale, MaxScale Editor 1. Support for style attribute inside MathML elements. 2. New editor option: eoDisableBlockJoinOnPaste - do not join pasted blocks with current 3. New editor option: eoPasteTextBlockAsPara - convert text blocks divided by blank lines to para. 4. eoClearPastedFormatting now removes span elements wuthout attributes. 5. New editor method: PasteTextfromClipboard - paste plain text only. Reports and Scripts 1. Chart now supports style attribute in chart element. 2. Reports library now supports Lazarus (including print preview) 3. Scripter: support for calling chained indexed properties, f.e. Obj[k]. https://delphihtmlcomponents.com -
Warning: serious bug in XE10.4.2/DCC64
Alexander Sviridenkov posted a topic in RTL and Delphi Object Pascal
Just found serious bug in 10.4.2 when compiling to Win64 target: int64 value returned by function is truncated to 32 bit. In XE11 the same code works OK. F.e. this will lead to errors when working with files/streams larger that 2 Gb. -
Encode (pdf, jpg, ...) in to XML
Alexander Sviridenkov replied to msd's topic in Algorithms, Data Structures and Class Design
Use Base64 encoding (SOAP.EncdDcd unit) -
HTML Office Library can read (and display) all office formats (XLS, XLSX, XLSB, DOC, DOCX, PPT, PPTX) and also PDF, EPUB, FB2, HTML, MD (markdown), EML, MSG (Outlook), WMF, EMF. All platforms, only plain Delphi code.
-
TIP for Creating PDF Files from HTML / Image
Alexander Sviridenkov replied to microtronx's topic in RTL and Delphi Object Pascal
Thanks, I didn't know Edge supports header/footer customization. Are header/footer embedded into page or passed separately? Does it support different headers/footers for different pages? -
TIP for Creating PDF Files from HTML / Image
Alexander Sviridenkov replied to microtronx's topic in RTL and Delphi Object Pascal
Browsers do not support page headers and footers, different page sizes/orientation, printing page number and count of pages, repeated table headers, etc. -
HTML Parser alternative to MSHTML?
Alexander Sviridenkov replied to Darian Miller's topic in Delphi Third-Party
Sorry, I forgot to mention that when using chaining, current node should be passed to XPath as parameter to prevent XPath walking up toi root. var D: THtmlNode; N, A: THtNode; begin D := THtmlNode.Create; try D.Parse('<body><h1 id="header1"<a href="a1">First</a><a href="a2">Second</a></h1><h2><div><a href="a3">Third</a></div></h2></body>'); for N in D.XPath('//h1[@id="header1"]') do for A in N.XPath('//a', false, N) do ShowMessage(A['href']); for N in D.XPath('//h2') do for A in N.XPath('//a', false, N) do ShowMessage(A['href']); finally D.Free end; Second parameter is "stop after first found node", third is current root node. -
HTML Parser alternative to MSHTML?
Alexander Sviridenkov replied to Darian Miller's topic in Delphi Third-Party
Only when using THtDocument. With THtmlNode and THtmlStyledNode works without canvas units uses htmlpars; var D: THtmlNode; N: THtNode; begin D := THtmlNode.Create; try D.Parse('<body><div id="1"><ul><a href="a1">First</a><a href="a2">Second</a></ul></div><div><ul><a href="a3">Third</a></ul></div></body>'); for N in D.XPath('//div[@id="1"]/ul/a') do ShowMessage(N['href']); finally D.Free end; -
HTML Parser alternative to MSHTML?
Alexander Sviridenkov replied to Darian Miller's topic in Delphi Third-Party
HCL is layered, HTML and CSS parsers has no dependencies on framework or OS. Class hierarchy is THtNode (htmlpars unit, only RTL) -> THtXMLNode (htxml unit, only RTL) | THtmlNode (htmlpars unit, only RTL) | TStyledHTMLNode (htmlcss unit, only RTL) | TElement (htmldraw unit) | THtDocument (htmldraw unit) THtDocument/TElement use VCL/FMX units for several reasons 1. Native controls in HTML page (edits, combos, etc.) . 2. VCL themes (theme colors support) 3. VCL/FMX canvas (THtDocument can draw on VCL/FMX canvas) But all graphics (canvas classes) is isolated. -
HTML Parser alternative to MSHTML?
Alexander Sviridenkov replied to Darian Miller's topic in Delphi Third-Party
Parser itself do not depend on canvas, VCL or something else. You can use THtmlNode class (hmlpars unit, code is almost the same: D := THtmlNode.Create;D.Parse(..)) THtmlNode supports XPath. For JQuery please use TStyledHTMLNode (htmlcss unit). Both XPath and JQuery can be called from any node so chaining is possible. -
HTML Parser alternative to MSHTML?
Alexander Sviridenkov replied to Darian Miller's topic in Delphi Third-Party
In this case canvas doesn't matter. -
HTML Parser alternative to MSHTML?
Alexander Sviridenkov replied to Darian Miller's topic in Delphi Third-Party
Sample uses htmldraw, htmlpars; .. var D: THtDocument; N: THtNode; begin D := THtDocument.Create; try D.Parse('<body><div id="1"><ul><a href="a1">First</a><a href="a2">Second</a></ul></div><div><ul><a href="a3:>Third</a></ul></div></body>'); for N in D.JQuery('div#1 ul a') do ShowMessage(N['href']); for N in D.XPath('//div[@id="1"]/ul/a') do ShowMessage(N['href']); finally D.Free end; -
HTML Parser alternative to MSHTML?
Alexander Sviridenkov replied to Darian Miller's topic in Delphi Third-Party
Why ypu don't you parser from HTML Component Library? AFAIR you own a license. Parser supports XPath and JQuery so searching for particular nodes is quite simple. -
HTML Component Library can be used to create exacly the same UI.
-
20% discount on delphihtmlcomponents.com products. Please use coupon code NY2022 (valid until end of the year). This is the last chance to order HTML Library at the current price. Prices will be increased in January, but renewal price (including a 15% discount increased by 5% every year) will remain the same for customers with continued subscription. https://delphihtmlcomponents.com/order.html
-
In recent Delphi there is s.SpltString() which returns array of string.
-
Frequency Spectrum of Selected Audio
Alexander Sviridenkov replied to dkjMusic's topic in Algorithms, Data Structures and Class Design
https://en.wikipedia.org/wiki/Fast_Fourier_transform -
25% discount on HTML Library (until Saturday), please use coupon code BF2021 https://delphihtmlcomponents.com
-
awk-like processor using Delphi code?
Alexander Sviridenkov replied to David Schwartz's topic in General Help
HTML Component Library. Yes, it can display almost the same as browser (HTML4 and CSS3, except JS) but I was thinking about using its CSS part for calculating and applying rules. -
awk-like processor using Delphi code?
Alexander Sviridenkov replied to David Schwartz's topic in General Help
HCL has very fast and universal CSS processor (separated from UI/rendering), maybe it can be used there. -
awk-like processor using Delphi code?
Alexander Sviridenkov replied to David Schwartz's topic in General Help
Isn't that similar to CSS? -
Report Builder + HTML Library + Office Library.
Alexander Sviridenkov posted a topic in Delphi Third-Party
Small video showing how to embed any part of (or whole) PDF, PowerPoint, Excel, Word, Outlook, document into report. Document is embedded in vector format and is editable (can be changed in built in HTML Editor). https://s9.gifyu.com/images/rb5bba15035de9053c.gif -
Report Builder + HTML Library + Office Library.
Alexander Sviridenkov replied to Alexander Sviridenkov's topic in Delphi Third-Party
Yes. -
Report Builder + HTML Library + Office Library.
Alexander Sviridenkov replied to Alexander Sviridenkov's topic in Delphi Third-Party
Theoretically yes, but currently no. -
Report Builder + HTML Library + Office Library.
Alexander Sviridenkov replied to Alexander Sviridenkov's topic in Delphi Third-Party
There is CSS contenteditable property which can be set to true or false using snandard CSS rules. Deleting of certain tags cannot be prohibited, but editor supports XML schema which can define rules for adding new tags (what tags are allowed and what tag can be added to another tag).