Skip to content

Emoji doesn't render correctly in PDF #29

Description

@moataseem

If you think there is a bug in MigraDoc then please use the IssueSubmissionTemplate to make the issue replicable.
http://www.pdfsharp.net/wiki/IssueSubmissions.ashx

Thanks.

Resources

The official project web site:
http://pdfsharp.net/

The official peer-to-peer support forum:
http://forum.pdfsharp.net/

Reporting an Issue Here

I'm unable to get the Emoji to appear in a pdf

Expected Behavior

to have such an icons to appear in the generated pdf as follow
👀 😀 💨 ♡

Actual Behavior

�� �� �� ♡

Steps to Reproduce the Behavior

`

         // Create a new MigraDoc document
        Document document = new Document();
        //document.UseCmykColor = true;

        // Add a section to the document
        Section section = document.AddSection();

        // Add a paragraph to the section
        Paragraph paragraph = section.AddParagraph();

        paragraph.Format.Font.Color = Color.FromCmyk(100, 30, 20, 50);

        // Add some text to the paragraph
        paragraph.AddFormattedText("Hello, World!", TextFormat.Bold);
        paragraph.AddFormattedText("👀 😀 💨 ♡", new Font("Segoe UI Emoji"));

        // Create a renderer for the MigraDoc document.
        PdfDocumentRenderer pdfRenderer = new PdfDocumentRenderer(true);

        // Associate the MigraDoc document with a renderer
        pdfRenderer.Document = document;

        // Layout and render document to PDF
        pdfRenderer.RenderDocument();

        // Save the document...
        const string filename = "HelloWorld.pdf";
        pdfRenderer.PdfDocument.Save(filename);
        // ...and start a viewer.
        Process.Start(filename);

`
IssueSubmission.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions