PageHeight
Contenuti
[
Nascondere
]PageSetup.PageHeight property
Restituisce o imposta l’altezza della pagina in punti.
public double PageHeight { get; set; }
Esempi
Mostra come inserire un’immagine e utilizzarla come filigrana.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Inserisci l'immagine nell'intestazione in modo che sia visibile su ogni pagina.
builder.MoveToHeaderFooter(HeaderFooterType.HeaderPrimary);
Shape shape = builder.InsertImage(ImageDir + "Transparent background logo.png");
shape.WrapType = WrapType.None;
shape.BehindText = true;
// Posiziona l'immagine al centro della pagina.
shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
shape.RelativeVerticalPosition = RelativeVerticalPosition.Page;
shape.Left = (builder.PageSetup.PageWidth - shape.Width) / 2;
shape.Top = (builder.PageSetup.PageHeight - shape.Height) / 2;
doc.Save(ArtifactsDir + "DocumentBuilder.InsertWatermark.docx");
Guarda anche
- class PageSetup
- spazio dei nomi Aspose.Words
- assemblea Aspose.Words