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 - FillColor is always white
  FAQ FAQ  Forum Search   Register Register  Login Login

FillColor is always white

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


Joined: 17 Sep 20
Location: Germany
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sykh Quote  Post ReplyReply Direct Link To This Post Topic: FillColor is always white
    Posted: 17 Sep 20 at 10:56AM
Hi everyone,
im using V18 with c# and im trying to draw a colored box...i got the box on the right position, right size but the fill color is always white even tho i called SetFillColor with a 0-1 double and not 0-255 int Wink

Any clues? SetFillColor returns 1, the Box gets drawn, i see the outline but the inside is always white.


        private String preparePage(String path, String filename)
        {
            PDFLibrary tempQp = this.loadDLL();
            tempQp.LoadFromFile(path + filename, "");
            tempQp.SetOrigin(1);
            //tempQp.SetFillColor(196, 214, 240);
            Console.WriteLine("SetFillColor: "+tempQp.SetFillColor(0.93, 0.29, 0.42));
            tempQp.SetLineColor(0, 1, 0);
            Console.WriteLine("Preparing " + filename);
            double pageHeight = qp.PageHeight();
            tempQp.NewOutline(0, filename, 1, 0.0);

            for (int i = 1; (i <= tempQp.PageCount()); i++) {
                Console.WriteLine("Adding Coorporate Identity on Page " + i);
                tempQp.SelectPage(i);
                Console.WriteLine("Page Height: " + pageHeight + " Width: " + tempQp.PageWidth());
                tempQp.DrawBox(0.0, 0.0, tempQp.PageWidth(), 77.0, 2);
            }
            
            tempQp.SaveToFile(tempPath + filename);
            return (tempPath + filename);
        }


Thanks.
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 17 Sep 20 at 5:57PM
If you run the DebenuPDFLibraryDemo program and run the Vector Graphics/DrawShapes script, do you get green circles?   If so, I would try moving the SetFillColor to inside your loop, but I do not know why that would be necessary, if it is.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3197
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 Sep 20 at 9:42PM
Hi Sykh,

i think it's your SetFillColor.
The first line with SetFillColor is deactivated with the doubled slashes.
The second SetFillColor is only in the WriteLine-syntax.
I think a "tempQp.SetFillColor(0.93, 0.29, 0.42)" alone on a single code line will work.

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
Sykh View Drop Down
Beginner
Beginner


Joined: 17 Sep 20
Location: Germany
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sykh Quote  Post ReplyReply Direct Link To This Post Posted: 22 Sep 20 at 11:02AM
Hey Ingo,
this shouldn't and doesn't matter, i run the command in that WriteLine to see if it returns 1 or 0 (it returns 1)


tempQp.SetFillColor(0.93, 0.29, 0.42);
//Console.WriteLine("SetFillColor: "+tempQp.SetFillColor(0.93, 0.29, 0.42));


Still creates white blocks over the blue ones i want to paint over.

Moving it into the loop didn't change it either :(
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 22 Sep 20 at 4:13PM
You did not mention earlier that you were trying to overwrite other blocks.  Are you sure that the blocks are being rendered in the sequence you expect?  It is not an area I am used to dealing with, but might the blue blocks somehow be configured to render on top?  Someone else may be able to say how this could happen.
Back to Top
Sykh View Drop Down
Beginner
Beginner


Joined: 17 Sep 20
Location: Germany
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sykh Quote  Post ReplyReply Direct Link To This Post Posted: 22 Sep 20 at 4:15PM
Na the blue block is gone, thats how i know it's "working" :D
I set the mode to 3, there is a white block with black border exactly at the location i want it to be, it just needs a different fill color.
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