func ExampleFpdf_CellFormat_codepage() {
	pdf := gofpdf.New("P", "mm", "A4", example.FontDir()) // A4 210.0 x 297.0
	// See documentation for details on how to generate fonts
	pdf.AddFont("Helvetica-1251", "", "helvetica_1251.json")
	pdf.AddFont("Helvetica-1253", "", "helvetica_1253.json")
	fontSize := 16.0
	pdf.SetFont("Helvetica", "", fontSize)
	ht := pdf.PointConvert(fontSize)
	tr := pdf.UnicodeTranslatorFromDescriptor("") // "" defaults to "cp1252"
	write := func(str string) {
		// pdf.CellFormat(190, ht, tr(str), "", 1, "C", false, 0, "")
		pdf.MultiCell(190, ht, tr(str), "", "C", false)
		pdf.Ln(ht)
	}
	pdf.AddPage()
	str := `Gofpdf provides a translator that will convert any UTF-8 code point ` +
		`that is present in the specified code page.`
	pdf.MultiCell(190, ht, str, "", "L", false)
	pdf.Ln(2 * ht)
	write("Voix ambiguë d'un cœur qui au zéphyr préfère les jattes de kiwi.")
	write("Falsches Üben von Xylophonmusik quält jeden größeren Zwerg.")
	write("Heizölrückstoßabdämpfung")
	write("Forårsjævndøgn / Efterårsjævndøgn")
	write("À noite, vovô Kowalsky vê o ímã cair no pé do pingüim queixoso e vovó" +
		"põe açúcar no chá de tâmaras do jabuti feliz.")
	pdf.SetFont("Helvetica-1251", "", fontSize) // Name matches one specified in AddFont()
	tr = pdf.UnicodeTranslatorFromDescriptor("cp1251")
	write("Съешь же ещё этих мягких французских булок, да выпей чаю.")

	pdf.SetFont("Helvetica-1253", "", fontSize)
	tr = pdf.UnicodeTranslatorFromDescriptor("cp1253")
	write("Θέλει αρετή και τόλμη η ελευθερία. (Ανδρέας Κάλβος)")

	fileStr := example.Filename("Fpdf_CellFormat_codepage")
	err := pdf.OutputFileAndClose(fileStr)
	example.Summary(err, fileStr)
	// Output:
	// Successfully generated pdf/Fpdf_CellFormat_codepage.pdf
}
// ExampleFpdf_CellFormat_codepage demonstrates the automatic conversion of UTF-8 strings to an
// 8-bit font encoding.
ExampleFpdf_CellFormat_codepage demonstrates the automatic conversion of UTF-8 strings to an
8-bit font encoding.
// ExampleFpdf_CellFormat_codepage demonstrates the automatic conversion of UTF - 8 strings to an // 8 - bit font encoding .
func ExampleFpdf_CellFormat_codepage() {
	pdf := gofpdf.New("P", "mm", "A4", example.FontDir()) 
	pdf.AddFont("Helvetica-1251", "", "helvetica_1251.json")
	pdf.AddFont("Helvetica-1253", "", "helvetica_1253.json")
	fontSize := 16.0
	pdf.SetFont("Helvetica", "", fontSize)
	ht := pdf.PointConvert(fontSize)
	tr := pdf.UnicodeTranslatorFromDescriptor("") 
	write := func(str string) {
		pdf.MultiCell(190, ht, tr(str), "", "C", false)
		pdf.Ln(ht)
	}
	pdf.AddPage()
	str := `Gofpdf provides a translator that will convert any UTF-8 code point ` +
		`that is present in the specified code page.`
	pdf.MultiCell(190, ht, str, "", "L", false)
	pdf.Ln(2 * ht)
	write("Voix ambiguë d'un cœur qui au zéphyr préfère les jattes de kiwi.")
	write("Falsches Üben von Xylophonmusik quält jeden größeren Zwerg.")
	write("Heizölrückstoßabdämpfung")
	write("Forårsjævndøgn / Efterårsjævndøgn")
	write("À noite, vovô Kowalsky vê o ímã cair no pé do pingüim queixoso e vovó" +
		"põe açúcar no chá de tâmaras do jabuti feliz.")
	pdf.SetFont("Helvetica-1251", "", fontSize) 
	tr = pdf.UnicodeTranslatorFromDescriptor("cp1251")
	write("Съешь же ещё этих мягких французских булок, да выпей чаю.")
	pdf.SetFont("Helvetica-1253", "", fontSize)
	tr = pdf.UnicodeTranslatorFromDescriptor("cp1253")
	write("Θέλει αρετή και τόλμη η ελευθερία. (Ανδρέας Κάλβος)")
	fileStr := example.Filename("Fpdf_CellFormat_codepage")
	err := pdf.OutputFileAndClose(fileStr)
	example.Summary(err, fileStr)
}
func ExampleFpdf_CellFormat_codepage ( ) { pdf := gofpdf . New ( " " , " " , " " , example . FontDir ( ) ) pdf . AddFont ( " " , " " , " " ) pdf . AddFont ( " " , " " , " " ) fontSize := 16.0 pdf . SetFont ( " " , " " , fontSize ) ht := pdf . PointConvert ( fontSize ) tr := pdf . UnicodeTranslatorFromDescriptor ( " " ) write := func ( str string ) { pdf . MultiCell ( 190 , ht , tr ( str ) , " " , " " , false ) pdf . Ln ( ht ) } pdf . AddPage ( ) str := `Gofpdf provides a translator that will convert any UTF-8 code point ` + `that is present in the specified code page.` pdf . MultiCell ( 190 , ht , str , " " , " " , false ) pdf . Ln ( 2 * ht ) write ( " write ( " write ( " write ( " write ( " " pdf . SetFont ( " " , " " , fontSize ) tr = pdf . UnicodeTranslatorFromDescriptor ( " " ) write ( " pdf . SetFont ( " " , " " , fontSize ) tr = pdf . UnicodeTranslatorFromDescriptor ( " " ) write ( " fileStr := example . Filename ( " " ) err := pdf . OutputFileAndClose ( fileStr ) example . Summary ( err , fileStr ) }
ExampleFpdf_CellFormat_codepage demonstrates the automatic conversion of UTF-8 strings to an
8-bit font encoding.
ExampleFpdf_CellFormat_codepage demonstrates the automatic conversion of UTF - 8 strings to an 8 - bit font encoding .
// A4 210.0 x 297.0 // See documentation for details on how to generate fonts // "" defaults to "cp1252" // pdf.CellFormat(190, ht, tr(str), "", 1, "C", false, 0, "") // Name matches one specified in AddFont() // Output: // Successfully generated pdf/Fpdf_CellFormat_codepage.pdf