PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with fonts embedding

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
Jabberwok



Joined: 28 May 2008
Posts: 2

PostPosted: Wed May 28, 2008 4:17 pm    Post subject: Problem with fonts embedding Reply with quote

I have PDF file, i tried to append some text to it using program from samples. (Unicode) After it worked there are errors in document (fonts are embedded with errors, and there are only dots instead of text)

Here are steps to reproduce:
1) Get this file http://www.uploading.com/files/KTG63HP6/form2.pdf.html
2) Open Unicode program from Samples C# folder (or use code below)
3) Change lines so that:
// Create new document
PdfDocument document = PdfReader.Open(@"c:\form2.pdf");
(here comes your path to file)
4) scroll down till you see pages that were added by code and see the result (and acrobat's error)

Code to test:

class Program
{
[STAThread]
static void Main(string[] args)
{
// Create new document
PdfDocument document = PdfReader.Open(@"c:\form2.pdf");

// Set unicode flag to true
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode,PdfFontEmbedding.Always);

XFont font = new XFont("Times New Roman", 12, XFontStyle.Regular, options);

// Draw text in different languages
for (int idx = 0; idx < texts.Length; idx++)
{
PdfPage page = document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page);
XTextFormatter tf = new XTextFormatter(gfx);
tf.Alignment = XParagraphAlignment.Justify;

tf.DrawString(texts[idx], font, XBrushes.Black,
new XRect(100, 100, page.Width - 200, 600), XStringFormat.TopLeft);
}

string filename = "Unicode.pdf";
// Save the document...
document.Save(filename);
// ...and start a viewer.
Process.Start(filename);
}

static string[] texts = new string[]
{
// International version of the text in English
"English\n" +
"PDFsharp is a .NET library for creating and processing PDF documents 'on the fly'. " +
"The library is completely written in C# and based exclusively on safe, managed code. ",

// PDFsharp is 'Made in Germany'
"German\n" +
"PDFsharp ist eine .NET-Bibliothek zum Erzeugen und Verarbeiten von PDF-Dokumenten 'On the Fly'. " +
"Die Bibliothek ist vollständig in C# geschrieben und basiert ausschließlich auf sicherem, verwaltetem Code. ",

// Greek version
// The text was translated by Babel Fish. We here in Germany have no idea what it means.
// If you are a native speaker please correct it and mail it to mailto:PDFsharpSupport@pdfsharp.de
"Greek (Translated with Babel Fish)\n" +
"Το PDFsharp είναι βιβλιοθήκη δικτύου α. για τη δημιουργία και την επεξεργασία των εγγράφων PDF 'σχετικά με τη μύγα'. Η βιβλιοθήκη γράφεται εντελώς γ # και βασίζεται αποκλειστικά εκτός από, διοικούμενος κώδικας. Το PDFsharp προσφέρει δύο ισχυρά επίπεδα αφαίρεσης για να δημιουργήσει και να επεξεργαστεί",

// Russian version (by courtesy of Alexey Kuznetsov)
"Russia\n" +
"PDFsharp это .NET библиотека для создания и обработки PDF документов 'налету'. " +
"Библиотека полностью написана на языке C# и базируется исключительно на безопасном, управляемом коде. " +
"PDFsharp использует два мощных абстрактных уровня для создания и обработки PDF документов.\n" +
"Для рисования текста, графики, и изображений в ней используется набор классов, которые разработаны аналогично с",

// Your language may come here
"Invitation\n" +
"If you use PDFsharp and haven't found your native language in this document, we will be pleased to get your translation of the text above and include it here.\n" +
"Mail to PDFsharpSupport@pdfsharp.de"
};
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Wed Jun 04, 2008 8:22 am    Post subject: Reply with quote

We cannot replicate this problem with current builds of PDFsharp.

A new version of PDFsharp will be publicly available during summer 2008.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Jabberwok



Joined: 28 May 2008
Posts: 2

PostPosted: Mon Jun 16, 2008 9:29 pm    Post subject: Reply with quote

Strange, I could reproduce it on different computers. Still thank you very much for your reply, I will be waiting for new version!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com