HeaderArtifact
Panoramica
HeaderArtifact è una classe in Aspose.PDF FOSS per .NET. Eredita da: Artifact.
Rappresenta un artefatto header — un’intestazione a livello di pagina contrassegnata Artifact /Subtype /Header (PDF 32000 §14.8.2.2).
Questa classe fornisce 15 metodi per lavorare con oggetti HeaderArtifact nei programmi .NET. I metodi disponibili includono: Artifact, BeginUpdates, Dispose, GetValue, HeaderArtifact, RemoveValue, SaveUpdates, SetImage, SetLinesAndState, SetPageNumberReplacementString, SetPdfPage, SetText e 2 metodi aggiuntivi. Tutti i membri pubblici sono accessibili a qualsiasi applicazione .NET dopo aver installato il pacchetto Aspose.PDF FOSS per .NET. Proprietà: ArtifactHorizontalAlignment, ArtifactVerticalAlignment, BackgroundColor, BottomMargin, Contents, CustomSubtype e altre 18.
Proprietà
| Nome | Tipo | Accesso | Descrizione |
|---|---|---|---|
Type | ArtifactType | Lettura/Scrittura | La classificazione del tipo dell’artefatto. |
Subtype | ArtifactSubtype | Lettura/Scrittura | Il sottotipo dell’artefatto. |
CustomType | string? | Lettura/Scrittura | Nome del tipo di artefatto non standard. |
CustomSubtype | string? | Lettura/Scrittura | Nome del sottotipo di artefatto non standard. |
Text | string? | Lettura/Scrittura | Contenuto testuale estratto dagli operatori del flusso di contenuto dell’artefatto. |
Rectangle | Rectangle? | Lettura | Rettangolo di delimitazione dall’entrata /BBox nel dizionario delle proprietà. |
Opacity | double | Lettura/Scrittura | Opacità dell’artefatto (da ExtGState /ca). |
Page | Page? | Lettura | La pagina a cui appartiene questo artefatto. |
ArtifactHorizontalAlignment | HorizontalAlignment | Lettura/Scrittura | Allineamento orizzontale (da /Attached entry). |
ArtifactVerticalAlignment | VerticalAlignment | Lettura/Scrittura | Allineamento verticale (da /Attached entry). |
IsBackground | bool | Lettura/Scrittura | Se questo è un artefatto di sfondo. |
Rotation | double | Lettura/Scrittura | Angolo di rotazione in gradi. |
BackgroundColor | Color? | Lettura/Scrittura | Colore di sfondo. |
RightMargin | double | Lettura/Scrittura | Margine destro. |
LeftMargin | double | Lettura/Scrittura | Margine sinistro. |
TopMargin | double | Lettura/Scrittura | Margine superiore. |
BottomMargin | double | Lettura/Scrittura | Margine inferiore. |
Position | Point? | Lettura/Scrittura | Coordinate di posizionamento esplicite. |
FormattedText | FormattedText? | Lettura/Scrittura | Testo formattato per l’artefatto. |
TextState | TextState? | Lettura/Scrittura | Stato del testo per il testo dell’artefatto. |
Lines | List<string> | Lettura | Contenuto di testo multilinea. |
Contents | List<Operator> | Lettura | Operatori interni di flusso di contenuto che disegnano l’artefatto. |
Form | XForm? | Lettura | L’Form XObject che supporta questo artefatto quando viene renderizzato come modulo riutilizzabile (ad es. |
Image | XImage? | Lettura | L’Image XObject che supporta questo artefatto quando il suo contenuto è un’immagine raster. |
Metodi
| Firma | Descrizione |
|---|---|
HeaderArtifact() | Crea un artefatto di intestazione vuoto (Paginazione / Intestazione). |
HeaderArtifact(text: string) | Crea un artefatto header contenente il testo fornito. |
Artifact() | Costruttore predefinito — crea un artefatto con tipo e sottotipo Undefined. |
SetPageNumberReplacementString(value: string) | Imposta il token di sostituzione del numero di pagina usato in Text. |
SetLinesAndState(text: string[], textState: TextState) | Imposta il contenuto di testo multilinea con lo stato di testo fornito. |
BeginUpdates() | Inizia un aggiornamento di proprietà in batch. |
SaveUpdates() | Esegui il flush di un aggiornamento batch avviato da BeginUpdates. |
Dispose() | Rilascia le risorse detenute dall’artifact. |
GetValue(name: string) | Leggi una coppia nome/valore personalizzata impostata tramite SetValue(string, string). |
SetValue(name: string, value: string) | Memorizza una coppia nome/valore personalizzata sull’artifact (per l’accesso ai metadati a valle; non emessa nel PDF in questa build). |
RemoveValue(name: string) | Rimuovi una coppia nome/valore personalizzata precedentemente impostata tramite SetValue. |
SetImage(imageStream: Stream) | Allega un’immagine raster all’artefatto. |
SetText(formattedText: FormattedText) | Imposta il testo dell’artefatto da un’istanza FormattedText. |
SetTextAndState(text: string, textState: TextState) | Imposta Text e TextState insieme. |
SetPdfPage(page: Page) | Associa questo artefatto a una pagina specifica. |