func ExampleFpdf_PageSize() {
	pdf := gofpdf.NewCustom(&gofpdf.InitType{
		UnitStr:    "in",
		Size:       gofpdf.SizeType{Wd: 6, Ht: 6},
		FontDirStr: example.FontDir(),
	})
	pdf.SetMargins(0.5, 1, 0.5)
	pdf.SetFont("Times", "", 14)
	pdf.AddPageFormat("L", gofpdf.SizeType{Wd: 3, Ht: 12})
	pdf.SetXY(0.5, 1.5)
	pdf.CellFormat(11, 0.2, "12 in x 3 in", "", 0, "C", false, 0, "")
	pdf.AddPage() // Default size established in NewCustom()
	pdf.SetXY(0.5, 3)
	pdf.CellFormat(5, 0.2, "6 in x 6 in", "", 0, "C", false, 0, "")
	pdf.AddPageFormat("P", gofpdf.SizeType{Wd: 3, Ht: 12})
	pdf.SetXY(0.5, 6)
	pdf.CellFormat(2, 0.2, "3 in x 12 in", "", 0, "C", false, 0, "")
	for j := 0; j <= 3; j++ {
		wd, ht, u := pdf.PageSize(j)
		fmt.Printf("%d: %6.2f %s, %6.2f %s\n", j, wd, u, ht, u)
	}
	fileStr := example.Filename("Fpdf_PageSize")
	err := pdf.OutputFileAndClose(fileStr)
	example.Summary(err, fileStr)
	// Output:
	// 0:   6.00 in,   6.00 in
	// 1:  12.00 in,   3.00 in
	// 2:   6.00 in,   6.00 in
	// 3:   3.00 in,  12.00 in
	// Successfully generated pdf/Fpdf_PageSize.pdf
}
// ExampleFpdf_PageSize generates a PDF document with various page sizes.
ExampleFpdf_PageSize generates a PDF document with various page sizes.
// ExampleFpdf_PageSize generates a PDF document with various page sizes .
func ExampleFpdf_PageSize() {
	pdf := gofpdf.NewCustom(&gofpdf.InitType{
		UnitStr:    "in",
		Size:       gofpdf.SizeType{Wd: 6, Ht: 6},
		FontDirStr: example.FontDir(),
	})
	pdf.SetMargins(0.5, 1, 0.5)
	pdf.SetFont("Times", "", 14)
	pdf.AddPageFormat("L", gofpdf.SizeType{Wd: 3, Ht: 12})
	pdf.SetXY(0.5, 1.5)
	pdf.CellFormat(11, 0.2, "12 in x 3 in", "", 0, "C", false, 0, "")
	pdf.AddPage() 
	pdf.SetXY(0.5, 3)
	pdf.CellFormat(5, 0.2, "6 in x 6 in", "", 0, "C", false, 0, "")
	pdf.AddPageFormat("P", gofpdf.SizeType{Wd: 3, Ht: 12})
	pdf.SetXY(0.5, 6)
	pdf.CellFormat(2, 0.2, "3 in x 12 in", "", 0, "C", false, 0, "")
	for j := 0; j <= 3; j++ {
		wd, ht, u := pdf.PageSize(j)
		fmt.Printf("%d: %6.2f %s, %6.2f %s\n", j, wd, u, ht, u)
	}
	fileStr := example.Filename("Fpdf_PageSize")
	err := pdf.OutputFileAndClose(fileStr)
	example.Summary(err, fileStr)
}
func ExampleFpdf_PageSize ( ) { pdf := gofpdf . NewCustom ( & gofpdf . InitType { UnitStr : " " , Size : gofpdf . SizeType { Wd : 6 , Ht : 6 } , FontDirStr : example . FontDir ( ) , } ) pdf . SetMargins ( 0.5 , 1 , 0.5 ) pdf . SetFont ( " " , " " , 14 ) pdf . AddPageFormat ( " " , gofpdf . SizeType { Wd : 3 , Ht : 12 } ) pdf . SetXY ( 0.5 , 1.5 ) pdf . CellFormat ( 11 , 0.2 , " " , " " , 0 , " " , false , 0 , " " ) pdf . AddPage ( ) pdf . SetXY ( 0.5 , 3 ) pdf . CellFormat ( 5 , 0.2 , " " , " " , 0 , " " , false , 0 , " " ) pdf . AddPageFormat ( " " , gofpdf . SizeType { Wd : 3 , Ht : 12 } ) pdf . SetXY ( 0.5 , 6 ) pdf . CellFormat ( 2 , 0.2 , " " , " " , 0 , " " , false , 0 , " " ) for j := 0 ; j <= 3 ; j ++ { wd , ht , u := pdf . PageSize ( j ) fmt . Printf ( " \n " , j , wd , u , ht , u ) } fileStr := example . Filename ( " " ) err := pdf . OutputFileAndClose ( fileStr ) example . Summary ( err , fileStr ) }
ExampleFpdf_PageSize generates a PDF document with various page sizes.
ExampleFpdf_PageSize generates a PDF document with various page sizes .
// Default size established in NewCustom() // Output: // 0:   6.00 in,   6.00 in // 1:  12.00 in,   3.00 in // 2:   6.00 in,   6.00 in // 3:   3.00 in,  12.00 in // Successfully generated pdf/Fpdf_PageSize.pdf