[reportlab-users] Come on, i am so messed up and i need anything from u

Andy Robinson reportlab-users@reportlab.com
Tue, 11 Nov 2003 22:39:07 -0000


This is a multi-part message in MIME format.

------=_NextPart_000_0039_01C3A8A4.9DD7E2E0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Sarah,

Thanks for sending this sample code and the font; now
perhaps we can help.

Attached messages are held until one of us approves them.  I just
approved it so it should arrive in a few minutes; usually this happens
in the mornings UK time.

Do you have an example of a real, small PDF document containing
this?  e.g. could you type the same word in Notepad or Word
and distill it to PDF, then send us that?  This would let some of us
look inside the file to see how things are stored.

Thanks,

Andy Robinson


  -----Original Message-----
  From: reportlab-users-admin@reportlab.com
[mailto:reportlab-users-admin@reportlab.com]On Behalf Of sarah el-lawindy
  Sent: 11 November 2003 21:36
  To: reportlab-users@reportlab.com
  Subject: Re: [reportlab-users] Come on, i am so messed up and i need
anything from u




  Marius Gedminas ,
    thanks for replying. here is the code i wrote:

      import reportlab.rl_config
      reportlab.rl_config.warnOnMissingFontGlyphs = 0
      from reportlab.pdfbase import pdfmetrics
      from reportlab.pdfbase.ttfonts import TTFont
      from reportlab.pdfgen import canvas
      c = canvas.Canvas('t.pdf')
      pdfmetrics.registerFont(TTFont('ArabicRiyadh', 'ArabicRiyadh.ttf'))
      from reportlab.lib.fonts import addMapping
      addMapping('ArabicRiyadh', 0, 0, 'ArabicRiyadh')
      c.setFont('ArabicRiyadh', 32)
      TEST = u'JGaHm'
      #temp = unicode("JGaHm~", "ISO-8859-13")
      c.drawString(100, 700,TEST.encode('utf-8'))
      c.save()

  the output was not JGaHm' at all, it another word.
  by the way, i am uisng adode acrobat ME , and i used  another viewer but
the same thing took place.
  i tried sending the ttf file to u, but the coz of its size, the modrator
of the group  send me a notification back.
  thanks in advance,
  sam ellawindy


----------------------------------------------------------------------------
--
  Do you Yahoo!?
  Protect your identity with Yahoo! Mail AddressGuard

------=_NextPart_000_0039_01C3A8A4.9DD7E2E0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2>Sarah,</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =
size=3D2>Thanks=20
for sending this sample code and the font; now</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2>perhaps we can help.</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2>Attached messages are held until one of us approves them.&nbsp; =
I=20
just</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2>approved it so it should arrive in a few minutes; usually this=20
happens</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =
size=3D2>in the=20
mornings UK time.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =
size=3D2>Do you=20
have an example of a real, small PDF document =
containing</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2>this?&nbsp; e.g. could you type the same word in Notepad or=20
Word</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =
size=3D2>and=20
distill it to PDF, then send us that?&nbsp; This would let some of=20
us</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =
size=3D2>look=20
inside the file to see how things are stored.</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =
size=3D2>Andy=20
Robinson</FONT></SPAN></DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D279103222-11112003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  reportlab-users-admin@reportlab.com=20
  [mailto:reportlab-users-admin@reportlab.com]<B>On Behalf Of </B>sarah=20
  el-lawindy<BR><B>Sent:</B> 11 November 2003 21:36<BR><B>To:</B>=20
  reportlab-users@reportlab.com<BR><B>Subject:</B> Re: [reportlab-users] =
Come=20
  on, i am so messed up and i need anything from u<BR><BR></FONT></DIV>
  <DIV><BR><BR><STRONG><EM>Marius Gedminas </EM></STRONG>,<BR>&nbsp; =
thanks for=20
  replying. here is the code i wrote:</DIV>
  <DIV><BR>&nbsp;&nbsp;&nbsp; import =
reportlab.rl_config<BR>&nbsp;&nbsp;&nbsp;=20
  reportlab.rl_config.warnOnMissingFontGlyphs =3D 0 =
<BR>&nbsp;&nbsp;&nbsp; from=20
  reportlab.pdfbase import pdfmetrics<BR>&nbsp;&nbsp;&nbsp; from=20
  reportlab.pdfbase.ttfonts import TTFont<BR>&nbsp;&nbsp;&nbsp; from=20
  reportlab.pdfgen import canvas<BR>&nbsp;&nbsp;&nbsp; c =3D=20
  canvas.Canvas('t.pdf')<BR>&nbsp;&nbsp;&nbsp;=20
  pdfmetrics.registerFont(TTFont('ArabicRiyadh',=20
  'ArabicRiyadh.ttf'))<BR>&nbsp;&nbsp;&nbsp; from reportlab.lib.fonts =
import=20
  addMapping<BR>&nbsp;&nbsp;&nbsp; addMapping('ArabicRiyadh', 0, 0,=20
  'ArabicRiyadh')<BR>&nbsp;&nbsp;&nbsp; c.setFont('ArabicRiyadh',=20
  32)<BR>&nbsp;&nbsp;&nbsp; TEST =3D u'JGaHm'<BR>&nbsp;&nbsp;&nbsp; =
#temp =3D=20
  unicode("JGaHm~", "ISO-8859-13")<BR>&nbsp;&nbsp;&nbsp; =
c.drawString(100,=20
  700,TEST.encode('utf-8'))<BR>&nbsp;&nbsp;&nbsp; c.save()</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>the output was not JGaHm' at all, it another word.<BR>by the way, =
i am=20
  uisng adode acrobat ME , and i used&nbsp; another viewer but the same =
thing=20
  took place.<BR>i tried sending the ttf file to u, but the coz of its =
size, the=20
  modrator of the group &nbsp;send me a notification back.<BR>thanks in=20
  advance,<BR>sam ellawindy</DIV>
  <P>
  <HR SIZE=3D1>
  Do you Yahoo!?<BR><A =
href=3D"http://antispam.yahoo.com/whatsnewfree">Protect=20
  your identity with Yahoo! Mail =
AddressGuard</A></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0039_01C3A8A4.9DD7E2E0--