Jump to content

Alexander Sviridenkov

Members
  • Content Count

    258
  • Joined

  • Last visited

  • Days Won

    26

Posts posted by Alexander Sviridenkov


  1. 3 minutes ago, Mike Torrettinni said:

    Thanks! Better version, but I still get error on not finding a .pas file and it seems it stops and doesn't show anything. Can you make it skip missing .pas files and make it work with what it can access? Some units only have compiled .dcu accessible, not pas files.

    It doesn't stop if file is missed. Missed files are listed in scan.log

    At least project file and some .pas files should be shown.

     


  2. 6 minutes ago, Mike Torrettinni said:

    Video looks very promising! I get same or similar error messages as above, so let us know when you publish fix or perhaps change version number in original .rar file, so we know it's newer.

     

    Is it possible to make it work without dependency on Delphi installation? I don't have Delphi development started all the time, while source code is always accessible. 

    Please check current build (1.0.0.5 in file version), it shoudl works OK.

    It do not require Delphi to be started, just installed (to get Library paths from registry).


  3. 14 minutes ago, uligerhardt said:

    Hi! I just downloaded and unpacked the RAR. When I start graph.exe and click on the Project icon I immediately get this:

     

    Any idea how to fix this?

    Thanks for reporting, this error appears when clickng to Create without selected project. Now fixed.

    Note that to select project you need to click on folder icon next to Project label


  4. 45 minutes ago, Tommi Prami said:

    Very nice.

    Hope you continue to make it better.

    For one I would not need "relaxed search" from the Graph. Like type search 'settings custom'

    Would give me all units from the graph that would match those words. Like the Delphi Search for units... (Ctrl + F12).

    You can put everything you just remember the unit you are looking for. Because there is huge number of unis in big projects, and finding from the Graph (without filtering)

     

    just my 0.02€...

     

    Very good. Thanks.

     

    -Tee-

    Thanks, I've added searching by several words and list of first 10 found units.

    image.png.cdfdab2a372d4fc0ba027be627d7dbbd.png

    • Like 1

  5. 3 hours ago, Alexander Halser said:

    When you print an image, the screen DPI doesn't matter at all. You are dealing with printer DPI instead. Nothing else. 

    This may sound strange, but screen DPI does matter. GPImage has internal DPI (same as screen DPI on image creation) and this DPI do affect image drawing on any device.

    You cannot change this DPI and there is only one of many overloaded DrawImage methods that ignores this DPI and let your render image with exact source and destination rectangles. It is not described in documentation and is not intuitive, I have no idea why MS done this.


  6. Please use the following code

     

                ST := TBytesStream.Create;
                try
                  Surf := TBitmapSurface.Create;
                  try
                    Surf.Assign(B);
                    if TBitmapCodecManager.SaveToStream(ST, Surf, '.png') then
                      PNG[i] := copy(ST.Bytes, 0, ST.Size)
                    else
                      PNG[i] := nil;
                  finally
                    Surf.Free
                  end;
                finally
                  ST.Free
                end;

     


  7. uses htcanvas, htoffice, htimage, htcanvasdx, htmldraw, htcanvasgdip, 
         gdipapi, gdipobj, gdiputil; 
    
    type
      TBytesArray = array of TBytes;
    
    procedure PDF2PNG(const FileName: string; var PNG: TBytesArray);
    var D: THtDocument;
        i: integer;
        C: THtCanvasGP;
        B: TBitmap;
        BD: THtBitmapData;
        Scene: THtCanvasScene;
        Image: TGPBitmap;
        PNGEncoder: TGUID;
        BS: TBytesStream;
        SA: IStream;
    begin
      D := THtDocument.Create(THtCanvasGP.PrintCanvasClass);
      try
        { Convert PDF to HTML and parse result }
        D.Parse(THtDocumentConverter.FiletoHTML(FileName));
        { Make paged layout }
        D.GeneratePagesForPrint(210, 297);
        SetLength(PNG, D.Surface.PageCount);
        for i := 0 to D.Surface.PageCount - 1 do
        begin
          C := THtCanvasGP.Create;
          try
            B := TBitmap.Create(D.Surface.Pages[i].WidthPx, D.Surface.Pages[i].HeightPx);
            try
              { Render page }
              Scene.Init(B.Canvas.ClipRect, B.Canvas);
              C.BeginScene(Scene);
              THtPageMeta(D.Surface.Pages[i]).Meta.Play(C);
              C.EndScene;
              { Save to PNG }
              Image := TGPBitmap.Create(B.Handle, B.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;
        end;
      finally
        D.Free
      end;
    end;

    Thank you for ordering, please use this code for conversion.

     


  8. 2 hours ago, Robert Gilland said:

    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.

    PDF to PNG means that PDF will be rendered to bitmap and bitmap saved to PNG. This is possible using Office Library, it even have CreateThumbnail method that make this conversion by one line of code.

    Converting PNG to PDF means embedding PNG to a new PDF file. Create one line HTML like <img scr="mypng.png"> and convert it to PDF.


  9. The only native Delphi library for reading and displaying documents in 19 formats: Word, Excel, Powerpoint, PDF, EPUB, Outlook and much more.

    Whats's new

    1. Support for MBOX files (Thunderbird and other mail app. mailboxes)
    2. Support for CHM (help) file format.
    3. Support for CSV (displayed as table).
    4. Support for DOC 6-95 format.
    5. Support for old XLS format.
    6. Encoding detection for text files.
    7. Support for PICT format (embedded to some office documents)
    8. Support for JPX (JPEG2000) - currently using openjpeg.
    9. PDF conversion was completely rewritten:
    Big improvements in PDF rendering quality.
    Better text extraction from PDF (space detection, hyphenation handling).
    Faster PDF conversion - 1000 pages / sec.
    Less memory consumption for conversion of big PDF files.
    SIMD optimized image conversion for PDF (color spaces, masks, etc.).
    10. Improvements in PPTX, DOCX and XLS.
    11. Faster text extraction for all formats.
    12. Added document properties Authod, Keyword, Modified, Created.
    13. Search engine was completely rewritten:
    14. Smaller index and faster than all similar products (dtsearch, docfetcher, copernic, x1, etc.), search for word sequence.
    15. Support for highlighting of code files (PAS, C++, JS, etc.)
    16. DarkMode property - convert styles to dark theme.
    17. ImageConverted now has CanvasClass property (canvas is used in HTML to PNG conversion).
    18. ODTTF format support
    19. TOTFFont now supports adding ligatures
    20. FileBrowser demo no more requires VirtualTrees.
    21. New demo - PPT file explorer.

    Demos:
    https://delphihtmlcomponents.com/FileBrowser.zip - file viewer.
    https://delphihtmlcomponents.com/codefinder.html - full text search engine / document viewer.

    https://delphihtmlcomponents.com/office.html

    • Like 3

  10. 1 minute ago, Rollo62 said:

    @Alexander Sviridenkov That looks great, as always.

    I'm not sure if the performance and large-file features were limited to VCL and desktop mostly, or if also mobile apps will improve a lot, with or without SKIA ?

    Thank you.

    Processing of documents with many SVG images is improved for all platforms and doesn't depend on canvas. But fast rendering of single large SVG image is for VCL OpenGL canvas only.

    • Like 1

  11. What's new video:

     

    Demos used in video:

    Map Viewer (OpenGL canvas., SVG, PDF, etc) https://delphihtmlcomponents.com/MapView.zip
    Fast blur: https://delphihtmlcomponents.com/blur.zip
    HTML Editor (VCL), print preview window https://delphihtmlcomponents.com/htedit.zip
    Office file viewer and print preview window https://delphihtmlcomponents.com/FileBrowser.zip

     

    What's new:

    Core

    1. Precise text rendering and measurement for all windows canvases: now text has the same layouot in GDI, GDI+, DX and Skia canvases on screen and printer and doesn't depend on scaling.
    2. Skia canvas for VCL.
    3. PDF export using Skia canvas - works from any canvas, not only Skia
    4. OpenGL canvas - useful for fast rendering of very large SVG (don't use as default canvas - it requires window handle).
    5. GDI canvas: improved graphics rendering speed.
    6. CSS var() support.
    7. function htmlpars.GetHTMLEncoding - determine codepage of HTML (TBytes).
    8. function for converting stylesheet to dark theme - TCSSStyleSheet.LighttoDark
    9. Support for UTF8 encoded inline SVG images.
    10. Optimized SVG paths seialization (smaller size)
    11. Optimized drawing of large SVG
    12. Support for individual glyph positioning in SVG text (DX attribute).
    13. THtCustomPath: CurveTo record now do not have initial point, all curves are defined by 3 points.
    14. HtPanel/Editor: support for horizontal mouse wheel
    15. HtPanel/Editor: Smooth scrolling in both direction
    16. HtPanel/Editor: Fast zoom in / zoom out in OpenGL canvas.
    17. Library now contains fastest native blur implementation (10-50 times faster than other). See htcanvas.FastBlur()
    18. Fast Base64Encode function (5-10 times faster than standard): htutils.Base64EncodeNoLF()
    19. THtBitmapData bitness conversion and masking methods are optimized using SIMD, f.e. Convert24to32.
    20. TSVGElement has GetStats methods for retrieving number of primitives, points, etc.
    21. Added support for system colors from CSS 4 color module: canvas, canvastext, field, fieldtext, etc.
    22. Bitmap images are now supported in GDI+, DX and Skia canvases.
    23. FontAwesome is upgraded to version 6.4. Now it contains regular (fa) and solid (fa-solid) icons.
    24. Support for CSS variables.
    25. Optimized displaying of documents containing many SVG images - like converted PDF documents (2000+ pages).
    26. Support for outlined and filled text (SVG).
    27. Support for relative image paths ('.\..')
    28. Improved flexbox layout.
    29. THtImageConverter now have CanvasClass propery - used in HTMLtoPNG conversion.
    30. HtPanel: OnScroll event
    31. New core classes documentation - /docs/HTML Library.chm/pdf https://delphihtmlcomponents.com/help/
    32. New demos - MapView, Blur, Skia

    Editor

    1. Words suggestions/prediction while typing - see Words prediction section in Editor manual.
    2. New icons in context toolbar.
    3. Context and selection toolbars has acrylic background.
    4. All toolbars (selection, spellcheck) can be closed by pressing Esc.
    5. Add/edit image button in context toolbar
    6. Copy image button in selection toolbar
    7. Print preview button in context toolbar
    8. Add Symbol button in context toolbar.
    9. Spellcheck button in context toolbar.
    10. Windows ISpell implementation - htspellwin unit. Simply add it to uses list for spellcheking and word correction.
    11. Inline word correction - click on misspelled word to see suggestions.
    12. Windows spellecher is also used for autocorrection, suggection selection is based on Levenshtein distance. Cancelled autocorrections are remembered - words are added to exceptions list.
    13. Inline image cropping - use shift + resize handles

    Reports and Scripts

    1. New preview window for VCL and FMX (OSX, Linux) - float toolbar, smooth scroll and zoom, page selection and reorder, text search, text editing and moving.
    2. Preview window store its maximized/normal state and position for normal state even when maximized.
    3. Support for var parameters of all types.
    4. Fixed repeat - until bug.
    5. Default indexed properties now workind for object proprties, f.e. property Strings: TStringList; Obj.Strings := 'test';
    Script can have own debugger instance
    • Like 9
    • Thanks 1
×