PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Mar 29, 2024 12:03 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: embeded fonts
PostPosted: Thu Jun 19, 2008 1:13 pm 
Offline

Joined: Fri Nov 02, 2007 7:16 pm
Posts: 9
Location: Montreal Canada
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jun 24, 2008 7:03 pm 
Offline

Joined: Fri Nov 02, 2007 7:16 pm
Posts: 9
Location: Montreal Canada
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);



Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jun 25, 2008 2:52 pm 
Offline

Joined: Fri Nov 02, 2007 7:16 pm
Posts: 9
Location: Montreal Canada
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 146 guests


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 post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group