Aspose::Words::Saving::PclSaveOptions::AddPrinterFont method

PclSaveOptions::AddPrinterFont method

Adds information about font that is uploaded to the printer by manufacturer.

void Aspose::Words::Saving::PclSaveOptions::AddPrinterFont(const System::String & fontFullName, const System::String & fontPclName)
ParameterTypeDescription
fontFullNameconst System::String &Full name of the font (e.g. “Times New Roman Bold Italic”).
fontPclNameconst System::String &Name of the font that is used in Pcl document.

Remarks

There are 52 fonts that are to be built in any printer according to Pcl specification. However manufactures can add some other fonts to their devices.

Examples

Shows how to get a printer to substitute all instances of a specific font with a different font.

auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

builder->get_Font()->set_Name(u"Courier");
builder->Write(u"Hello world!");

auto saveOptions = System::MakeObject<Aspose::Words::Saving::PclSaveOptions>();
saveOptions->AddPrinterFont(u"Courier New", u"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(get_ArtifactsDir() + u"PclSaveOptions.AddPrinterFont.pcl", saveOptions);

See Also