Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

Unicode Text Extract

$
0
0

It looks this problem is not uncommon... I have a PostScript file that is generated by a 3rd party product. Distiller converts it to PDF, but I cannot search or copy a text. It looks this is because the ToUnicode CMap information is not readily available. I created a very simple document that contains only A, B, C, 1 and 9 vertically and tried a few things, but none of them worked.

 

Can somebody shed light on this to get it working?

 

So far I tried the following lines in the CMap section of the PostScript file. I read the tech article - 5411 ToUnicode Mapping File and other Adobe references and manuals.

 

        5 begincidchar

        <0031> 20

        <001C> 28

        <0041> 36

        <0042> 37

        <0043> 38

        endcidchar

 

        5 beginbfchar
        <0014> <0031>
        <001C> <0039>
        <0024> <0041>
        <0025> <0042>
        <0026> <0043>
        endbfchar

 

        5 beginbfchar
        <14> <0031>
        <1C> <0039>
        <24> <0041>
        <25> <0042>
        <26> <0043>
        endbfchar

 

Thank you for your help.

 

* No attachement is possible in this forum(?)

 

%!PS-Adobe-3.0
%%Keywords: (atend)
%%Subject: (atend)
%%Title: (atend)
%%Creator: Document Sciences DCPI Build {dcpi_BUILD_3.0SP1.48.124}
%%Author: (atend)
%%CreationDate: Wed Feb 09 09:04:42 NZDT 2011
%%PageOrder: Ascend
%%Pages: 2
%%BoundingBox: 0 0 612 792
%%Orientation: Portrait
%%DocumentProcessColors: Black
%%DocumentCustomColors:
%%CMYKCustomColor:
%%RGBCustomColor:
%%EndComments
%%BeginProlog
%%BeginResource: definicoes
%%EndResource
/PslibDict 300 dict def PslibDict begin/N{def}def/B{bind def}N/eN{exch def}B
/ForcePS true N
/strcat{/str1 eN /str2 eN str1 length str2 length add string /str3 eN str3 0 str2 putinterval
str3 str2 length str1 putinterval str3}N [/setvpsjobname where ForcePS not and
{pop /VPS? true N
/Concat {grestore endinline gsave systemdict /concat get exec}def}
{/setvpsjobname
{256 string cvs /VPSJobName eN}N
/Concat {systemdict /concat get exec}def
/startbooklet{pop}N /endbooklet{}N /VPS? false N /endelement{}N}ifelse
cleartomark /ImgData {(ImgData_) ImgName strcat cvn}B /ImgForm {(ImgForm_) ImgName strcat cvn}B
/EmitterForm{VPS? {EPS_INIT exch
placeelement EPS_CLEANUP grestore PageBBoxDict defineinline gsave
}{EPS_INIT exch /Form findresource execform EPS_CLEANUP}ifelse}B
/BeginImgData{/img_size eN /img_ury eN /img_urx eN /img_lly eN /img_llx eN /ImgName eN
<</BBox [img_llx img_lly img_urx img_ury] img_size 0 eq{/F (ImgForm_) ImgName strcat}
{/Length img_size /EODCount img_size}ifelse /Flexible true /Type /Reusable >> VPS?{ImgForm exch defineelement}
{ImgData exch currentfile exch /SubFileDecode filter /ReusableStreamDecode filter}ifelse}N
/EndImageData{VPS?{endelement}{N <</FormType 1 /BBox [img_llx img_lly img_urx img_ury]/Matrix [1 0 0 1 0 0]
/PaintProc {pop ImgData cvx exec 0 setfileposition ImgData cvx exec cvx exec}>> ImgForm exch
/Form defineresource pop}ifelse}N
/PageBBoxDict {<</BBox [0 0 currentpagedevice /PageSize get aload pop ] >>}B
/Save {PslibDict /PageSave save put VPS? {PageBBoxDict defineinline}if}N
/Restore {VPS?{endinline}if PslibDict /PageSave get restore}N
/p{show}N/w{0 rmoveto}B/a{moveto}B/l{lineto}B/qs{currentpoint
currentpoint newpath moveto 3 2 roll dup true charpath stroke
stringwidth pop 3 2 roll add exch moveto}B/qf{currentpoint
currentpoint newpath moveto 3 2 roll dup true charpath fill
stringwidth pop 3 2 roll add exch moveto}B/qsf{currentpoint

currentpoint newpath moveto 3 2 roll dup true charpath gsave stroke grestore fill
stringwidth pop 3 2 roll add exch moveto}B/qc{currentpoint
currentpoint newpath moveto 3 2 roll dup true charpath clip
stringwidth pop 3 2 roll add exch moveto}B/qsc{currentpoint
currentpoint initclip newpath moveto 3 2 roll dup true charpath clip stroke
stringwidth pop 3 2 roll add exch moveto}B/qfc{currentpoint
currentpoint initclip newpath moveto 3 2 roll dup true charpath clip fill
stringwidth pop 3 2 roll add exch moveto}B/qfsc{currentpoint
currentpoint initclip newpath moveto 3 2 roll dup true charpath gsave stroke grestore clip fill
stringwidth pop 3 2 roll add exch moveto}B/qi{currentpoint
3 2 roll
stringwidth pop 3 2 roll add exch moveto}B/tr{currentpoint currentpoint 5 4 roll add moveto}B/rt{moveto}B
/reencdict 12 dict def /ReEncode { reencdict begin
/newcodesandnames exch def /newfontname exch def /basefontname exch def
/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
basefontdict { exch dup /FID ne { dup /Encoding eq
{ exch dup length array copy newfont 3 1 roll put }
{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
newfont /FontName newfontname put newcodesandnames aload pop
128 1 255 { newfont /Encoding get exch /.notdef put } for
newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
newfontname newfont definefont pop end } def
/MarkerBegin{countdictstack 50464 mark}B
/MarkerCleanup{stopped {(A Marker caused a PostScript error, continuing processing...) =}if
{cleartomark dup 50464 eq{pop exit}if}loop countdictstack exch sub dup 0 gt{{end}repeat}{pop}ifelse}B
/EPS_INIT{/EPS_SAVE save N gsave newpath 100 dict begin /DictStackDepth countdictstack N
/showpage{}N/erasepage{}N/copypage{}N mark}B
/EPS_CLEANUP{cleartomark DictStackDepth 1 dup countdictstack exch sub {end}for
end grestore EPS_SAVE restore} B
/setcustomcolor
{exch aload pop pop 4 {4 index mul 4 1 roll} repeat
5 -1 roll pop setcmykcolor} 1 index where {pop pop pop} {dup xcheck {bind} if N} ifelse
/ccdef {5 packedarray def} B
/cc {setcustomcolor} N
/ds_ComposeFont
{
    1 index /CMap resourcestatus
    { pop pop }
    {
        /CIDInit /ProcSet findresource
        begin
        12 dict
        begin
        begincmap
        /CMapName 2 index def
        /CMapVersion 1.000 def
        /CMapType 1 def
        /WMode 0 def

        /CIDSystemInfo 3 dict dup
        begin
        /Registry (Adobe) def
        /Ordering (Identity) def
        /Supplement 0 def
        end def
        1 begincodespacerange
        <0000> <FFFF>
        endcodespacerange
        1 begincidrange
        <0000> <FFFF> 0
        endcidrange
        endcmap
        CMapName currentdict /CMap defineresource pop
        end
        end
    } ifelse
    composefont
} bind def
end %PSlibdict
/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
[/Keywords(atend)
/Subject(atend)
/Title(atend)
/Creator (Document Sciences DCPI Build {dcpi_BUILD_3.0SP1.48.124})
/Author(atend)
/CreationDate (Wed Feb 09 09:04:42 NZDT 2011)
/DOCINFO pdfmark
%%EndProlog
%%BeginSetup
PslibDict begin

 

%%EndSetup
%DocScienceBeginComposeFont: EWMKLC+TimesNewRomanPSMT-Identity-H
16 dict
begin
/FontType 42 def
/FontMatrix [1 0 0 1 0 0] def
/FontBBox [-1164 2062 4096 -628] def
/CIDFontName /EWMKLC+TimesNewRomanPSMT def
/CIDCount 65535 def
/PaintType 0 def
/CIDFontType 2 def
/GDBytes 2 def
/CIDSystemInfo 3 dict dup
begin
/Registry (Adobe) def
/Ordering (Identity) def

/Supplement 0 def

 

end def
/CharStrings 1 dict dup begin /.notdef 0 def end def
/Encoding 1 array dup 0 /.notdef put readonly def
/CIDMap 0 def
/GlyphDirectory 16 dict dup begin
    0 <0002011C0000051C050000030007004DB10201BB02BE0006000702BFB2000504B802BEB403000A07
04B802BEB5010019080605BF02BE0002000301290009016B015E00182B10F63CFD3C4E10F43C4DFD
3C003F3CFD3C10FC3CFD3C31302111211125211121011C0400FC2003C0FC400500FB002004C0> def
end def
/sfnts [

....

] def
/EWMKLC+TimesNewRomanPSMT currentdict end /CIDFont defineresource pop
/EWMKLC+TimesNewRomanPSMT-Identity-H /Identity-H [/EWMKLC+TimesNewRomanPSMT] ds_ComposeFont pop
%DocScienceEndComposeFont: EWMKLC+TimesNewRomanPSMT-Identity-H
%DocScienceBeginEmbedGlyphs
/EWMKLC+TimesNewRomanPSMT /CIDFont findresource /GlyphDirectory get
begin
37 <00030022000004E6054C001E002B0038027D40305A005A1E8900881E8933991A9D27AC1AAC27E91A
EA27E72F0C38007A2779339A329933A524AA33D81AD827D8280A043AB802E7B30F67363AB8FFC0B3
1C22343AB8FFC040E31517343340212C343340191E34324023283432401B1D3444244425891AD901
D624DA33E52507042401250D32100315061B1A141E1624162815302E3245244A34570158195A2796
02111000103A55015A24603A703A803AA03A081A301A3250000310071A241E28192F040602031E17
1E4F3388249A24D93307203A403A503A6302630360056006600760307606731A731B701E74247327
7A288406861B861E8F33803ACA2FDA2FEB24FA241959080F1F1B092122101F1B1621233324000304
2C00352B1F24032229382C33032E2228353509162928171716022E280808090890260126B8FFC0B2
3A3526B8FFC0B2423526B8FF80B33F413426B8FFC0B343463426B8FFC040144235264C5F1C010A1E
301C021C55042B1F382C31B8FFC040104535124004A004020004A004E0040304B8FFC0400A0D1134
00040120040104B801D140252C06131302552C0C0F0F02552C0C0D0D02552C22100F0E0F1002550F
200D0D02550F9E393ABC01D100210061011800182B2B4EF42B2B3C4DED2B2B2BFD5D712B5D714358
B90031032DE91BB90031032DED592B103C3C3C10F45D72ED2B2B2B2B2B72003F3C10ED3F3C10ED11
12392FED12173911121739113901111217392B2B3130437940412F342328181E01071A1B191B0206
062624250225332628182633012F07313301231E2633033401313303271B29330130052E3300251D
2233001E32033533010100103C2B3C2B2B2B012B2B2B2B2B2B2B2B2A81818181015D710172727200
7271002B2B2B2B012B2B2B005D005D01161716151406062321353332373635113427262323352132
171616151406251616333236363534262322071116333236353426262322060703B28D466180DFE5
FD80335525171D274D33024AA463969E7CFD7B255F3992934EC2BA64507471B5BE56C28F3E581B02
B41E425C8565B95525362372036C7E212C251824B77766A10F07073F824D77A816FB6F1BA3784F92
54040500> def
end
%DocScienceEndEmbedGlyphs

...

%%Page: 1 1
%%PageBoundingBox: 0 0 612 792
%%BeginPageSetup
<</PageSize [612.0 792.0]>> setpagedevice
[ /CropBox [0 0 612 792] /PAGE pdfmark
%%PageOrientation: Portrait
%%EndPageSetup
Save
/EWMKLC+TimesNewRomanPSMT-Identity-H findfont [12 0 0 12 0 0] makefont setfont
90 709.30 a
0 0 0 setrgbcolor
<0024> p
90 695.50 a
<0025> p
90 681.70 a
<0026> p
90 667.91 a
<0014> p
90 654.11 a
<001C> p
Restore
showpage

 

%%Page: 2 2
%%PageBoundingBox: 0 0 612 792
%%BeginPageSetup
[ /CropBox [0 0 612 792] /PAGE pdfmark
%%PageOrientation: Portrait
%%EndPageSetup
Save
/EWMKLC+TimesNewRomanPSMT-Identity-H findfont [12 0 0 12 0 0] makefont setfont
90 709.30 a
0 0 0 setrgbcolor
<0024> p
90 695.50 a
<0025> p
90 681.70 a
<0026> p
90 667.91 a
<0014> p
90 654.11 a
<001C> p
Restore
showpage

 

%%EOF


Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>