Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Firemonkey: RenderPageToDC
  FAQ FAQ  Forum Search   Register Register  Login Login

Firemonkey: RenderPageToDC

 Post Reply Post Reply
Author
Message
alexdmatveev View Drop Down
Beginner
Beginner


Joined: 09 Oct 14
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote alexdmatveev Quote  Post ReplyReply Direct Link To This Post Topic: Firemonkey: RenderPageToDC
    Posted: 09 Oct 14 at 1:50PM
Hello,

does anybody know a way to render a PDF page to Firemonkey TImage?

in Delphi DCL I go this way:
   FDebenu.RenderPageToDC(72, 1, imCanvas.Canvas.Handle);

but in FMX I have no direct access to Image's Device Context... 

pls show me the way.

Thanks a lot.
Back to Top
alexdmatveev View Drop Down
Beginner
Beginner


Joined: 09 Oct 14
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote alexdmatveev Quote  Post ReplyReply Direct Link To This Post Posted: 09 Oct 14 at 1:56PM
Possible solution:

procedure TfrmPdfFormEditor.RenderDocument(page: Integer);
var
  ms: TMemoryStream;
begin
  ms := TMemoryStream.Create;
  FDebenu.RenderPageToStream(72, page, 0, ms);
  ms.Position := 0;
  imCanvas.Bitmap.LoadFromStream(ms);
  ms.Free;
end;

Works for me.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store