PdfSmartCopy will consolidate structures if they are the same and
wouldn't do it for this case (they are different). PdfStamper will
never consolidate structures. Please provide the original PDF and a
small standalone example so that the eventual problem can be
reproduced.

Paulo

On Wed, Aug 28, 2013 at 3:31 PM, Ivan B. Gregor <ivanbgre...@gmail.com> wrote:
>
>> Gmane says I'm top-posting. I'm not!
>
> Hi,
>
> I'm not sure where to report a bug. I think I'll be able to fix it myself
> using some help of those knowing better.
>
> Question is at the very end.
>
> Original file has these structures:
>
> 27 0 obj
> <</Type/Font
> /Subtype/Type0
> /BaseFont/ArialMT
> /Encoding/Identity-H
> /DescendantFonts[33 0 R]
> /ToUnicode 34 0 R
>>>
> --
> 28 0 obj
> <</Type/Font
> /Subtype/Type0
> /BaseFont/ArialMT
> /Encoding/Identity-H
> /DescendantFonts[35 0 R]
> /ToUnicode 36 0 R>>
> --
> 33 0 obj
> <</Type/Font
> /FontDescriptor 39 0 R
> /BaseFont/ArialMT
> /Subtype/CIDFontType2
> /CIDToGIDMap/Identity
> /CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
> 0>>
> /W[0[750]48[833.007812]68[556.152283 0 500]71 78
> 556.152283
> 79[222.167999]80 379 556.152283 380 404 604.003906]>>
> --
> 35 0 obj
> <</Type/Font
> /FontDescriptor 41 0 R
> /BaseFont/ArialMT
> /Subtype/CIDFontType2
> /CIDToGIDMap/Identity
> /CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
> 0>>
> /W[0[750 0 0 277.832001]11 12 333.007812 14[583.984375
> 277.832001
> 333.007812 277.832001 277.832001]19 28 556.152283
> 29[277.832001]35[1015.13672 666.992188 666.992188 722.16803
>  722.16803
> 666.992188 610.839783 777.83197 722.16803 277.832001 500
> 666.992188
> 556.152283 833.007812 722.16803 777.83197 666.992188 0 722.16803
>  666.992188
> 610.839783 722.16803 666.992188 943.847717 0 666.992188]68 69
>  556.152283
> 70[500 556.152283 556.152283 277.832001 556.152283 556.152283
> 222.167999
> 222.167999 500 222.167999 833.007812]81 84 556.152283
> 85[333.007812 500
> 277.832001 556.152283 500 722.16803]91 102 500 103
> [777.83197]108 124
> 556.152283]>>
> --
> 39 0 obj
> <</Type/FontDescriptor
> /FontFile2 40 0 R
> /FontName/ArialMT
> /Flags 4
> /Ascent 905.273376
> /Descent -211.914093
> /StemV 87.8906021
> /CapHeight 715.820312
> /ItalicAngle 0
> /FontBBox[-664.550781 -324.707001 2028.32031
> 1037.10938]>>
> --
> 41 0 obj
> <</Type/FontDescriptor
> /FontFile2 42 0 R
> /FontName/ArialMT
> /Flags 4
> /Ascent 905.273376
> /Descent -211.914093
> /StemV 87.8906021
> /CapHeight 715.820312
> /ItalicAngle 0
> /FontBBox[-664.550781 -324.707001 2028.32031
> 1037.10938]>>
>
>
> File after processing has these structures:
>
>
> 19 0 obj
> <</BaseFont/ArialMT
> /DescendantFonts[28 0 R]
> /Type/Font
> /Subtype/Type0
> /Encoding/Identity-H
> /ToUnicode 29 0 R>>
> --
> 28 0 obj
> <</BaseFont/ArialMT
> /CIDSystemInfo<</Ordering(Identity)/Registry(Adobe)/Supplement
> 0>>
> /Type/Font
> /W[0[750] 48[833.007812] 68[556.152283 0 500] 71 78
>  556.152283
> 79[222.167999] 80 379 556.152283 380 404
> 604.003906]
> /Subtype/CIDFontType2
> /FontDescriptor 30 0 R
> /CIDToGIDMap/Identity>>
> --
> 30 0 obj
> <</CapHeight 715.820312
> /FontBBox[-664.550781 -324.707001 2028.32031
> 1037.10938]
> /Type/FontDescriptor
> /FontFile2 31 0 R
> /Descent -211.914093
> /StemV 87.8906021
> /Flags 4
> /FontName/ArialMT
> /Ascent 905.273376
> /ItalicAngle 0>>
> --
> 20 0 obj
> <</BaseFont/ArialMT
> /DescendantFonts[32 0 R]
> /Type/Font
> /Subtype/Type0
> /Encoding/Identity-H
> /ToUnicode 33 0 R>>
> --
> 32 0 obj
> <</BaseFont/ArialMT
> /CIDSystemInfo<</Ordering(Identity)/Registry(Adobe)/Supplement
> 0>>
> /Type/Font
> /W[0[750 0 0 277.832001] 11 12 333.007812 14[583.984375
>
> 277.832001 333.007812 277.832001 277.832001] 19 28
> 556.152283 29[277.832001]
> 35[1015.13672 666.992188 666.992188 722.16803 722.16803
>  666.992188
> 610.839783 777.83197 722.16803 277.832001 500 666.992188
>  556.152283
> 833.007812 722.16803 777.83197 666.992188 0 722.16803 66
> 6.992188 610.839783
> 722.16803 666.992188 943.847717 0 666.992188] 68 69 556.
> 152283 70[500
> 556.152283 556.152283 277.832001 556.152283 556.152283
> 222.167999 222.167999
> 500 222.167999 833.007812] 81 84 556.152283 85[333.0078
> 12 500 277.832001
> 556.152283 500 722.16803] 91 102 500 103[777.83197] 108
> 124
> 556.152283]
> /Subtype/CIDFontType2
> /FontDescriptor 30 0 R
> /CIDToGIDMap/Identity>>
>
> As you may see after PdfStamper both /FontDescriptor's got unified into one
> object. Incorrect. They have some values, but refer to completlly different
> /FontFile2.
>
> Where is the possible culprit? The only function that alters /FontFile2 key
> is TrueTypeFont.getFontDescriptor, but it pertains to new font descriptors 
> only.
>
> Is there some magic that tries to unify same-looking font resources?
>
> --
> Ivan
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a 
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples: 
> http://itextpdf.com/themes/keywords.php

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to