Serg Posted June 28, 2018 Share Posted June 28, 2018 Можно ли скопировать в BMP,JPEG содержимое UniURLFrame? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 28, 2018 Share Posted June 28, 2018 Добрый день, Возможно Вам поможет этот демо пример ?: \FMSoft\Framework\uniGUI\Demos\Desktop\HTML2Image Quote Link to comment Share on other sites More sharing options...
Serg Posted June 28, 2018 Author Share Posted June 28, 2018 Спасибо! Quote Link to comment Share on other sites More sharing options...
Serg Posted June 28, 2018 Author Share Posted June 28, 2018 Но это не технологично( Exe! А к Canvas страницы можно как то долезть? Можно ли адаптировать: var bm: TBitmap; ViewObject: IViewObject; SRect: TRect; JPEG:TJPEGImage; begin if Browser.Document <> nil then try Browser.Document.QueryInterface( IViewObject, ViewObject ); if ViewObject <> nil then try bm := TBitmap.Create; bm.Width := Browser.Width; bm.Height := Browser.Height; SRect := Rect( 0, 0, bm.Width, bm.Height ); ViewObject.Draw( DVASPECT_CONTENT, 1, nil, nil, Browser.Handle, bm.Canvas.Handle, @SRect, nil, nil, 0 ); //=========== JPEG:=TJPEGImage.Create; JPEG.Assign(bm); JPEG.SaveToFile( Path ); JPEG.Free; //=========== finally bm.Free; ViewObject._Release; end; except end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 28, 2018 Share Posted June 28, 2018 Если не трудно Вам, сделайте простой тестовый случай Quote Link to comment Share on other sites More sharing options...
Serg Posted July 3, 2018 Author Share Posted July 3, 2018 Добрый день! Сделал Quote Link to comment Share on other sites More sharing options...
Serg Posted July 3, 2018 Author Share Posted July 3, 2018 Вот файл JPEG.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 3, 2018 Share Posted July 3, 2018 Здравствуйте, Мы проанализируем Quote Link to comment Share on other sites More sharing options...
Serg Posted July 3, 2018 Author Share Posted July 3, 2018 Спасибо! Quote Link to comment Share on other sites More sharing options...
Serg Posted July 4, 2018 Author Share Posted July 4, 2018 Получается? Quote Link to comment Share on other sites More sharing options...
stas Posted July 8, 2018 Share Posted July 8, 2018 И не получится, то что Вы выслали, это работа с TwebBrowser, разные принципы. Потому используйте вариант из FMSoft\Framework\uniGUI\Demos\Desktop\HTML2Image Помимо этого на wkhtmltopdf.org Есть dll, которая делает тоже самое (пробовал pdf, получилось) Использовать dll в проекте достаточно кошерно. Quote Link to comment Share on other sites More sharing options...
Serg Posted July 9, 2018 Author Share Posted July 9, 2018 Спасибо Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.