I tried using the Identity_H encoding before (having read somewhere that 
this should always work), but I got an error doing that

ExceptionConverter: java.io.UnsupportedEncodingException: Identity-H
    at java.lang.StringCoding.encode(StringCoding.java:269)
    at java.lang.String.getBytes(String.java:947)
    at 
com.lowagie.text.pdf.PdfEncodings.convertToBytes(PdfEncodings.java:197)
    at com.lowagie.text.pdf.Type1Font.<init>(Type1Font.java:278)

Anyway, I tried referring to the original .afm file instead of the 
installed .pfm, and that seems to solve the issue somehow. So my problem 
is/seems solved, now I would just like to understand why/how.

best regards,
Werner

itext-questions-requ...@lists.sourceforge.net wrote:
> Send iText-questions mailing list submissions to
>       itext-questions@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.sourceforge.net/lists/listinfo/itext-questions
> or, via email, send a message with subject or body 'help' to
>       itext-questions-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
>       itext-questions-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of iText-questions digest..."
>
>
> Today's Topics:
>
>    1. Re: SVG Salamander does not support "data" URI  schemein SVG
>       images? (Mark Storer)
>    2. Re: Characters missing when using.pfm font (Mark Storer)
>    3. Re: [itextsharp]: PdfContentByte.AddImage no longer showing
>       image with update to 5.x version (mgabr...@mymts.net)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 23 Jun 2010 14:36:21 -0700
> From: "Mark Storer" <msto...@autonomy.com>
> Subject: Re: [iText-questions] SVG Salamander does not support "data"
>       URI     schemein SVG images?
> To: "Post all your questions about iText here"
>       <itext-questions@lists.sourceforge.net>
> Message-ID: <4c8af5838a329a4aa6458a439b57824e019e9...@vex2.verity.com>
> Content-Type: text/plain;     charset="us-ascii"
>
> The "spam" is just our idiot firewall jumping to incorrect conclusions.
>
> As for an SVG mailing list...
>
> http://tinyurl.com/24mqb9a
>
> It was trivially easy to find.
>
> --Mark Storer
>   Senior Software Engineer
>   Cardiff.com
>  
> import legalese.Disclaimer;
> Disclaimer<Cardiff> DisCard = null;
>  
>
>   
>> -----Original Message-----
>> From: ndkevinr2 [mailto:ndkevi...@yahoo.com]
>> Sent: Wednesday, June 23, 2010 11:27 AM
>> To: itext-questions@lists.sourceforge.net
>> Subject: Spam: Re: [iText-questions] Spam: SVG Salamander does not
>>     
> support
>   
>> "data" URI schemein SVG images?
>>
>>
>> I asked my question here, because I did not find a forum or list for
>>     
> SVG
>   
>> Salamander. Can you recommend the appropriate place for this question?
>>
>> (Spam? Come on, man.)
>>
>> --
>> View this message in context: http://itext-
>>
>>     
> general.2136553.n4.nabble.com/SVG-Salamander-does-not-support-data-URI-
>   
>> scheme-in-SVG-images-tp2265911p2266014.html
>> Sent from the iText - General mailing list archive at Nabble.com.
>>
>>
>>     
> ------------------------------------------------------------------------
> --
>   
>> ----
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> Buy the iText book: http://www.itextpdf.com/book/
>> Check the site with examples before you ask questions:
>> http://www.1t3xt.info/examples/
>> You can also search the keywords list:
>> http://1t3xt.info/tutorials/keywords/
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.829 / Virus Database: 271.1.1/2958 - Release Date:
>>     
> 06/23/10
>   
>> 04:11:00
>>     
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 23 Jun 2010 14:42:11 -0700
> From: "Mark Storer" <msto...@autonomy.com>
> Subject: Re: [iText-questions] Characters missing when using.pfm font
> To: "Post all your questions about iText here"
>       <itext-questions@lists.sourceforge.net>
> Message-ID: <4c8af5838a329a4aa6458a439b57824e019e9...@vex2.verity.com>
> Content-Type: text/plain;     charset="us-ascii"
>
> That empty string parameter in your createFont call is, I'll wager
> (yep), the desired encoding.  The default is code page 1252
> (WinAnsiEncoding, whatever you want to call it).  It's a single-byte
> encoding that was the default on MS OS's for years.
>
> If you want access to every conceivable character in a font, use
> BaseFont. IDENTITY_H.  With it, you're not even restricted to Unicode...
> though how you'd ask for a non-Unicode character using a Unicode-base
> java.lang.String is an interesting question.
>
> Anyway... use BaseFont.IDENTITY_H.
>
> --Mark Storer
>   Senior Software Engineer
>   Cardiff.com
>  
> import legalese.Disclaimer;
> Disclaimer<Cardiff> DisCard = null;
>  
>
>   
>> -----Original Message-----
>> From: Werner Aernouts [mailto:werner.aerno...@gmail.com]
>> Sent: Wednesday, June 23, 2010 2:13 PM
>> To: itext-questions@lists.sourceforge.net
>> Subject: [iText-questions] Characters missing when using.pfm font
>>
>> Dear,
>> I am construction a font from a .pfm file as it says in the book, i.e.
>>
>> font_normal_10 = new Font(
>>
>>     
> BaseFont.createFont("C:\\Windows\\Fonts\\Sun5____.pfm","",BaseFont.EMBED
> DE
>   
>> D),
>> 10 );
>>
>> When I add text using this font to the PDF, it works fine for most
>> (ASCII) characters, but when I have special characters, like the euro
>> sign (\u20AC) or eastern-european characters (\u00E7) they are missing
>> from my text.
>>
>> I have checked with Character Map, and these characters do seem to be
>> included in the font, so I guess there is something wrong with the
>> encoding of the font. I have experimented with some encodings but to
>>     
> no
>   
>> avail.
>>
>> In the same PDF I use the same characters without any problem with a
>> Verdana TTF that I included as follows
>> FontFactory.register("C:\\Windows\\Fonts\\verdana.TTF", "Verdana");
>> font_verdana_10 = FontFactory.getFont("Verdana", "winansi", true, 10,
>> Font.NORMAL);
>>
>> Anyone any suggestions?
>>
>> Best regards,
>> Werner
>>
>>
>>     
> ------------------------------------------------------------------------
> --
>   
>> ----
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> Buy the iText book: http://www.itextpdf.com/book/
>> Check the site with examples before you ask questions:
>> http://www.1t3xt.info/examples/
>> You can also search the keywords list:
>> http://1t3xt.info/tutorials/keywords/
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.829 / Virus Database: 271.1.1/2958 - Release Date:
>>     
> 06/23/10
>   
>> 04:11:00
>>     
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 23 Jun 2010 16:55:33 -0500
> From: <mgabr...@mymts.net>
> Subject: Re: [iText-questions] [itextsharp]: PdfContentByte.AddImage
>       no longer showing image with update to 5.x version
> To: <itext-questions@lists.sourceforge.net>
> Message-ID: <snt103-w629d61b0e370ecf059b60fce...@phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> Sorry, the attachment I sent previously was stripped. Resent new attachment.
>  
>
>
> From: mgabr...@mymts.net
> To: itext-questions@lists.sourceforge.net
> Subject: RE: [itextsharp]: PdfContentByte.AddImage no longer showing image 
> with update to 5.x version
> Date: Wed, 23 Jun 2010 16:04:22 -0500
>
>
>
> Hi Paulo,
>  
> I've attached a ZIP file of a complete standalone sample (including the image 
> I use, which worked with the earlier versions of iTextSharp).
>
>  
>
>   
>> You'll have to provide a complete standalone example so that the problem can 
>> be reproduced.
>>     
>  
>   
>> Paulo
>>     
>  
>
>
> From: mgabr...@mymts.net
> To: itext-questions@lists.sourceforge.net
> Subject: [itextsharp]: PdfContentByte.AddImage no longer showing image with 
> update to 5.x version
> Date: Tue, 8 Jun 2010 13:22:30 -0500
>
>
>
> Hello,
>  
> I updated my application to use the updated version of iTextSharp (5.0.1.1) 
> only to find that code that I used to insert an image at an absolute position 
> no longer shows the image. I updated to 5.0.2 as well, and still encounter 
> the same issue.
>  
> I receive no exceptions from my code nor does Acrobat report any syntax 
> issues with the generated PDF. The code adds an image (loaded from a PDF) and 
> places it at the lower-left-hand corner of the table on the TableLayout 
> event. In the handler I also draw a dashed border around the table, which 
> continues to work as expected, just my image isn't visible any longer. My 
> code is as follows:
>  
>  
> public void TableLayout(PdfPTable table, float[][] width, float[] heights, 
> int headerRows, int rowStart, PdfContentByte[] canvases)
> {
>
> float[] widths = width[0];
> PdfContentByte cb = canvases[PdfPTable.TEXTCANVAS];
> PdfGState gState = null;
> gState = new PdfGState();
> gState.FillOpacity = 1f;
> gState.StrokeOpacity = 1f;
>  
> cb.SaveState();
> cb.SetLineWidth(1f);
> cb.SetRGBColorStroke(0, 0, 0);
> cb.SetLineDash(4f, 2f, 0f);
> cb.Rectangle(widths[0], heights[heights.Length - 1], widths[widths.Length - 
> 1] - widths[0], heights[0] - heights[heights.Length - 1]);
> cb.Stroke();
>  
> PdfReader reader = new PdfReader(iconsFolderPath + "myicons.pdf");
> PdfImportedPage importedPage = writer.GetImportedPage(reader, 1);
> Image icon = Image.GetInstance(importedPage);
>  
> cb.SetGState(gState);
> icon.Alignment = Image.ALIGN_LEFT | Image.ALIGN_TOP;
> icon.SetAbsolutePosition(widths[0] - (icon.ScaledWidth / 2f), 
> heights[heights.Length - 1] - (icon.ScaledHeight / 2f) - 2f);
> cb.AddImage(icon);
>  
> cb.RestoreState();
>  
> // clean-up
> importedPage = null;
> icon = null;
> reader.Close();
> reader = null;
>
> }
>  
> Any help in correcting this would be appreciated. Thank you.
>  
> Mark 
>
>
>
> Look 'em in the eye: FREE Messenger video chat Chat Now! 
>
>
> Enter for a chance to get your town photo on Bing.ca! Submit a Photo Now!     
>                                   
> _________________________________________________________________
> Learn more ways to connect with your buddies now
> http://go.microsoft.com/?linkid=9734388
> -------------- next part --------------
> An HTML attachment was scrubbed...
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: iTextTest.zip
> Type: application/x-zip-compressed
> Size: 219972 bytes
> Desc: not available
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
>
> ------------------------------
>
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
> End of iText-questions Digest, Vol 49, Issue 90
> ***********************************************
>
>   

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to