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!
Problems with Delphi RIO and QuickPDF Lite |
Post Reply |
Author | |
Jonno-UK
Beginner Joined: 29 Aug 19 Location: London Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 29 Aug 19 at 3:30PM |
Hi, I have a Delphi FMX project and I wish to create some very simple PDF files. I have downloaded QuickPDF Lite, installed it, imported the type library and installed the package. (This generated the DebenuPDFLibraryAX1411_TLB file) My code is as follows : var PDF_library : OleVariant; begin PDF_library:=CreateOleObject('DebenuPDFLibraryAX1411.PDFLibrary'); PDF_library.SetMeasurementUnits(1); { 1 = mm 2 = inches } PDF_library.SetPageSize('A4'); { At this point I can see that PageWidth and PageHeight are 210/297 - which looks great } PDF_library.DrawText(100,500,'Hello world'); { I am aware that the co-ordinates might be out of range, but this should not be a problem } PDF_library.SaveToFile('C:\TestDocs\Test.pdf'); end; Yet the code above never creates a pdf file in the TestDocs folder. What am I doing wrong? I am sorry but I am new to this. Thanks in advance. Edited by Jonno-UK - 29 Aug 19 at 3:46PM |
|
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
Warning: I have never used the ActiveX interface or the Lite edition, and my applications typically work with existing PDFs, not creating new ones. But my immediate suggestion would be to check if SaveToFile returns a 0, and if so call GetLastError. In addition, I think you need to call New Document and SelectPage (there may be one created with a new document, I can't remember; if not then NewPage), before you can draw text onto it. Perhaps the Error value would tell you this. Someone else may be more helpful but this is a start. Persevere, it will all come together quite soon! And the users here are friendly; we were all new once. The example scripts are also very helpful.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Jonno,
retry again and start with this sample from Rowan (one of the publishers): http://www.quickpdf.org/forum/getting-started-with-quickpdf-lite_topic1612.html Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store