Tech Off Thread

10 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Embedding fonts in PDF

Back to Forum: Tech Off
  • User profile image
    JParrish

    Thought one of you niners may have run into this problem. I am creating PDF files server side that are streamed back to the client. On one particular file I use a true type font for bar code generation. I realized that this font needed to be embedded so that a client without the font installed could render the barcode.

    I am using PDFSharp to generate the file, and managed to get the font embedded. I verified that the font is embedded by looking at the document properties and seeing that the font is type truetype (embedded). The bar code is not showing up. Instead it looks like it is possibly being substitutted. The encoding type is Ansi. Anyone know how I can verify that the font is embedded properly?

    Any suggestions on why I might be seeing this behaviour? Could it have to do with the Ansi encoding? Thanks

  • User profile image
    Red5

    I am not familiar with PDFSharp in terms of it capabilities and nuances, but I do use DataDynamics ActiveReports and iTextSharp (free) both to embed a TT Font that is of a barcode type (Free3of9.ttf).
    This font renders fine as a scannable barcode in my apps.

    Maybe post some code you are using with PDFSharp.  Someone here has to have done this before.

  • User profile image
    B.J

    Did you ever find out what happened?  I have a very similar situation, except if the pdf is produced on one machine, it works fine, but on another, your symptoms appear.  The "properties", if inspected using Acrobat, are the same.  

     

    Ideas?

     

    TIA

  • User profile image
    figuerres

    B.J said:

    Did you ever find out what happened?  I have a very similar situation, except if the pdf is produced on one machine, it works fine, but on another, your symptoms appear.  The "properties", if inspected using Acrobat, are the same.  

     

    Ideas?

     

    TIA

    Hey can you tell me something, I see you are posting to a thread from about 2 years ago... do you think the orignal posters are still even looking at this thread?  also how did you get to it? from a google search ?

    I am not trying to scare you off or not to ask your question.

    I am just trying to better understand why and how we get this as we (regualr posters here) have seen this a number of times and are amazed at seeing 2,3 and 4 year old topics come up like this...

    I have asked the developers of Channel9 to make old threads locked and have a post like this start a "related discussion" so that you would be able to refer to the old topic but start your own new thread, what do you think of that idea ? would that be "ok" in your opinion?

    sometimes the folks who bring up old stuff are just asking a question and thats fine.

    but some times they are spam or ar trying to pick a "fight" on-line or other bad behavior.

    so when the new stuff is not good for the site I'd like to be able to mark it as the thing to be locked/ banned etc...

    without the need to lock an old thread that was just fine if it were left alone w/o the troll or spam at the end.

    comments ? ideas ?

  • User profile image
    sona123

    hello buddy i read your comment dear i am also confuge i can't help you sorry

    Anybody know where the World of Warcraft European servers are located? Someone said they are all in Britain but I am not sure.  Would they have some in Germany, some in Finland etc?

    I am trying to do a business plan for my own massive multiplayer game and was wonder how they spread out the resources.

    ============================

    Brock Lesner

    ======================


    WoW Europe Gold
  • User profile image
    B.J

    figuerres said:
    B.J said:
    *snip*

    Hey can you tell me something, I see you are posting to a thread from about 2 years ago... do you think the orignal posters are still even looking at this thread?  also how did you get to it? from a google search ?

    I am not trying to scare you off or not to ask your question.

    I am just trying to better understand why and how we get this as we (regualr posters here) have seen this a number of times and are amazed at seeing 2,3 and 4 year old topics come up like this...

    I have asked the developers of Channel9 to make old threads locked and have a post like this start a "related discussion" so that you would be able to refer to the old topic but start your own new thread, what do you think of that idea ? would that be "ok" in your opinion?

    sometimes the folks who bring up old stuff are just asking a question and thats fine.

    but some times they are spam or ar trying to pick a "fight" on-line or other bad behavior.

    so when the new stuff is not good for the site I'd like to be able to mark it as the thing to be locked/ banned etc...

    without the need to lock an old thread that was just fine if it were left alone w/o the troll or spam at the end.

    comments ? ideas ?

    Thanks for asking so politely, figuerres.  I think I understand your points.

    In my case, I have a particular question/problem... I've searched (i.e. google) for a solution.  This post is one of the only references to something similiar that popped.  I know it is old, and it is *very* unlikely that the original poster is actually still monitoring the thread.  That said, because the forum allows me to post a response, I did in the hope that anyone might be willing to shed some light.  I invested a couple of minutes in the hope that someone might be able to point me in the right direction on an issue that is kicking me in the teeth right now.

    That said, I certainly don't consider myself much of a community member here or anything, and if I wasn't able to post a response, I would have just moved on.  Is that good or bad?  That's up to the community, I suppose.

    Hope that is the kind of feedback you were looking for.  I am sorry if my request caused any kind of issue/annoyance for the community.

    B.J.

  • User profile image
    figuerres

    B.J said:
    figuerres said:
    *snip*

    Thanks for asking so politely, figuerres.  I think I understand your points.

    In my case, I have a particular question/problem... I've searched (i.e. google) for a solution.  This post is one of the only references to something similiar that popped.  I know it is old, and it is *very* unlikely that the original poster is actually still monitoring the thread.  That said, because the forum allows me to post a response, I did in the hope that anyone might be willing to shed some light.  I invested a couple of minutes in the hope that someone might be able to point me in the right direction on an issue that is kicking me in the teeth right now.

    That said, I certainly don't consider myself much of a community member here or anything, and if I wasn't able to post a response, I would have just moved on.  Is that good or bad?  That's up to the community, I suppose.

    Hope that is the kind of feedback you were looking for.  I am sorry if my request caused any kind of issue/annoyance for the community.

    B.J.

    THANK YOU!  Smiley

    that is exactly the kind of thing i wnated to hear more about.
    for sure I think I can say that we *DO NOT* want to scare off new folks Smiley

    but we have seen a number of what i will call "drive by" posts that seem to only have been done to spam or troll.

    about your remark on posting:

    what if the system allowed you to make a post but it just made it as a new topic that had a title / opening that pointed to the old topic?

    would that work for you?


    I wish i could answer your question -- but i spend almost zero time on PDF stuff Sad

  • User profile image
    Bass

    figuerres said:
    B.J said:
    *snip*

    Hey can you tell me something, I see you are posting to a thread from about 2 years ago... do you think the orignal posters are still even looking at this thread?  also how did you get to it? from a google search ?

    I am not trying to scare you off or not to ask your question.

    I am just trying to better understand why and how we get this as we (regualr posters here) have seen this a number of times and are amazed at seeing 2,3 and 4 year old topics come up like this...

    I have asked the developers of Channel9 to make old threads locked and have a post like this start a "related discussion" so that you would be able to refer to the old topic but start your own new thread, what do you think of that idea ? would that be "ok" in your opinion?

    sometimes the folks who bring up old stuff are just asking a question and thats fine.

    but some times they are spam or ar trying to pick a "fight" on-line or other bad behavior.

    so when the new stuff is not good for the site I'd like to be able to mark it as the thing to be locked/ banned etc...

    without the need to lock an old thread that was just fine if it were left alone w/o the troll or spam at the end.

    comments ? ideas ?

    Maybe you can rasterize the font or something. Maybe? Maybe?

  • User profile image
    JParrish

    Bass said:
    figuerres said:
    *snip*

    Maybe you can rasterize the font or something. Maybe? Maybe?

    Strangely enough in immersing myself in some of the upcoming .NET 4 technologies I found myself coming back to channel 9 a lot, as it is a very good community that I shouldn't neglect as much as I do. So .. the original poster in this case saw the 2 year old thread! =)

    I never did find an answer as to why the embedded true type font didn't work correctly (it did on some systems, didn't on others, and I never found the discrepency)  Instead I switched to a built-in barcode rendering capability of PDFSharp which doesn't even rely on a font.

    Take care.

  • User profile image
    jaredhite1

    JParrish said:
    Bass said:
    *snip*

    Strangely enough in immersing myself in some of the upcoming .NET 4 technologies I found myself coming back to channel 9 a lot, as it is a very good community that I shouldn't neglect as much as I do. So .. the original poster in this case saw the 2 year old thread! =)

    I never did find an answer as to why the embedded true type font didn't work correctly (it did on some systems, didn't on others, and I never found the discrepency)  Instead I switched to a built-in barcode rendering capability of PDFSharp which doesn't even rely on a font.

    Take care.

    Since this is the only thread on the internet that addresses this problem and the #1 google search result for the things I was searching for, I thought I'd once again resurrect it and mention I've had this exact problem twice now...Once when I first deployed my solution to QA, and again when I deployed my solution to production.  Both times the solution was to install the fonts on the server, give the IIS user write access to the folder I was storing my .ttf fonts in, and restart the server.  I'm not sure which of these three steps actually fixed the problem, it's possible you don't have to do either of the first two steps.  I definitely needed to restart the server though. Neither server has ever had a repeat of the same problem.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.