Bug 703894 - Applying redaction destroys page layout
Summary: Applying redaction destroys page layout
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: 1.18.0
Hardware: PC Windows 10
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-28 15:11 UTC by Jorj
Modified: 2021-08-13 15:20 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
C program applying redactions, input.pdf, redacted.pdf (135.98 KB, application/x-zip-compressed)
2021-05-28 15:11 UTC, Jorj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorj 2021-05-28 15:11:37 UTC
Created attachment 21034 [details]
C program applying redactions, input.pdf, redacted.pdf

Page layout is destroyed after applying the redaction.
Attachedment contains "input.pdf" with one page and one redaction annotation, a simple C program, which applies the redaction, and the output PDF "redacted.pdf".
Comment 1 Tor Andersson 2021-08-13 15:20:28 UTC
commit 2a8754b0f72e9029384a0d70dccef70faca72201
Author: Tor Andersson <tor.andersson@artifex.com>
Date:   Fri Aug 13 17:07:29 2021 +0200

    Bug 703894: Flush text state and adjustments before emitting newline.
    
    The squote and dquote text operators decompose into a T* + Tj pair,
    but we need to make sure to flush TL and buffered spacing adjustments
    before emitting the newline, else we'll miss the TL and/or add the
    spacing adjustments for redacted characters after the newline when
    they should be before the newline.