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 - SetFillColor does not work with DAOpen API
  FAQ FAQ  Forum Search   Register Register  Login Login

SetFillColor does not work with DAOpen API

 Post Reply Post Reply
Author
Message
lakkan View Drop Down
Senior Member
Senior Member


Joined: 10 Dec 15
Location: Bangalore
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote lakkan Quote  Post ReplyReply Direct Link To This Post Topic: SetFillColor does not work with DAOpen API
    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.
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: 14 Oct 16 at 2:58PM
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

Back to Top
lakkan View Drop Down
Senior Member
Senior Member


Joined: 10 Dec 15
Location: Bangalore
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote lakkan Quote  Post ReplyReply Direct Link To This Post Posted: 18 Oct 16 at 2:22PM
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
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: 18 Oct 16 at 2:52PM
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

Back to Top
MyNameIsMyName View Drop Down
Beginner
Beginner


Joined: 07 Dec 16
Location: Poland
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote MyNameIsMyName Quote  Post ReplyReply Direct Link To This Post Posted: 07 Dec 16 at 11:24AM
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.
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: 07 Dec 16 at 9:32PM
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

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