<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - pdftocairo -pdf inverts image color in this PDF"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105294">105294</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>pdftocairo -pdf inverts image color in this PDF
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>pdf backend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>ajohnson@redneon.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jason@inspiresomeone.us
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=137691" name="attach_137691" title="doc_with_whitespace.pdf">attachment 137691</a> <a href="attachment.cgi?id=137691&action=edit" title="doc_with_whitespace.pdf">[details]</a></span>
doc_with_whitespace.pdf

I noticed this while verifying that
<a href="https://bugzilla.gnome.org/show_bug.cgi?id=757876">https://bugzilla.gnome.org/show_bug.cgi?id=757876</a> has been fixed in cairo. The
'missing spaces' problem is fixed, but I see a new issue now.

If I run `pdftocairo -pdf` on the attached PDF file, images in the output PDF
show reversed black and white. I traced it to this commit in cairo:

commit b207a932a2d3740984319dffd58a0791580597cd (HEAD, refs/bisect/bad)
Author: Peter TB Brett <<a href="mailto:peter.brett@livecode.com">peter.brett@livecode.com</a>>
Date:   Fri Sep 9 22:35:55 2016 +0930

    Correctly decode Adobe CMYK JPEGs in PDF export

    Adobe PhotoShop generates CMYK JPEG files with inverted CMYK.  When a
    JPEG file with this format is included in a PDF file, a `/Decode`
    array must be included to convert to "normal" CMYK.

    These JPEG files can be detected via the presence of the APP14 "Adobe"
    marker.  However, PDF viewers are not required to detect and handle
    this private marker, so it must be detected and handled (by adding a
    `/Decode`) by the PDF generator.

    Signed-Off-By: Peter TB Brett <<a href="mailto:peter.brett@livecode.com">peter.brett@livecode.com</a>></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>