|
PDFsharp - moved to http://forum.pdfsharp.net/ Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
|
Important Notice:
We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024.
If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
View previous topic :: View next topic |
Author |
Message |
lenabac
Joined: 02 Nov 2007 Posts: 9 Location: Montreal Canada
|
Posted: Thu Jun 19, 2008 1:13 pm Post subject: embeded fonts |
|
|
I used to text example to create my pages.
Works beautifully but now the printer wants a sequential number with an embedded font.
Below is the standard code I used
Code: |
font = new XFont("OCR B", 8, XFontStyle.Bold);
string aline = String.Format("{0:00000}", PKnt) + "\n";
rect = new XRect(newx, 150, 240, 8);// pixels
gfx.DrawRectangle(XBrushes.Transparent, rect);
//
tf.DrawString(aline, font, XBrushes.Black, rect, XStringFormat.TopLeft);
|
But the OCR B needs to be "embedded"
I could not find anything on "embedded fonts" that I could understand.
Note I have only worked with pdf's using your soft wear so I don't really know pdfs |
|
Back to top |
|
|
lenabac
Joined: 02 Nov 2007 Posts: 9 Location: Montreal Canada
|
Posted: Tue Jun 24, 2008 7:03 pm Post subject: |
|
|
Ok so after much trial & error and searching the forum this works
Putting a special sequential number on the page
Code: |
XPdfFontOptions optFont = new XPdfFontOptions(true);
font = new XFont("ocrb10", 8, XFontStyle.Regular,optFont);
string aline = String.Format("{0:00000}", PKnt) + "\n";
rect = new XRect(newx, 150, 240, 8);// pixels
gfx.DrawRectangle(XBrushes.Transparent, rect);
//
tf.DrawString(aline, font, XBrushes.Black, rect, XStringFormat.TopLeft);
|
|
|
Back to top |
|
|
lenabac
Joined: 02 Nov 2007 Posts: 9 Location: Montreal Canada
|
Posted: Wed Jun 25, 2008 2:52 pm Post subject: |
|
|
Ok so the above works on my local host but not on the server.
I had the font installed on the server also and it shows up on the web page label but it doesn't show up in the pdf document. The pdf is created in a class inside the project.
Is there something else that needs to be done different up on the server? Any ideas from anyone?
Lena |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|