public void SetPrinterFont()
        {
            //ExStart
            //ExFor:PclSaveOptions.AddPrinterFont(string, string)
            //ExFor:PclSaveOptions.FallbackFontName
            //ExSummary:Shows how to add information about font that is uploaded to the printer and set the font that will be used if no expected font is found in printer and built-in fonts collections.
            Document doc = new Document(MyDir + "Document.EpubConversion.doc");

            PclSaveOptions saveOptions = new PclSaveOptions();

            saveOptions.AddPrinterFont("Courier", "Courier");
            saveOptions.FallbackFontName = "Times New Roman";

            doc.Save(ArtifactsDir + "Document.EpubConversion.pcl", saveOptions);
            //ExEnd
        }
Example #2
0
        public void AddPrinterFont()
        {
            //ExStart
            //ExFor:PclSaveOptions.AddPrinterFont(string, string)
            //ExSummary:Shows how to get a printer to substitute all instances of a specific font with a different font.
            Document        doc     = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            builder.Font.Name = "Courier";
            builder.Write("Hello world!");

            PclSaveOptions saveOptions = new PclSaveOptions();

            saveOptions.AddPrinterFont("Courier New", "Courier");

            // When printing this document, the printer will use the "Courier New" font
            // to access places where our document used the "Courier" font.
            doc.Save(ArtifactsDir + "PclSaveOptions.AddPrinterFont.pcl", saveOptions);
            //ExEnd
        }