Re: PDF::Reuse & UK currency 'pound' symbol




Quoth justin.news@xxxxxxxxxxxxxx:
I'm trying to print a 'pound' symbol (the UK currency, not a # or
anything else that may get called pound) to a PDF document in
PDF::Reuse. I've a string containing the symbol in a variable, and am
printing it thus:
$txt = "The cash value is £"; # not sure how that'll appear on usenet
prText($x, $y, $txt) ;

The output I'm seeing is a capitalised A with a caret followed by the
pound symbol. I'm not sure how to proceed. Looking at UTF8, I can find
the code for the character I want, but, looking at documentation for the
utf8 module I see: "Do not use this pragma for anything else than
telling Perl that your script is written in UTF-8" ... which it isn't, I
just want to print one symbol.

Actually, it probably is. If you have a literal £ as you wrote it up
there, then your document is in UTF8.

You should probably use the encoding pragma rather than the utf8 pragma:
it's more robust on bad input.

Any suggestions how I might move forward with this? Thank you for any
help you can give.

I strongly suspect this won't help, though :(. prText simply inserts the
text into the PDF as a PDF text literal, and I don't think PDF
understands literals in UTF8. You need to locate the £ character in
whatever font you are using and arrange to output that character
instead; simply converting your (now) Unicode perl string into an
ISO8859-1 byte string using Encode::encode may be sufficient, if you're
lucky.

Ben

.



Relevant Pages

  • Re: Snapshot to pdf code
    ... Dim strDocName As String ... ' Save the Report as a PDF document. ... ' The selected report is first exported to Snapshot format. ...
    (microsoft.public.access.reports)
  • Re: Attaching Embedded Objects to a Email in Access
    ... this be used for word, pdf, excel documents that are stored as objects in my ... It only works for Access reports. ... Public Function SendMail(strRecipients As String, strSubject As String, _ ... Dim strFileName As String ...
    (microsoft.public.access.formscoding)
  • RE: Automated Printing
    ... But when I was using VBA code to do the printing. ... I need "Adobe PDF on Ne01" to make it work ... Dim wshNetwork As Object ... Dim sCurrentprinter As String ...
    (microsoft.public.excel.programming)
  • Re: Attaching Embedded Objects to a Email in Access
    ... or does this just apply to reports created withinin ... either word or pdf format as a embedded object. ... Public Function SendMail(strRecipients As String, strSubject As String, _ ... Dim strFileName As String ...
    (microsoft.public.access.formscoding)
  • Re: email pdf document
    ... Here is the line of code that the .pdf is ... I changed the strPath to where the file was located on the server. ... Dim tmp as string, i as integer, intFileCount as integer, strPath as ...
    (microsoft.public.access.forms)