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

Overlay: data black & white after import

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.7, 1.8.8, 2.0.0
    • Fix Version/s: 1.8.9, 2.0.0
    • Component/s: Utilities
    • Labels:
      None

      Description

      After overlaying two documents, everything in the source is black & white only. I uploaded a screenshot to

      https://oc.evopark.de/public.php?service=files&t=0d7e4e172c30c23b260d3c96cc4986b5

      May relate to PDFBOX-2401.

      Some more details: I'm doing everything in-memory, not operating on files. This is the sample code:

          public static byte[] mergeOntoLetterhead(byte[] originalPdf) throws IOException, COSVisitorException {
              PDDocument pdf = PDDocument.load(new ByteArrayInputStream(originalPdf));
              if (pdf.getNumberOfPages() == 0) {
                  return originalPdf;
              }
              PDDocument template = readTemplate();
              if (null != template) {
                  Overlay overlay = new Overlay();
                  pdf = overlay.overlay(template, pdf);
              } else {
                  logger.error("Could not load letterhead PDF");
                  return originalPdf;
              }
              ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
              pdf.save(outputStream);
              return outputStream.toByteArray();
          }
      

        Attachments

        1. evopark_rechnung_14_10-2.pdf
          45 kB
          Marcus Ilgner
        2. letterhead.pdf
          83 kB
          Marcus Ilgner

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              milgner Marcus Ilgner
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: