I have used the following and all seems OK
in pdftranslator.cpp, I have not seen an normal array of size 1... otherwise
probably also need to check if it a child of an array
else if ( obj->IsArray() )
{
PdfArray carray ( obj->GetArray() );
PdfArray narray;
for ( unsigned int ci = 0; ci < carray.GetSize(); ++ci )
{
PdfObject *co ( migrateResource ( &carray[ci] ) );
narray.push_back ( *co );
}
if (carray.GetSize() > 1) {
ret = targetDoc->GetObjects().CreateObject ( narray );
}
else {
ret = new PdfObject ( narray ) ;;
}
}
else if ( obj->IsReference() )
From: [email protected]
To: [email protected]; [email protected]
Date: Mon, 19 Apr 2010 06:39:04 -0700
Subject: RE: [Podofo-users] Impose Migrate resources and arrays
Rewriting the array from direct to indirect would indeed be a bad thing – for
size (and performance) considerations. I am sure there is a bug in the array
object copier somewhere…should be easy to find and fix.
Leonard
From: Harald Weinhandl [mailto:[email protected]]
Sent: Monday, April 19, 2010 9:35 AM
To: [email protected]
Subject: [Podofo-users] Impose Migrate resources and arrays
Hi
I have been debugging my way through impose to see why a PDF after being
imposed has a HUGE number of objects..
when impose( pdftranslator) reads a certain types of arrays it seems to create
an independent object of each member, this is seem in a PDF that has width
array of glyphs like this
Orginal code
19 0 obj
<</Subtype/CIDFontType2/FontDescriptor 20 0
R/BaseFont/Arial/W[3279[667]3278[778]3277[372]3276[328]3275[377]3274[372]3273[372]3272[278]3271[0]3270[0]3269[0]3268[0]3267[364]3266[369]3265[358]3264[358]3007[656]3006[745]3005[609]3004[607]3003[749]3002[655]3001[709]3000[394]2999[450]2998[394]2997[450]2996[489]2995[489]2994[337]2993[337]2992[0]2735[796]2734[781]2733[781]2732[781]2731[781]2730[781]2729[781]2728[781]2727[781]2726[1015]2725[1015]2724[1015]2723[1015]2722[1015]2721[1015]2720[820]2463[778]2462[278]2461[611]2460[556]2459[667]2458[556]2457[667]2456[556]2455[667]2454[556]2453[667]2452[556]2451[667]2450[556]2449[722]2448[556]2191[0]2190[0]2189[0]2188[0]2187[0]2186[0]2185[0]2184[0]2183[0]2182[0]2181[0]2180[0]2179[0]2178[0]2177[0]2176[0]1919[527]1918[485]1917[632]1916[661]1915[764]1914[719]1913[429]1912[712]1911[1005]1910[906]1909[964]1908[500]1907[500]1906[556]1905[404]1904[500]1647[244]1646[244]1645[244]1644[320]1643[244]1642[282]1641[338]1640[413]1639[394]1638[526]1637[450]1636[544]1635[846]1634[846]1633[1.....
This is still put out but each sub array is also put out ( see below ) on large
non subsetted fonts, this becomes huge since its one for each glyph. Any ideas
to fix this, so an Indirect Obj is not output for each reference it seems more
a PDF issue, the array could be rewritten... but we do not always control input
PDF's
Also dictionary seems to be replicated.. i.e CIDSystemInfo creates the extra 9
0 obj
FontBBox ( extra 11 obj) etc..
8 0 obj
<<
/Type /Font
/BaseFont /Arial
/CIDSystemInfo <<
/Ordering (Identity)
/Registry (Adobe)
/Supplement 0
>>
/CIDToGIDMap /Identity
/DW 760
/FontDescriptor 10 0 R
/Subtype /CIDFontType2
/W [ 3279 [ 667 ] 3278 [ 778 ] 3277 [ 372 ] 3276 [ 328 ] 3275 [ 377 ]
3274 [ 372 ] 3273 [ 372 ] 3272 [ 278 ] 3271 [ 0 ] 3270 [ 0 ]
3269 [ 0 ] 3268 [ 0 ] 3267 [ 364 ] 3266 [ 369 ] 3265 [ 358 ]
3264 [ 358 ] 3007 [ 656 ] 3006 [ 745 ] 3005 [ 609 ] 3004 [ 607 ]
3003 [ 749 ] 3002 [ 655 ] 3001 [ 709 ] 3000 [ 394 ] 2999 [ 450 ]
2998 [ 394 ] 2997 [ 450 ] 2996 [ 489 ] 2995 [ 489 ] 2994 [ 337 ]
.......
260 [ 667 ] 259 [ 556 ] 258 [ 667 ] 257 [ 333 ] 256 [ 552 ]
]
>>
endobj
9 0 obj
<<
/Ordering (Identity)
/Registry (Adobe)
/Supplement 0
>>
endobj
10 0 obj
<<
/Type /FontDescriptor
/Ascent 820
/AvgWidth 441
/CapHeight 820
/Descent 220
/Flags 32
/FontBBox [ -665 -325 2000 1006 ]
/FontFile2 12 0 R
/FontName /Arial
/ItalicAngle 0
/Leading 40
/MaxWidth 1020
/MissingWidth 760
/StemH 80
/StemV 80
/XHeight 574
>>
endobj
11 0 obj
[ -665 -325 2000 1006 ]
endobj
12 0 obj
<<
/Filter /FlateDecode
/Length 422995
/Length1 758094
>>
stream
endstream
endobj
13 0 obj
[ 667 ]
endobj
14 0 obj
[ 778 ]
endobj
15 0 obj
[ 372 ]
endobj
16 0 obj
[ 328 ]
endobj
17 0 obj
[ 377 ]
endobj
18 0 obj
[ 372 ]
endobj
19 0 obj
[ 372 ]
endobj
20 0 obj
[ 278 ]
endobj
21 0 obj
[ 0 ]
endobj
22 0 obj
[ 0 ]
endobj
23 0 obj
[ 0 ]
endobj
24 0 obj
[ 0 ]
endobj
25 0 obj
[ 364 ]
endobj
26 0 obj
[ 369 ]
endobj
27 0 obj
[ 358 ]
endobj
28 0 obj
[ 358 ]
endobj
29 0 obj
[ 656 ]
endobj
30 0 obj
[ 745 ]
endobj
31 0 obj
[ 609 ]
endobj
32 0 obj
[ 607 ]
endobj
33 0 obj
[ 749 ]
endobj
34 0 obj
[ 655 ]
endobj
35 0 obj
[ 709 ]
endobj
36 0 obj
[ 394 ]
endobj
37 0 obj
[ 450 ]
endobj
38 0 obj
[ 394 ]
endobj
39 0 obj
[ 450 ]
endobj
40 0 obj
[ 489 ]
endobj
41 0 obj
[ 489 ]
endobj
42 0 obj
[ 337 ]
endobj
43 0 obj
[ 337 ]
endobj
44 0 obj
[ 0 ]
endobj
45 0 obj
[ 796 ]
endobj
46 0 obj
[ 781 ]
endobj
47 0 obj
[ 781 ]
endobj
48 0 obj
[ 781 ]
endobj
49 0 obj
[ 781 ]
endobj
50 0 obj
[ 781 ]
endobj
51 0 obj
[ 781 ]
endobj
52 0 obj
[ 781 ]
endobj
53 0 obj
[ 781 ]
endobj
54 0 obj
[ 1015 ]
endobj
55 0 obj
[ 1015 ]
endobj
56 0 obj
[ 1015 ]
endobj
57 0 obj
[ 1015 ]
endobj
58 0 obj
[ 1015 ]
endobj
59 0 obj
[ 1015 ]
endobj
60 0 obj
[ 820 ]
endobj
61 0 obj
[ 778 ]
endobj
62 0 obj
[ 278 ]
endobj
63 0 obj
[ 611 ]
Regards
Harald
Australia's #1 job site If It Exists, You'll Find it on SEEK
_________________________________________________________________
Browse profiles for FREE! Meet local singles online.
http://clk.atdmt.com/NMN/go/150855801/direct/01/------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users