Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4710

allow precise RGB stroke colors with setStrokingColor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.15
    • 2.0.18, 3.0.0 PDFBox
    • PDModel
    • None
    • Patch

    Description

      see patch

       

      PDF in the wild has 0.262745 0.301961 0.631373 RG but this cannot be represented as a n/255 fraction.

       

      package snippet;
      
      public class Snippet
      {
          public static void main(String[] args)
          {
              System.out.println(((int)67)/255f);
              System.out.println(0.2627451f*255f);
              System.out.println(0.262745f*255f);
              System.out.println(66.99997f/255f);
          }
      }
      

      Attachments

        1. pdfbox-4710.patch
          2 kB
          Jason Pyeron

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              jpyeron Jason Pyeron
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: