Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!postnews.google.com!e6g2000prf.googlegroups.com!not-for-mail
From: OKO <yuanjiabei@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Print figures with a patch object into a searchable pdf file
Date: Fri, 14 Mar 2008 14:36:00 -0700 (PDT)
Organization: http://groups.google.com
Lines: 50
Message-ID: <d25ee624-f5e5-4564-9560-d3fa5e925835@e6g2000prf.googlegroups.com>
NNTP-Posting-Host: 146.6.93.85
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1205530560 7425 127.0.0.1 (14 Mar 2008 21:36:00 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 14 Mar 2008 21:36:00 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e6g2000prf.googlegroups.com; posting-host=146.6.93.85; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
Xref: news.mathworks.com comp.soft-sys.matlab:457321



I used patch in Matlab to generate transparent object for a figure.
Then the figure need to be exported into a pdf file. The last
requirement is that, in the generated pdf file, the values (axis and
characters) need to be searchable, that means you can use text-cursor
to select those single value or characters.

I tried two methods, but each of them only reach partially my
requirement. So I was wondering if anyone can find a complete solution
to this.

Thanks in advance.

OKO


Matlab Codes:

%_____figure with a transparent object:______

x = [0.8, 1.6, 1.6, 1.2, 0.8];
y = [0.6, 1.2, 1.2, 0.9, 0.6];
z = [1, 1, 2, 1.7, 2];
patch(x, y, z, 'g','EdgeColor','none','FaceAlpha',0.3)
axis equal
box on
view([35, 30])

%______Solution 1:_____________________
print('-painters','-dpdf','-r100','c:\test.pdf')
%this is similar as using 'copy figure' in menu, paste into word, and
print as adobe pdf file
%the drawback of this method is that, the transparent object in the
figure becomes non-transparent!

%______Solution 2:_____________________
print('-dtiff','-noui','-r100','c:\1')
%create a tif file and then convert it into pdf using adobe
professional 8.0
%the figure in pdf is non-searchable

The
advantage                           and
disadvantage
Solution 1                          value in pdf is
searchable                                      lose transparent
object
Solution 2                       transparent object kept in
pdf                          vaues in pdf is not
searchable