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.

Examples

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

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);

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

auto saveOptions = MakeObject<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(ArtifactsDir + u"PclSaveOptions.AddPrinterFont.pcl", saveOptions);

See Also