

Alexander Sviridenkov
Members-
Content Count
287 -
Joined
-
Last visited
-
Days Won
29
Everything posted by Alexander Sviridenkov
-
New build 1.0.0.10 Units with forms are now rectangular Links have direction marks (on source unit) When .pas is not found it tries to find .dcu, parse it and extact links to used units.
-
Maybe next month. For other questions answer is - yes.
-
It will be included to HTML Library demos with source code.
-
Simply click on RTL/VCL/Etc. folder at right and units from disabled folders will not be shown.
-
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.
-
It will work, but some units that are not in project directory and not in directory listed in project Search path settings, will not be listed.
-
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).
-
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.