<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 - do not create duplicates of the same objects"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99167">99167</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>do not create duplicates of the same objects
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>utils
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tspiteri@ieee.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=128605" name="attach_128605" title="The pdf document used in the example output.">attachment 128605</a> <a href="attachment.cgi?id=128605&action=edit" title="The pdf document used in the example output.">[details]</a></span>
The pdf document used in the example output.

When I separate a pdf into pages and then unite it again, fonts are duplicated.
The attached document a.pdf uses a regular font in page 1, and in page 2 it
uses the same regular font as well as a bold font. After separating and
uniting, the united file contains two copies of the regular font. It would be
nice if the tools removed the identical duplicated fonts.

Details of an example are included below. Note that in the output to pdffonts,
I removed the following columns which were common to all fonts:

type              encoding         emb sub uni
----------------- ---------------- --- --- ---
Type 1            Custom           yes yes no

File sizes and font information:

$ wc -c a.pdf; pdffonts a.pdf
14244 a.pdf
name                                 object ID
------------------------------------ ---------
ULOTVD+NimbusRomNo9L-Regu                 4  0
EBGCWF+NimbusRomNo9L-Medi                10  0

$ pdfseparate a.pdf b%d.pdf

$ wc -c b1.pdf; pdffonts b1.pdf
8404 b1.pdf
name                                 object ID
------------------------------------ ---------
ULOTVD+NimbusRomNo9L-Regu                 4  0

$ wc -c b2.pdf; pdffonts b2.pdf
15120 b2.pdf
name                                 object ID
------------------------------------ ---------
ULOTVD+NimbusRomNo9L-Regu                 4  0
EBGCWF+NimbusRomNo9L-Medi                10  0

$ pdfunite b1.pdf b2.pdf c.pdf

$ wc -c c.pdf; pdffonts c.pdf
22916 c.pdf
name                                 object ID
------------------------------------ ---------
ULOTVD+NimbusRomNo9L-Regu                 4  0
ULOTVD+NimbusRomNo9L-Regu                23  0
EBGCWF+NimbusRomNo9L-Medi                29  0

$ pdfseparate c.pdf d%d.pdf

$ wc -c d1.pdf; pdffonts d1.pdf
8061 d1.pdf
name                                 object ID
------------------------------------ ---------
ULOTVD+NimbusRomNo9L-Regu                 4  0

$ wc -c d2.pdf; pdffonts d2.pdf
14778 d2.pdf
name                                 object ID
------------------------------------ ---------
ULOTVD+NimbusRomNo9L-Regu                23  0
EBGCWF+NimbusRomNo9L-Medi                29  0

$ pdfunite d1.pdf d2.pdf e.pdf

$ wc -c e.pdf; pdffonts e.pdf
23296 e.pdf
name                                 object ID
------------------------------------ ---------
ULOTVD+NimbusRomNo9L-Regu                 4  0
ULOTVD+NimbusRomNo9L-Regu                42  0
EBGCWF+NimbusRomNo9L-Medi                48  0</pre>
        </div>
      </p>


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

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