Bug 703894

Summary: Applying redaction destroys page layout
Product: MuPDF Reporter: Jorj <jorj.x.mckie>
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 1.18.0   
Hardware: PC   
OS: Windows 10   
Customer: Word Size: ---
Attachments: C program applying redactions, input.pdf, redacted.pdf

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.