1 Reply Latest reply on Jul 9, 2009 12:27 PM by MichaelKazlow

    Having Problem Displaying Urdu in PDF!

    Xception4U

      I've tried a lot to embed urdu font in pdf file. I'm using Perl's module "PDF::REUSE" for this purpose. No matter what font I try to embed, it gives me the message "Cannot extract the embedded font ----". Event "Arial" is not extracted. If anybody has proper idea about PDF document format please have a look below and let me know where the problem is. I've tried Acrobat reader 7,8,9 but all in vain. The first file im going to paste is without embedding font. It doesn't show urdu. The second fild just show dots. You can copy the text and save it with pdf extension to see the results youself.

       

      File1: without embedding font:

       

      %PDF-1.4
      %âãÏÓ
      4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Helvetica/Encoding/WinAnsiEncoding>>endobj
      5 0 obj<</ProcSet[/PDF/Text]/Font << /Ft1 4 0 R >>>>endobj
      6 0 obj<</Length 56>>stream
      0 0 0 rg
      0 g
      f

       

      BT /Ft1 12 Tf 25 790 Td (لاھوری) Tj ET

       

      endstream
      endobj
      3 0 obj<</Type/Page/Parent 2 0 R/Contents 6 0 R/MediaBox [0 0 595 842]/Resources 5 0 R>>endobj
      2 0 obj<</Type/Pages/Kids [3 0 R ]/Count 1 >>endobj
      1 0 obj<</Type/Catalog/Pages 2 0 R>>endobj
      xref
      0 7
      0000000000 65535 f
      0000000409 00000 n
      0000000357 00000 n
      0000000262 00000 n
      0000000015 00000 n
      0000000101 00000 n
      0000000160 00000 n
      trailer
      <<
      /Size 7
      /Root 1 0 R
      /ID [<de1200d050490945117cbea4bddc5fe3><de1200d050490945117cbea4bddc5fe3>]
      >>
      startxref
      452
      %%EOF

       

      File2: with embeded font:

       

      %PDF-1.4
      %
      9 0 obj<</ProcSet[/PDF/Text]/Font << /Ft1 4 0 R >>>>endobj
      10 0 obj<</Length 74>>stream
      0 0 0 rg
      0 g
      f

       

      BT /Ft1 12 Tf 25 790 Td <00DF008F010400EF00AF0078> Tj ET

       

      endstream
      endobj
      3 0 obj<</Type/Page/Parent 2 0 R/Contents 10 0 R/MediaBox [0 0 595 842]/Resources 9 0 R>>endobj
      2 0 obj<</Type/Pages/Kids [3 0 R ]/Count 1 >>endobj
      4 0 obj
      <<
      /Type /Font
      /Subtype /Type0
      /DescendantFonts [ 7 0 R ]
      /Encoding /Identity-H
      /BaseFont /BXCJIM+UrduNaskhAsiatypeRegular
      /Name /Ft1
      >>
      endobj
      5 0 obj
      <<
      /Type /FontDescriptor
      /Ascent 1022
      /Flags 34
      /Descent -509
      /ItalicAngle 0
      /CapHeight 0
      /StemV 0
      /FontBBox [ -142 -677 1030 1147 ]
      /FontFile2 6 0 R
      /MissingWidth 1022
      /FontName /BXCJIM+UrduNaskhAsiatypeRegular
      >>
      endobj
      6 0 obj
      <<
      /Length 11 0 R
      /Filter [ /FlateDecode ]
      /Length1 3896
      >>
      stream
      x��W}PT� ?�������,��.߬��������%�ȇ�  G���  ̈`$H�bLT�8�&V�:�4���v���T;��jZS��ӴN�:1i ;-��    8 ��� �R�ȴ����]~��s�}��s~��}  
      <  t-=ݖ ���C�  �TkW[��� � � uƶ�_km J� @Ե�
      ����� ���y&#127;;*bj� Q^������wnϼ�(�  ~���%��s� ���h��#��E ) Т ,]O����G  �| �FD ��  �M�  ȳ�( d/�Qz��z�O�o�� '`  H ���r�9�m��x[���,  �>q �C>�  ��>� r�v2��a���4�������3���� ����� � �[7N�������G��${� ���!U��� �U��S�'��� �A=����HN�U�$U��l2�MqqR�J�h����� � 3��5fSnn��
      �� \.�KY2)�s��<�׻�'/��0Խ�Q�N��oݜZ��T��"�j�� �(Q� ]�(+r%�}��  R�)Q ���M��ȑ�^R�P �6��6�r| �dm��8Ǫ�� 6�f$Iњ�e���֝H-�K�u�� � u��舘|� !ŘS^p{ӗdy E3�1��� �.Z@ 5�Db0 ��UG  K�5 �� t*��J$��=^� ׍c�&3� ��� �̙�$�\ ����  ��le �ݜ/2FT��/�Qњ�O.��Y��+M �� �t���w��� ~%|�VR ��$�'&S�  �XIK�( i�?
      ���H`���Iv�a�T6�� @  �<�B��V�w xV���f�|�y�� �z���x�+J�<��l� ���5ߔk.<�������A q:�.���%E'&Iv�ͮ#�x�%1U$�&#127;*��
      �|Ԁs��N�GѨ����  j��r���.��(1���J�o���� �W��)UsV�&#127;1�֤��d�J��  �  �ϩ�. x:ys�o�gf�#&#127;� ����ٟd�{1��71�@!=|�^��0 2�>�L23�Y0�iФ[cՉ LBj$ R ��GDJL�  5dN�%S��8 �+`2�����rM '  �    ��\� s �RsϹ �}kƬ��gg�}�h���f9K3� �LyER�u�83I��� mD�C�y��quuz�S�� ({�qG ղ S��q1X ff� @28! ��6�� �� li&�62�B �� �YiB��� 5��
      Ѝ  +�MD9��"�3=J�DUaD �����ī@�O P�9LqF    )t�0R�N?����ϑ�x�޾��h�P �� X ]�� ���&#127;~����%Y����&#127;�RCTQ��A �o\X[mIuX �/���N�eQ��R����� �/ Q���:� �1�àV����-    # }�-|�� �% ��k��ʅϩ�c�x� �5���D�4�"  ��X }� �A  ��, " �� Բ�@ �C!� O 2h6�X9���.�m|���md  �~��ù*y^�S�@| �P�4��D_�T��\�    �H7l�> ���AX'l�$q    \ n�#B?et l*�j: �X)���!E� ���8&#127;EX 18�T �u��  �m�    ; 58��w�Dy'�
      Ћ��f� V�� B;�J<:0 �� �}��A����R��}  &#127;Ě A��&� � юx q Q�hF|F�   �sZ��k�s��� � }�!��/P �xM<    !i7� �?# �]� B�
      � 2�({���    ~���q� VJ  ���0���3�E� ת�CA����8�o&B��� *� �Dr r� X&�Lg�w���e{� sU��1̿O&#127;
      �  �Gq�3�� ��s�A �� >W|� !� >J����  B ���Q߉14��� )��QnE�� )1 #l|T >��Ո\�ɤ\�8��| �� �� xO鷠 ��%� �!�� �7��
      \&#127;���� Y�@�- /�cR ��6@�� 楍�+rǤ܉{��G�{X� ��,�r'  u(������ ��b] �y � ȭ
      � =r"�Q� B*/��<ާ q}.�� Zh%�C����գ    �� >Ǝ�|<�� �s ���s #f��H�)���:r ��]̷ � y`I�  �y|���|x�c�&#127; ��%����� $�>�O���L�k����G��$(�k@�d �2 �{  � �� �� h&#127;7b�_ ��Æ�^܂�< �b/�(�v�mr/U���i��t�Dѿ�*r V�#XC��K<I3� xZx
      s} k� ا ��j � ����-٦x � ֈ؊�� } ub%4�۠M� �T�c}�:5��^ �V �� )��۱/oT�/�=_] �7�x�e�  pL��(  �?J (��Y����������h�j�wA%��,_?K�����/�;CI d�  �O ��ӌ� � � &#127;%
      endstream
      endobj
      7 0 obj
      <<
      /Type /Font
      /Subtype /CIDFontType2
      /W 8 0 R
      /BaseFont /BXCJIM+UrduNaskhAsiatypeRegular
      /CIDSystemInfo <<
      /Supplement 0
      /Ordering (Identity)
      /Registry (Adobe)
      >>
      /FontDescriptor 5 0 R
      /DW 1022
      >>
      endobj
      8 0 obj
      [ 120 [ 700 ] 143 [ 254 ] 175 [ 332 ] 223 [ 455 ] 239 [ 375 ] 260 [ 437 ] ]
      endobj
      11 0 obj
      2233
      endobj
      1 0 obj<</Type/Catalog/Pages 2 0 R>>endobj
      xref
      0 12
      0000000000 65535 f
      0000003289 00000 n
      0000000291 00000 n
      0000000195 00000 n
      0000000343 00000 n
      0000000495 00000 n
      0000000725 00000 n
      0000002964 00000 n
      0000003177 00000 n
      0000000015 00000 n
      0000000074 00000 n
      0000003268 00000 n
      trailer
      <<
      /Size 12
      /Root 1 0 R
      /ID [<42ae481de28a1814725055258f676da2><42ae481de28a1814725055258f676da2>]
      >>
      startxref
      3332
      %%EOF

       

       

      -------------------------------------------------------------- Please help me thanks!!!