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 > General Discussion
  New Posts New Posts RSS Feed - FreePascal/Lazarus and QuickPDF
  FAQ FAQ  Forum Search   Register Register  Login Login

FreePascal/Lazarus and QuickPDF

 Post Reply Post Reply
Author
Message
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Topic: FreePascal/Lazarus and QuickPDF
    Posted: 11 May 11 at 7:40AM
Hi All!

Is here anybody using QuickPDF with Lazarus (FreePascal)?
Are there certain things and specialities which i should know in this case?
I would like to read about few experiences...

Thanks and cheers,
Ingo


Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 11 at 11:21AM
Hi Ingo,

I am very eager to hear if anybody has been able to successfully use Quick PDF with Free Pascal.

The source code itself will not compile with Free Pascal as it is as it depends on several Delphi classes which are not available in Free Pascal. We were able to get a subset of the source code to compile with Free Pascal after we cut out the Delphi only classes. It allowed us to generate a basic PDF.

There are also other changes that might need to be made in order to handle any 64-bit related issues which need to be addressed for the FPC but not for Delphi.

Really looking forward to hearing how other people have gone trying this...

Cheers,
- Rowan.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 11 at 4:03PM
Hi Rowan!

But in Lazarus there's a function to convert a Delphi-project to FreePascal/Lazarus ... ;-)

Cheers, Ingo

Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 11 at 5:59PM
Oh, did you try it, does it work? I will be exceedingly happy if it works. :-)
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 11 at 8:58PM
Hi Rowan!

I've converted a Delphi-project and it runs without any further changes.
I've not converted a QuickPDF-Delphi-project so far ;-)
I'm working with Delphi 2007 and starting (a little bit) with Lazarus/FPC.
I want to mix a bit 'cause with Lazarus/FPC i have Unicode and 64 bit and with D2007 not :-(

Cheers, Ingo

Back to Top
TJoe(J^) View Drop Down
Beginner
Beginner
Avatar

Joined: 25 May 11
Location: Florida
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote TJoe(J^) Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 11 at 1:11AM
I was able to get a Lazarus project to compile, run, produce, and display a PDF using the ActiveX verison of the Quick PDF Library. Very nice!

Uses ComObj;
...
procedure TForm1.Button1Click(Sender: TObject);
var
  QP : Variant;
  LicenseKey : WideString;
  iResult : integer;
  FileName : WideString;
  v : variant;
  bm : Graphics.TBitmap;

begin
  QP := CreateOleObject('QuickPDFAX0725.PDFLibrary');
  Memo1.Lines.Add(QP.LibraryVersion);
  LicenseKey := 'add yours here';
  FileName := 'Hello.pdf';
  iResult := QP.UnlockKey(LicenseKey);
  if (iResult = 1) then begin
    Memo1.Lines.Add('Valid license key: ' + QP.LicenseInfo);
    QP.DrawText(60, 600, 'Hello world from Lazuras');
    //Works!   
    //v := Canvas.Handle;
    //QP.RenderPageToDC(92, 1, v);
   
    //This also works
    bm := TBitmap.Create;
    bm.Width := 612;
    bm.Height := 792;
    v := bm.Canvas.Handle;
    QP.RenderPageToDC(92, 1, v);
    Canvas.Draw(0,0, BM);
    if (QP.SaveToFile('Hello.pdf') = 1) then begin
      Memo1.Lines.Add('File ' + FileName + ' was written successfully to disk');
    end else begin
      Memo1.Lines.Add('Error, file could not be written');
    end
  end else begin
    Memo1.Lines.Add('Invalid license key');
    Memo1.Lines.Add('Please set your license ke7y by editing this file');
  end;
  QP := NULL;
end;

Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 11 at 9:23AM
Nice one Joe, I am firing up Lazarus now to take a look.
Back to Top
gadenne View Drop Down
Beginner
Beginner


Joined: 15 Sep 10
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote gadenne Quote  Post ReplyReply Direct Link To This Post Posted: 08 Jun 11 at 6:19PM
Possibly off-topic, but may I say that I'd be glad to hear that quickpdf is evolving towards multi-platform as much as I love to hear about additional functionality.

In term of the later - functionality - quickpdf already offers tremendous scope! As many people here, I'm evaluating the long term - including the non W32 one - as much as the short one. No hurry of courseSmile

I expect that covering a larger set of platforms - ideally a la chartdirector - would certainly be appreciated by quite a few users here. Am I wrong?



Edited by gadenne - 08 Jun 11 at 6:20PM
Back to Top
TJoe(J^) View Drop Down
Beginner
Beginner
Avatar

Joined: 25 May 11
Location: Florida
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote TJoe(J^) Quote  Post ReplyReply Direct Link To This Post Posted: 08 Jun 11 at 6:31PM
I do not think it is off topic at all :)

The moment you mention Lazarus it's "Write Once, Compile Anywhere" capability, the topic can stray to just about anywhere!

I noticed that there is a Perl interface now available as well.

They sure seem to be "going places" with the library!

TJoe(J^)
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jun 11 at 9:46AM
Nope, not off topic. We're looking at our options as far as multi-platform support goes. There are a few exciting possibilities. In short: we would like multi-platform support to be in Quick PDF's future, including mobile.
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