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!
SetFillColor does not work with DAOpen API |
Post Reply |
Author | |
lakkan
Senior Member Joined: 10 Dec 15 Location: Bangalore Status: Offline Points: 53 |
Post Options
Thanks(0)
Posted: 14 Oct 16 at 2:30PM |
Hi,
SetFillColor and DrawBox API functions does not work, when PDF file is accessed using QP.DAOpen("xxx.pdf") API function , but they work, if file is loaded using QP.LoadFromFile("aaa.pdf"); Please let me know, if you have any solution for this, I want to make SetFillColor, DrawBox functions to work,when file is accessed using DAOpen(). I am using: DEBENU PDF Library version: 12.11 ,win32 API and C/C++. Regards Lakkan.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Lakkan,
you should NEVER mix DA- and non-DA-functions. This won't work... Please read about DaOpenFile: http://www.debenu.com/docs/pdf_library_reference/DAOpenFile.php |
|
Cheers,
Ingo |
|
lakkan
Senior Member Joined: 10 Dec 15 Location: Bangalore Status: Offline Points: 53 |
Post Options
Thanks(0)
|
Hi Ingo,
Thanks for your information. I require to implement FillColor and DrawBox functions, after opening the file with DAOpen API. Are there any alternate DA functions, which fills the color and draw the box in DAOpen Mode. Please let me know, if you have any information on that. Regards Lakkan
Edited by lakkan - 18 Oct 16 at 2:23PM |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Lakkan,
there aren't alternate DA functions for this. In your case you should avoid DAOpen. Use the similar LoadFromFile. The DA-functions were made long ago - the library couldn't handle large files proper in the past... Today you shouldn't need the DA-functions anymore. |
|
Cheers,
Ingo |
|
MyNameIsMyName
Beginner Joined: 07 Dec 16 Location: Poland Status: Offline Points: 1 |
Post Options
Thanks(0)
|
Hi I've prepared code below: var QP: TDebenuPDFLibrary; begin dlgSave.FileName := 'Rotated.pdf'; if dlgSave.Execute then begin QP := TDebenuPDFLibrary.Create; try if QP.UnlockKey(edtLicenseKey.Text) = 1 then begin QP.SetPageSize('A4'); QP.SetOrigin(1); QP.SetMeasurementUnits(1); QP.SetFillColor(230, 230, 230); QP.DrawBox(10, 10, 10, 10, 1); QP.CompressContent; QP.SaveToFile(dlgSave.FileName); end else MessageDlg('The license key is invalid or has expired.', mtError, [mbOK], 0); finally QP.Free; end; end; end; It seems, calling the command SetFillColor with those parameters doesn't cause drawing gray square like it should be done. Is there something am I doing wrong? I am very beginner with QuickPDF Library.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi MyNameIsMyName,
did you read all about SetFillColor? No... you didn't ;-) http://www.debenu.com/docs/pdf_library_reference/SetFillColor.php The values representing the colours has a range from 0 up to 1 ( SetFillColor(1,1,1) means black ). 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