UnlockKey | rien à appeler dans le code |
NewDocument | TsgcPDFDocument.Create, puis AddPage (un nouveau document n'a aucune page tant que vous n'en ajoutez pas) |
NewPage, SetPageDimensions, SetPageSize | TsgcPDFDocument.AddPage(AWidth, AHeight): TsgcPDFPage, InsertPage(AIndex, AWidth, AHeight) |
LoadFromFile, LoadFromString | TsgcPDFDocument.LoadFromFile, LoadFromStream, LoadFromBytes |
LoadFromFile avec un mot de passe | TsgcPDFDocument.SetPassword(APassword) avant LoadFromFile |
SaveToFile, SaveToString | TsgcPDFDocument.SaveToFile, SaveToStream, SaveIncremental |
PageCount | TsgcPDFDocument.PageCount; pour un fichier uniquement, sgcPDFGetPageCount(AFileName) |
SelectPage | TsgcPDFDocument.Pages[AIndex] (base 0, propriété par défaut), GetPage(AIndex) |
SetInformation | TsgcPDFDocument.Info.Title, .Author, .Subject, .Keywords, .Creator, .Producer |
AddStandardFont + SelectFont + SetTextSize + DrawText | TsgcPDFPage.DrawText(AText, X, Y, AFont, AFontSize) avec un TsgcPDFStandardFont (sfHelvetica, sfTimesRoman, sfCourier et leurs variantes gras et italique) |
SetTextColor + DrawText | TsgcPDFPage.DrawTextColor(AText, X, Y, AFont, AFontSize, R, G, B) (composantes de 0 à 1) |
AddTrueTypeFont + DrawText | TsgcPDFDocument.AddTrueTypeFont(AFontName, ABold, AItalic): Integer (ou AddTrueTypeFontFromFile), puis 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), ou 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) (chaîne de plages en base 1, comme '1,3,5-9'), TsgcPDFEditor.ExtractPages(ARange, AOutputFileName) |
DeletePages | TsgcPDFDocument.DeletePages(ARange), DeletePage(AIndex) |
RotatePage | TsgcPDFEditor.RotatePage(AIndex, ADegrees) |
SetTransparency + DrawText (filigrane) | TsgcPDFEditor.AddWatermarkAllPages(TsgcPDFWatermarkOptions), AddWatermark, AddTransparentText |
DrawText sur chaque page (tampon, en-tête, pied de page) | TsgcPDFEditor.AddTextColor, AddHeaderText, AddFooterText, AddPageNumbers |
RenderPageToDC | TsgcPDFRendererGDI.RenderPage(ADC, ADocument.Parser, APage.PageDict, AWidth, AHeight); dans la visionneuse 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) avec emAES_256, emAES_128, emRC4_128 ou emRC4_40 |
CapturePage | TsgcPDFDocument.AddPageAsForm(ASource, APageIndex): Integer (surcharges avec une zone de page, un rectangle ou des annotations) |
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 | La visionneuse VCL TsgcPDFViewerControl.Print(AFromPage, AToPage, ATitle) imprime sans boîte de dialogue, PrintDialog(ATitle) affiche la boîte de dialogue d'impression (plage de pages, copies) et imprime. La visionneuse FireMonkey TsgcPDFViewerFMX a les deux mêmes méthodes sous Windows et macOS. |
SetMeasurementUnits(0), SetOrigin(0) | le système de coordonnées par défaut et unique : points, origine en bas à gauche ; aides sgcPDFMMToPoints, sgcPDFRectMM |