1. 25 Oct, 2018 1 commit
  2. 16 Oct, 2018 1 commit
    • Bryce Harrington's avatar
      Revert "Correctly decode Adobe CMYK JPEGs in PDF export" · bf597b89
      Bryce Harrington authored
      From further testing and investigation it appears that many PDF viewers
      already have a workaround to invert Adobe CMYK JPEGs, so our generated
      PDFs display incorrectly with those viewers due to double-inversion.
      Further investigation will be needed to find a better solution that
      doesn't cause regression for some PDF viewers; perhaps PDF viewers that
      lack this inversion workaround should be changed to include it.  For now
      we'll drop the patch to avoid shipping the regression in 1.16.0.
      This reverts commit b207a932.
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=97612
      Fixes: #156
  3. 13 Jun, 2018 1 commit
  4. 07 May, 2018 1 commit
  5. 03 Apr, 2018 1 commit
  6. 26 Nov, 2017 1 commit
    • Adrian Johnson's avatar
      pdf: fix some annotation bugs · a7091971
      Adrian Johnson authored
      - each annotation was emitted on every page instead of just the page
        that contains the annotation
      - the document structure did not correctly link to annotation objects
      - fix some annotation related memory leaks
  7. 09 Nov, 2017 3 commits
    • Adrian Johnson's avatar
      pdf: fix mime-unique-id jpeg attached to recording test · d5cb4501
      Adrian Johnson authored
      - Restructure the emit_surface code so that mime types are checked first.
      - Add a test parameter to emit_surface to test if the surface will be emitted
        as an image or recording instead checking the surface type as the attached
        mime may override this.
      - Mark surface as not clear when mime is attached to avoid optimizing away
        "clear" surfaces that have mime attached.
      - Include entire surface in analysis if mime attached (also fixes bug with
        calculating the extents CONTENT_COLOR surfaces)
    • Adrian Johnson's avatar
      pdf: fix mime-unique-id unbounded recording test · bff47b43
      Adrian Johnson authored
      PDF XObjects need to specify the bounding box. Emit unbounded surfaces
      when finishing as at this point the extents of all uses of the
      unbounded surface are known.
    • Adrian Johnson's avatar
      pdf: fix mime-unique-id bounded recording test · cf9a0703
      Adrian Johnson authored
      The embedded bounded recording surface was being clipped to the
      extents of its first use.
  8. 24 Oct, 2017 2 commits
  9. 23 Oct, 2017 1 commit
  10. 21 Oct, 2017 2 commits
    • Adrian Johnson's avatar
      Allow mime image to be different size to cairo image · 87dfd0c1
      Adrian Johnson authored
      Previously it was assumed the mime image size is the same as the cairo
      image surface size. When using the 1 bpp formats (CCITT, JBIG2),
      creating a cairo image of the same size will have very large memory
      requirements and in some case may exceed the pixman image size
      limits. In these cases it is useful to allow the mime image to have a
      different resolution to the cairo image and in the PDF/PS output scale
      the mime image to be the same physical size as the cairo image.
      In PDF, this is easy as all PDF images are scaled to 1x1 unit and the
      CTM is used to scale the image to the required size. The PS surface
      has been changed to also scale images to 1x1 and use the CTM to get
      the required size.
    • Adrian Johnson's avatar
      Add CCITT_FAX mime type for PDF and PS surfaces · e1a02b18
      Adrian Johnson authored
      This completes the full set of PDF/PS image filters allowing image
      data to be passed though without decompressing then recompresssing in
      a less efficient format.
      The difficulty with CCITT_FAX is it needs some decoding parameters
      that are not stored inside the image data. This is achieved by using
      an additional mime type CCITT_FAX_PARAMS that contains the params in
      key=value format.
  11. 16 Sep, 2017 1 commit
  12. 26 Aug, 2017 2 commits
    • Adrian Johnson's avatar
      pdf: use link attributes instead of dest name for cairo_pdf_surface_add_outline · 12b875ae
      Adrian Johnson authored
      In PDF outline targets are specified the same way as link targets so
      there is no need to restrict the target to dest names.
    • Adrian Johnson's avatar
      pdf: fix link positions · df37baf7
      Adrian Johnson authored
      Converting the link position from cairo to pdf coordinates requires
      the page height. Since the link may point to a different page, build
      an array of the height of each page and use the target page height for
      the conversion.
      Don't default to a [0,0] position if "pos" is not specified. PDF
      allows a null destination position to be specified which means don't
      change the position if the page is already displayed or show top left
      if switching to a different page. This is more useful default
      particularly for external files where the coordinates (which must be
      in PDF coordinates as we don't know the page height) of the top left
      corner may not be known.
  13. 01 Oct, 2016 6 commits
  14. 09 Sep, 2016 1 commit
    • Peter TB Brett's avatar
      Correctly decode Adobe CMYK JPEGs in PDF export · b207a932
      Peter TB Brett authored
      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: default avatarPeter TB Brett <peter.brett@livecode.com>
  15. 19 Jul, 2016 1 commit
  16. 17 Jul, 2016 1 commit
  17. 15 Jul, 2016 1 commit
  18. 03 Jul, 2016 1 commit
  19. 05 Jun, 2016 4 commits
    • Adrian Johnson's avatar
      Fix PS record-neg-extents test failure · 1c5ec6e3
      Adrian Johnson authored
    • Adrian Johnson's avatar
    • Adrian Johnson's avatar
      Fix PDF record-neg-extents test failure · a736fd86
      Adrian Johnson authored
      Modify PDF surface to allow surface extents to have negative x, y.
      When emitting recording surfaces, set the surface extents to the
      recording extents.
    • Adrian Johnson's avatar
      pdf: change from pdf coordinates to cairo coordinates · 1e07ced6
      Adrian Johnson authored
      When an unbounded recording surface is used multiple times with
      different extents for each operation we need the XObject containing
      the recording surface to have the same origin for each operation. This
      is not possible when the recording surface is converted to PDF
      coordinates because each operation has different extents resulting in
      a different origin when the Y-axis is flipped (since the flip matrix
      depends on the recording surface height which for unbounded surfaces
      depends on the extents of the operation that paints the recording
      Switching to cairo coordinates by emitting a Y-axis flip matrix as the
      first object of each page allows the recording surface to be emitted
      in cairo coordinates. This results in the same origin for all
      operations using the recording surface XObject.
  20. 17 Oct, 2015 2 commits
  21. 04 Apr, 2015 1 commit
  22. 31 Oct, 2014 1 commit
    • Adrian Johnson's avatar
      pdf-operators: only wrap text strings for PS output · e4b78424
      Adrian Johnson authored
      since the PS Document Structing Conventions impose a 255 character
      line limit. PDF does not require wrapping.
      pdf-operators is designed to emit the same output for PS and PDF.
      Unfortunately some PDF interpreters don't like strings split with
      '\\\n' and some PS interpreters don't like strings split with ')('.
      So we are forced to make pdf-operators handling string wrapping
      differently for PDF and PS.
      Bug 85662
  23. 19 Oct, 2014 1 commit
  24. 16 May, 2014 1 commit
  25. 07 Dec, 2013 1 commit
    • Adrian Johnson's avatar
      pdf/ps: avoid outputting excess decimal places in matrices · dcbe16eb
      Adrian Johnson authored
      Sometimes as a result of rounding errors in matrix transformations the
      matrices in ps/pdf output look like:
          0.000000000000000061 1 1 -0.000000000000000061 0 842 cm
      This patch rounds to zero matrix elements that are very small compared to
      other elements in the same matrix.
  26. 29 Sep, 2013 1 commit