Alexander Sviridenkov
Members-
Content Count
280 -
Joined
-
Last visited
-
Days Won
28
Everything posted by Alexander Sviridenkov
-
Please check private messages
-
Please note it requires one of Delphi XE + versions installed.
-
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
-
Is it worth resubscribing now?
Alexander Sviridenkov replied to Attila Kovacs's topic in General Help
11 is at least more responsive. But code completion and navigation works from time to time. -
Thank you, .dpr or .dpk?
-
Thanks, I've added searching by several words and list of first 10 found units.
-
PDF to PNG and PNG to PDF
Alexander Sviridenkov replied to Robert Gilland's topic in Delphi Third-Party
Please try with the unit sent to email. -
Hunspell?
-
PDF to PNG and PNG to PDF
Alexander Sviridenkov replied to Robert Gilland's topic in Delphi Third-Party
Yes, it is Windows only. There is direct PDF export in Office library, simply comment htsynpdf. -
GDI+ DrawImage output differs by used printer on HighDPI system
Alexander Sviridenkov replied to ULIK's topic in Windows API
Yes, please see this topic https://microsoft.public.win32.programmer.gdi.narkive.com/xYv8gdam/preventing-gdi-from-scaling-images-how-to-ignore-dpi-settings-rep In my tests even this set of parameters was not enough, I got stable result only when passing not null ImageAttributes (last parameter). -
GDI+ DrawImage output differs by used printer on HighDPI system
Alexander Sviridenkov replied to ULIK's topic in Windows API
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. -
HTML Office Library can extract information from each page as HTML or plain text. Also HTML from each page can be saved back to separate PDF.
-
How can I cast a Pointer to any pointer type
Alexander Sviridenkov replied to dormky's topic in RTL and Delphi Object Pascal
Use NativeUInt(Pointer) -
PDF to PNG and PNG to PDF
Alexander Sviridenkov replied to Robert Gilland's topic in Delphi Third-Party
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; -
PDF to PNG and PNG to PDF
Alexander Sviridenkov replied to Robert Gilland's topic in Delphi Third-Party
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. -
PDF to PNG and PNG to PDF
Alexander Sviridenkov replied to Robert Gilland's topic in Delphi Third-Party
Yes, as mentioned above PDF to PNG conversion is available in Office library. -
PDF to PNG and PNG to PDF
Alexander Sviridenkov replied to Robert Gilland's topic in Delphi Third-Party
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. -
PDF to PNG and PNG to PDF
Alexander Sviridenkov replied to Robert Gilland's topic in Delphi Third-Party
HTML Office Library can do both. -
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
-
- html
- delphihtmlcomponents
-
(and 1 more)
Tagged with:
-
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 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. Skia canvas for VCL. PDF export using Skia canvas - works from any canvas, not only Skia OpenGL canvas - useful for fast rendering of very large SVG (don't use as default canvas - it requires window handle). GDI canvas: improved graphics rendering speed. CSS var() support. function htmlpars.GetHTMLEncoding - determine codepage of HTML (TBytes). function for converting stylesheet to dark theme - TCSSStyleSheet.LighttoDark Support for UTF8 encoded inline SVG images. Optimized SVG paths seialization (smaller size) Optimized drawing of large SVG Support for individual glyph positioning in SVG text (DX attribute). THtCustomPath: CurveTo record now do not have initial point, all curves are defined by 3 points. HtPanel/Editor: support for horizontal mouse wheel HtPanel/Editor: Smooth scrolling in both direction HtPanel/Editor: Fast zoom in / zoom out in OpenGL canvas. Library now contains fastest native blur implementation (10-50 times faster than other). See htcanvas.FastBlur() Fast Base64Encode function (5-10 times faster than standard): htutils.Base64EncodeNoLF() THtBitmapData bitness conversion and masking methods are optimized using SIMD, f.e. Convert24to32. TSVGElement has GetStats methods for retrieving number of primitives, points, etc. Added support for system colors from CSS 4 color module: canvas, canvastext, field, fieldtext, etc. Bitmap images are now supported in GDI+, DX and Skia canvases. FontAwesome is upgraded to version 6.4. Now it contains regular (fa) and solid (fa-solid) icons. Support for CSS variables. Optimized displaying of documents containing many SVG images - like converted PDF documents (2000+ pages). Support for outlined and filled text (SVG). Support for relative image paths ('.\..') Improved flexbox layout. THtImageConverter now have CanvasClass propery - used in HTMLtoPNG conversion. HtPanel: OnScroll event New core classes documentation - /docs/HTML Library.chm/pdf https://delphihtmlcomponents.com/help/ New demos - MapView, Blur, Skia Editor Words suggestions/prediction while typing - see Words prediction section in Editor manual. New icons in context toolbar. Context and selection toolbars has acrylic background. All toolbars (selection, spellcheck) can be closed by pressing Esc. Add/edit image button in context toolbar Copy image button in selection toolbar Print preview button in context toolbar Add Symbol button in context toolbar. Spellcheck button in context toolbar. Windows ISpell implementation - htspellwin unit. Simply add it to uses list for spellcheking and word correction. Inline word correction - click on misspelled word to see suggestions. Windows spellecher is also used for autocorrection, suggection selection is based on Levenshtein distance. Cancelled autocorrections are remembered - words are added to exceptions list. Inline image cropping - use shift + resize handles Reports and Scripts 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. Preview window store its maximized/normal state and position for normal state even when maximized. Support for var parameters of all types. Fixed repeat - until bug. Default indexed properties now workind for object proprties, f.e. property Strings: TStringList; Obj.Strings := 'test'; Script can have own debugger instance
-
ANN HTML Library 4.7 released
Alexander Sviridenkov replied to Alexander Sviridenkov's topic in Delphi Third-Party
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. -
Bitmaps alpha has less effect the whiter a pixel is
Alexander Sviridenkov replied to RD_CEDES's topic in FMX
Bitmaps usually have premultiplied alpha - RGB values should be multiplied to alpha (0-1) value. -
You can create explicit IOHandler, set it as IOHandler for client component and set MaxLineLength property for IOHandler instance.
-
HTML Office Library can display PDF, Word, Excel, Powerpoint, EPUB and other formats from any source and on any platform.
-
New to delphi - coming from web
Alexander Sviridenkov replied to anewdelphiguy's topic in General Help
delphihtmlcomponents.com - create complex UI in Delphi using HTML/CSS. All native, no external dependencies.