b***@artifex.com
2017-10-25 08:41:24 UTC
http://bugs.ghostscript.com/show_bug.cgi?id=698693
Bug ID: 698693
Summary: clipped text is selectable in pdf
Product: Ghostscript
Version: 9.22
Hardware: PC
OS: Windows NT
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: PDF Writer
Assignee: ***@artifex.com
Reporter: ***@fee.de
QA Contact: gs-***@ghostscript.com
Word Size: ---
Created attachment 14413
--> http://bugs.ghostscript.com/attachment.cgi?id=14413&action=edit
sample files
Hi,
in 9.21, clipped text didn't make it into the pdf file and hence, wasn't
selectable.
In 9.22, clipped text makes it into the pdf file for some input.
Let's have a look into the attached file.
hiddenPrinted_unfiltered.pdf shows the text '@@mailfrom:hidden'. This file was
created like that using GhostScript 9.22:
gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=hiddenPrinted_unfiltered.pdf -c save pop .setsafe -f
hiddenPrinted.ps
To clip away that text, I've used this command:
gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=hiddenPrinted.pdf
-c save pop -f mailFilterText.ps -c .setsafe -f hiddenPrinted.ps
As hiddenPrinted.png shows, the text doesn't render anything on the page, but
can be selected in AcrobatReader.
I used GhostScript 9.21 for running the last command to create
hiddenPrinted_921.pdf. In that file, the clipped text is not selectable, so it
looks like a bug was introduced in 9.22.
How does the clipping work? mailFilterText.ps analyses the text passed to the
show operators and when the text starts with @@ and has at least a certain
lenght, it considers the text as control command which must not be rendered
into the page, so it runs the show operator in a grafics context with an empty
clipping rectangle.
hiddenCoded.ps demontrates the clipping, which always works even when using
GhostScript 9.22.
If you run the above commands with hiddenCoded.ps instead of hiddenPrinted.ps,
you'll get hiddenCoded_unfiltered.pdf for example, which demonstrates the
clipping. The clipped text is not selectable in AcrobatReader.
If you combine it with mailFilterText.ps, you'll get hiddenCoded.pdf. The
control command has now been clipped too, and as hiddenCoded.png shows, the
only selectable text in AcrobatReader is 'not hidden'.
I've no idea, what parts in the input files make GhostScript 9.22 behave
differently. But as 9.21 behaves as expected, I think a bug was introduced in
9.22.
Bye.
Bug ID: 698693
Summary: clipped text is selectable in pdf
Product: Ghostscript
Version: 9.22
Hardware: PC
OS: Windows NT
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: PDF Writer
Assignee: ***@artifex.com
Reporter: ***@fee.de
QA Contact: gs-***@ghostscript.com
Word Size: ---
Created attachment 14413
--> http://bugs.ghostscript.com/attachment.cgi?id=14413&action=edit
sample files
Hi,
in 9.21, clipped text didn't make it into the pdf file and hence, wasn't
selectable.
In 9.22, clipped text makes it into the pdf file for some input.
Let's have a look into the attached file.
hiddenPrinted_unfiltered.pdf shows the text '@@mailfrom:hidden'. This file was
created like that using GhostScript 9.22:
gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=hiddenPrinted_unfiltered.pdf -c save pop .setsafe -f
hiddenPrinted.ps
To clip away that text, I've used this command:
gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=hiddenPrinted.pdf
-c save pop -f mailFilterText.ps -c .setsafe -f hiddenPrinted.ps
As hiddenPrinted.png shows, the text doesn't render anything on the page, but
can be selected in AcrobatReader.
I used GhostScript 9.21 for running the last command to create
hiddenPrinted_921.pdf. In that file, the clipped text is not selectable, so it
looks like a bug was introduced in 9.22.
How does the clipping work? mailFilterText.ps analyses the text passed to the
show operators and when the text starts with @@ and has at least a certain
lenght, it considers the text as control command which must not be rendered
into the page, so it runs the show operator in a grafics context with an empty
clipping rectangle.
hiddenCoded.ps demontrates the clipping, which always works even when using
GhostScript 9.22.
If you run the above commands with hiddenCoded.ps instead of hiddenPrinted.ps,
you'll get hiddenCoded_unfiltered.pdf for example, which demonstrates the
clipping. The clipped text is not selectable in AcrobatReader.
If you combine it with mailFilterText.ps, you'll get hiddenCoded.pdf. The
control command has now been clipped too, and as hiddenCoded.png shows, the
only selectable text in AcrobatReader is 'not hidden'.
I've no idea, what parts in the input files make GhostScript 9.22 behave
differently. But as 9.21 behaves as expected, I think a bug was introduced in
9.22.
Bye.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are receiving this mail because:
You are the QA Contact for the bug.