# Eurionize - something PDF::Writer and PostScript libs might like

**URL:** <https://www.ruby-forum.com/t/eurionize-something-pdf-writer-and-postscript-libs-might-like/159668>\
**Category:** Ruby\
**Created:** [February 6, 2009, 8:52pm UTC](https://www.ruby-forum.com/t/eurionize-something-pdf-writer-and-postscript-libs-might-like/159668 "2009-02-06T20:52:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [February 6, 2009, 8:52pm UTC](https://www.ruby-forum.com/t/eurionize-something-pdf-writer-and-postscript-libs-might-like/159668/1 "2009-02-06T20:52:56Z")

</div>

I came across this bit of Perl at:

[http://wildsparx.com/eurionize/](http://wildsparx.com/eurionize/)

In short it marks a postscript doc so that it can’t be copied by most  
color copiers.

Thought someone might want to port it for PDF::Writer or whatever.

Regards,

Dan

#!/usr/bin/perl

# 

# Eurionize - add the so-called “EURion constellation” anti-copying

mark

# to a postscript document.

# 

# Copyright 2004 Asher Blum - licensed under the GNU GPL.

# Based on research by Markus Kuhn -

> **[eurion.pdf](https://www.cl.cam.ac.uk/~mgk25/eurion.pdf)**
>
> 342.08 KB

# 

# Version 0.1

use strict;

undef $/;  
my $doc = \<\>;  
my $ps = ps();  
$doc =~ s|([^/])showpage|$1ashershowpage|g;  
$doc =~ s/%%BeginProlog/%%BeginProlog\n$ps/;  
print $doc;

sub ps {  
my $ps = \<\<EOT;

/zzdonut {  
/angle exch def  
/radius exch def  
gsave  
0.45 setlinewidth  
1.417 1.417 scale  
angle rotate  
radius 0 0.72 0 360 arc stroke  
grestore  
} def

/zzconstellation {  
1 1 0 setrgbcolor  
0 0 zzdonut  
7.8 0 zzdonut  
7.2 72 zzdonut  
4.8 168 zzdonut  
4.9 249 zzdonut  
} def

/ashershowpage {  
gsave  
matrix defaultmatrix setmatrix  
1 1 5 {  
pop  
100 100 translate zzconstellation  
} for  
grestore  
showpage  
} def  
EOT  
$ps;  
}
