Sign In  Sign Up Live-Chat

pdf Color-class

Last post 07-12-2007, 2:07 AM by forever. 15 replies.
Page 1 of 2 (16 items)   1 2 Next >
Sort Posts: Previous Next
  •  07-06-2007, 1:34 AM 82920

    pdf Color-class

    Hello,

    I was wondering, is it a lot of work to add a "getColor" function to the color-class ?

    On i-series it's "impossible" to retrieve class-fields, so I can't use the pre-defined colors. If you provide a function that returns a color-object for a specified "color-name" this would be a great help !

    Thanks,

    Goddeau Hendrik

     
  •  07-06-2007, 2:21 AM 82925 in reply to 82920

    Re: pdf Color-class

    Dear Goddeau,

    Thank you for considering Aspose.

    Color name is supported. Please refer to http://www.aspose.com/Products/Aspose.Pdf/Api/Aspose.Pdf.ColorConstructor5.html. You can create a color object from name like the following:

    Color myColor = new Color("Red");


    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-06-2007, 2:37 AM 82930 in reply to 82925

    Re: pdf Color-class

    Ok, thanks.
     
  •  07-06-2007, 3:23 AM 82938 in reply to 82930

    Re: pdf Color-class

    Hello again,

    I'm having some troubles using this method :

     received Java exception "java.lang.NumberFormatException: For input string: 
     "Red"" when calling method "<init>" with signature "(Ljava.lang.String;)V"  
     in class "com.aspose.pdf.elements.RgbColorSpace".
             

    It seemes there 's a quote to much ?!                  

     
  •  07-06-2007, 3:38 AM 82942 in reply to 82938

    Re: pdf Color-class

    Sorry I don't know you are using Java version. In Java version only the names listed at http://www.aspose.com/Products/Aspose.Pdf/JavaDoc/com/aspose/pdf/elements/Color.html are supported. You can use them like the following:

    text1.getTextInfo().setTextColor(Color.Red);

    Btw, you can refer to the ColorExample.java and ColorSpaceExample.java in the examples of Aspose.Pdf for Java.


    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-06-2007, 3:45 AM 82945 in reply to 82942

    Re: pdf Color-class

    Ok, but "Red" is one of the valid colors !
     
  •  07-06-2007, 4:10 AM 82948 in reply to 82945

    Re: pdf Color-class

    I tested              text1.getTextInfo().setTextColor(Color.Red);
    and no error is found. If you still can't use Red color please provide your code that can reproduce this error.
    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-06-2007, 4:20 AM 82950 in reply to 82948

    Re: pdf Color-class

    I know this works, but as I mentioned at the beginning of this topic "I can't use class fields on iseries" !

    In your example you use Color.red, where red is a field of class "Color".

    I'm looking for a function that returns a color-object  for a given color-name. I thought the rgbColorspace constructor would solve my problem, but I get an error (see previous messages).

    Something like Color RedColor = getColor("Red") would help me a lot.

    Thanks,

    Goddeau H.

     
  •  07-06-2007, 8:16 AM 82985 in reply to 82950

    Re: pdf Color-class

    It seems that is not supported. I will discuss with the developer and we will try to support it soon.
    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-06-2007, 8:24 AM 82987 in reply to 82985

    Re: pdf Color-class

    Ok, thanks.
     
  •  07-09-2007, 1:47 AM 83127 in reply to 82987

    Re: pdf Color-class

    Color.getColor() has been added into the new version 2.2.
    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-09-2007, 1:56 AM 83129 in reply to 83127

    Re: pdf Color-class

    Thanks !
     
  •  07-10-2007, 9:30 AM 83405 in reply to 83129

    Re: pdf Color-class

    Which colors are supported ?

    I tested some (Maroon, Lime, Fuchsia, ... that work), but 'Blue' doesn't work !?

    Thanks

     
  •  07-10-2007, 10:10 AM 83414 in reply to 83405

    Re: pdf Color-class

    Hi,

    Could you please share your code that can reproduce this problem.

    Thanks.
     
     
  •  07-10-2007, 2:44 PM 83454 in reply to 83414

    Re: pdf Color-class

    Hi,

    I have logged this issue. We will try to fix it soon.

    Thanks.

    Adeel Ahmad
    Support Developer
    Aspose Changsha Team
    http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html

     
Page 1 of 2 (16 items)   1 2 Next >
View as RSS news feed in XML