Jump to content

Alexander Sviridenkov

Members
  • Content Count

    258
  • Joined

  • Last visited

  • Days Won

    26

Posts posted by Alexander Sviridenkov


  1. One more bridge between desktop and web: HTML Office Library. The first Delphi library for reading all office formats (+ PDF) and convert them to plain HTML on the fly.
    Converted document contains only plain HTML/CSS/SVG and can be displayed using HTML Component Library or browser.
    Library provides a uniform access to an entire document and its parts, document resources (fonts, images, etc) and properties
    (title, Table of Contents, etc).
    The library doesn't depend on any external components (DLLs, OLE, ActiveX, etc) and is cross-platform. Fully written in Delphi and comes with full source code. Following document formats are supported:
    Rich Text Format (RTF)
    MS Word 6-2007 binary format (DOC)
    MS Word XML document (DOCX)
    MS Power Point binary format (PPT)
    MS Power Point XML format (PPTX)
    MS Excel binary format (XLS)
    MS Excel XML format (XLSX)
    Adobe PDF format (PDF)
    Supercalc format (SXC)
    EPUB (electronic books).
     
    Besides the document conversion classes it also contains the following:
    EMF/WMF to SVG conversion
    TTF to WOFF conversion
    TTF normalization
    TTF to SVG conversion
    CFF to TTF conversion
    Adobe PostScript to TTF conversion.
     
    Supported Delphi versions are Delphi XE2 - Delphi 10.4.1. Supported platforms: Windows 32/64 VCL and FMX, MacOS, Linux.
     
    There are two compiled demos available
     
    1. Simple document viewer: allows to view any document on hard drive using file tree on left side and HtPanel on right.
    To view final HTML press View in browser button.
    No installation required.
     
    2. Document Indexer: create full text search index for documents located in selected folders and find any document from application or Web.
    No installation required.
    How to use:
    Run application (OfficeIndex.exe).
    Click Add folder and select folder containing office documents.
    Click Start indexing, wait until it completed.
    Search for documents using one of the following:
    a) Go to Search tab and enter search query (any words).
    b) Click Web interface and enter search query.
    c) Point mobile phone camera (mobile should be connected to the same router) to QR code and open mobile interface.
     
    Full cource code of both applications are included in library.
     
    Documentation in PDF format:
     
    Documentation in CHM format:
     
    Purchase link (currently only Site License):
     
    There is 50% discount valid until end of October: please use coupon code HOLX
     
    • Like 7

  2. 1 hour ago, Der schöne Günther said:

    This might come across as ignorant and disdainful, but I never understood why one should pick self-created html renderers above a "true" webbrowser that certainly supports a wider range of HTML/CSS (and JavaScript)?

     

     

    This quote if for HtmlViewer project. HTML Component Library supports almost all HTML tags and CSS properties on all platforms (including mobiles) for all Delphi versions from Delphi 5. Works on all Windows versions starting from XP, has no external dependencies, is more safe (JS is not executed) and gives you full control on loading external files (images, stylesheets, etc). Also it can be used for rendering HTML in any other control (trees, grids, etc) and another libraries (FastReport, ReportBuilder, etc) using GDI, GDI+, DirectX. plaint text or custom renderer.

    • Like 3

  3. Major improvements:
    1. New context sensitive toolbar at editor bottom (eoContextToolbar option) https://www.youtube.com/watch?v=TdWafp0xyPA
    2. Image selection toolbar.
    3. 40% faster style and layout calculation
    4. Support for inlined truetype fonts (@font-face... data:font/truetype;base64)
    5. Support for CSS tab-stop decimal and tab-interval
    6. CSS word-spacing and letter-spacing properties
    7. Magnifier when selecting text on Android and iOS
    8. Local links navigation (Click in HtPanel, Ctrl+Click in Editor)
    9. Subscript and superscript actions for selection and context toolbars.
    10. Linux: support for copy/paste formatted HTML and paste RTF
    11. Advanced charts (gradients and more: see Charts 2 section in Reports demo).
    What is HTML Library: the only true native HTML/CSS/SVG engine for Delphi, all Delphi versions, all platforms, VCL and FMX. Rendering using GDI, GDI+, Direct2d, FMX canvas, text canvas and native iOS, OSX and Android canvases. CSS animations and transitions, animated GIF support for all platforms. RTL languages. WYSIWYG HTML editor, import from RTF and DOCX, export to PDF. Interactive HTML/SVG Reports with charts. FastReport, ReportBuilder, VirtualTreeView, SynPDF, Addict and DevExpress spellchecker integration. Pascal scripting engine. SQL library for parsing, analyzing and transforming SQL queries and working with database schema. Universal Email library for sending and receiving emails.
    • Like 8

  4. This is an FMX issue, not related to Java. On mobile platforms FMX use own text rendering - glyphs are rasterized to (cached) bitmaps and these bitmaps are drawn to openGL textures. This code is not perfect and sometimes (depending on screen resolution and scaling) produce lines on bitmap edges.


  5. 15 minutes ago, MarkShark said:

    I've tried the two commercial ones (SVG Magic and Delphi SVG.)  They both had issues with my homemade Inkscape svgs, however that was last year (2019) and they may have improved.   I have tried SVGIconImagelist recently and it does have the issues I mentioned (reported in their issue tracker on Github.)  I'm not sure if that's improved recently.  That one does look the most promosing!  The other two open source ones I tried were both older and not actively developed that I could see.

    Can you please share these problem SVGs?


  6. Little bit offtopic, but from my experience 90% of performance issues in Delphi came from implicit try except blocks.

    When procedure contains local variable of managed type, or implicit variable (f.e. string1+string2, copy(), etc) try except block with finalization calls is added to whole procedure even if variable is used only in small block. Moving this block (in case it is rarely executed) to subprocedure helps a lot.

    • Like 1

  7. 19 minutes ago, aehimself said:

     

    I quickly realized. It threw a nullpointer exception anyway because of embedded JavaScript. And XML does not have that 🙂

     

     

    This is only one of hundreds problems. Parsing HTML is much harder than XML.


  8. @aehimself 95% of real world HTMLs cannot be parsed by XML parser. Also you cannot correctly modify HTML without calculating CSS styles. F.e. in this case <p class="p1">This is text</p>   <p class="p1">This is text2</p>  spaces between p can be removed, but in other case <p class="p2">This is text</p>   <p class="p2">This is text2</p> they should be preserved.


  9. 1 minute ago, Jacek Laskowski said:

     

    I know that the attribute will not be removed because the library does not know that it is unnecessary.
    But notice that in the example I gave you, the alt="nothing" attribute appears twice in one tag! 

    This is an example of ugly, junk HTML code that I have to clean up. I would like to do it as automatically as possible, because manual work is very tedious.
    I imagined that your parser could make it easier for me.

    Yes, duplicates will be removed.

    You can send me sample HTML to support at delphihtmlcomponents.com, I'll send you back processed HTML and code.

×