UnlockKey | niente da chiamare nel codice |
NewDocument | TsgcPDFDocument.Create, poi AddPage (un nuovo documento non ha pagine finché non ne aggiungi una) |
NewPage, SetPageDimensions, SetPageSize | TsgcPDFDocument.AddPage(AWidth, AHeight): TsgcPDFPage, InsertPage(AIndex, AWidth, AHeight) |
LoadFromFile, LoadFromString | TsgcPDFDocument.LoadFromFile, LoadFromStream, LoadFromBytes |
LoadFromFile con una password | TsgcPDFDocument.SetPassword(APassword) prima di LoadFromFile |
SaveToFile, SaveToString | TsgcPDFDocument.SaveToFile, SaveToStream, SaveIncremental |
PageCount | TsgcPDFDocument.PageCount; solo per un file, sgcPDFGetPageCount(AFileName) |
SelectPage | TsgcPDFDocument.Pages[AIndex] (base 0, proprietà predefinita), GetPage(AIndex) |
SetInformation | TsgcPDFDocument.Info.Title, .Author, .Subject, .Keywords, .Creator, .Producer |
AddStandardFont + SelectFont + SetTextSize + DrawText | TsgcPDFPage.DrawText(AText, X, Y, AFont, AFontSize) con un TsgcPDFStandardFont (sfHelvetica, sfTimesRoman, sfCourier e le loro varianti grassetto e corsivo) |
SetTextColor + DrawText | TsgcPDFPage.DrawTextColor(AText, X, Y, AFont, AFontSize, R, G, B) (componenti da 0 a 1) |
AddTrueTypeFont + DrawText | TsgcPDFDocument.AddTrueTypeFont(AFontName, ABold, AItalic): Integer (oppure AddTrueTypeFontFromFile), poi TsgcPDFPage.DrawTextTT |
DrawLine, DrawBox | TsgcPDFPage.DrawLine(X1, Y1, X2, Y2, ALineWidth), DrawRectangle(X, Y, W, H, ALineWidth), DrawRectangleFill |
AddImageFromFile + SelectImage + DrawImage | TsgcPDFDocument.AddImage(AFileName): Integer + TsgcPDFPage.DrawImageFromIndex(AIndex, X, Y, W, H), oppure DrawImageFile(AFileName, X, Y, W, H) |
GetPageText | TsgcPDFDocument.ExtractTextW(APageIndex), ExtractText, FindText; TsgcPDFEditor.ExtractAllText, SearchText |
AddToFileList + MergeFileList | sgcPDFMergeFiles([...], AOutputFile) |
MergeDocument | TsgcPDFDocument.AppendDocument(ADoc), TsgcPDFEditor.MergeFrom(AFileName) |
ExtractPageRanges, ExtractFilePages | sgcPDFExtractPages(AInputFile, AOutputFile, ARange) (stringa di intervallo in base 1 come '1,3,5-9'), TsgcPDFEditor.ExtractPages(ARange, AOutputFileName) |
DeletePages | TsgcPDFDocument.DeletePages(ARange), DeletePage(AIndex) |
RotatePage | TsgcPDFEditor.RotatePage(AIndex, ADegrees) |
SetTransparency + DrawText (filigrana) | TsgcPDFEditor.AddWatermarkAllPages(TsgcPDFWatermarkOptions), AddWatermark, AddTransparentText |
DrawText su ogni pagina (timbro, intestazione, piè di pagina) | TsgcPDFEditor.AddTextColor, AddHeaderText, AddFooterText, AddPageNumbers |
RenderPageToDC | TsgcPDFRendererGDI.RenderPage(ADC, ADocument.Parser, APage.PageDict, AWidth, AHeight); nel visualizzatore VCL TsgcPDFViewerControl.RenderPageToBitmap |
RenderPageToFile | TsgcPDFExporter.ExportPage(ADocument, APageIndex, AFileName) (BMP, PNG, JPEG), sgcPDFPageToImage(APDFFile, AImageFile, APageIndex, ADPI) |
FormFieldCount, FindFormFieldByTitle | TsgcPDFDocument.AcroForm.FieldCount, AcroForm.FindField(AName) |
SetFormFieldValue, SetFormFieldValueByTitle | AcroForm.FillField(AName, AValue), AcroForm.SetCheckBox(AName, AChecked), TsgcPDFEditor.FillFormField |
GetFormFieldValue | AcroForm.GetFieldValue(AName) |
NewFormField | AcroForm.AddTextField, AddCheckBox, AddComboBox, AddListBox, AddRadioGroup + AddRadioButton, AddButton, AddSignatureField |
FlattenFormField | AcroForm.FlattenFields, TsgcPDFEditor.FlattenForm |
Encrypt | TsgcPDFDocument.SetEncryption(AMethod, AUserPassword, AOwnerPassword) con emAES_256, emAES_128, emRC4_128 oppure emRC4_40 |
CapturePage | TsgcPDFDocument.AddPageAsForm(ASource, APageIndex): Integer (overload con un riquadro di pagina, un rettangolo o annotazioni) |
DrawCapturedPage | TsgcPDFPage.DrawForm(AFormIndex, X, Y, AScaleX, AScaleY, ARotation), DrawFormInRect(AFormIndex, ATarget, AKeepAspect, ARotation), DrawFormMatrix |
GetPageBox | TsgcPDFPage.GetPageBox(ABox) (ppbTrimBox, ppbBleedBox, ...), TsgcPDFDocument.GetFormBBox |
NewOutline | TsgcPDFEditor.AddBookmark(ATitle, APageIndex), AddBookmarkChild |
AddLinkToPage | TsgcPDFEditor.AddLinkAnnotation(APageIndex, ALeft, ABottom, ARight, ATop, ADestPage) |
AddNoteAnnotation | TsgcPDFEditor.AddTextAnnotation(APageIndex, ALeft, ABottom, ARight, ATop, AText) |
SignFile | TsgcPDFEditor.SignDocument(AOutputFile, ACertSubjectName, AReason, ALocation) |
PrintDocument | Il visualizzatore VCL TsgcPDFViewerControl.Print(AFromPage, AToPage, ATitle) stampa senza finestra di dialogo, PrintDialog(ATitle) mostra la finestra di dialogo della stampante (intervallo di pagine, copie) e stampa. Il visualizzatore FireMonkey TsgcPDFViewerFMX ha gli stessi due metodi su Windows e macOS. |
SetMeasurementUnits(0), SetOrigin(0) | il sistema di coordinate predefinito e unico: punti, origine in basso a sinistra; helper sgcPDFMMToPoints, sgcPDFRectMM |