UnlockKey | nic do wywołania w kodzie |
NewDocument | TsgcPDFDocument.Create, a potem AddPage (nowy dokument nie ma strony, dopóki jej nie dodasz) |
NewPage, SetPageDimensions, SetPageSize | TsgcPDFDocument.AddPage(AWidth, AHeight): TsgcPDFPage, InsertPage(AIndex, AWidth, AHeight) |
LoadFromFile, LoadFromString | TsgcPDFDocument.LoadFromFile, LoadFromStream, LoadFromBytes |
LoadFromFile z hasłem | TsgcPDFDocument.SetPassword(APassword) przed LoadFromFile |
SaveToFile, SaveToString | TsgcPDFDocument.SaveToFile, SaveToStream, SaveIncremental |
PageCount | TsgcPDFDocument.PageCount; tylko dla pliku: sgcPDFGetPageCount(AFileName) |
SelectPage | TsgcPDFDocument.Pages[AIndex] (od 0, właściwość domyślna), GetPage(AIndex) |
SetInformation | TsgcPDFDocument.Info.Title, .Author, .Subject, .Keywords, .Creator, .Producer |
AddStandardFont + SelectFont + SetTextSize + DrawText | TsgcPDFPage.DrawText(AText, X, Y, AFont, AFontSize) z TsgcPDFStandardFont (sfHelvetica, sfTimesRoman, sfCourier oraz ich warianty pogrubione i pochylone) |
SetTextColor + DrawText | TsgcPDFPage.DrawTextColor(AText, X, Y, AFont, AFontSize, R, G, B) (składowe od 0 do 1) |
AddTrueTypeFont + DrawText | TsgcPDFDocument.AddTrueTypeFont(AFontName, ABold, AItalic): Integer (lub AddTrueTypeFontFromFile), a potem 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), lub 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) (ciąg zakresu liczony od 1, np. '1,3,5-9'), TsgcPDFEditor.ExtractPages(ARange, AOutputFileName) |
DeletePages | TsgcPDFDocument.DeletePages(ARange), DeletePage(AIndex) |
RotatePage | TsgcPDFEditor.RotatePage(AIndex, ADegrees) |
SetTransparency + DrawText (znak wodny) | TsgcPDFEditor.AddWatermarkAllPages(TsgcPDFWatermarkOptions), AddWatermark, AddTransparentText |
DrawText na każdej stronie (pieczątka, nagłówek, stopka) | TsgcPDFEditor.AddTextColor, AddHeaderText, AddFooterText, AddPageNumbers |
RenderPageToDC | TsgcPDFRendererGDI.RenderPage(ADC, ADocument.Parser, APage.PageDict, AWidth, AHeight); w przeglądarce 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) z emAES_256, emAES_128, emRC4_128 lub emRC4_40 |
CapturePage | TsgcPDFDocument.AddPageAsForm(ASource, APageIndex): Integer (przeciążenia z ramką strony, prostokątem lub adnotacjami) |
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 | Przeglądarka VCL TsgcPDFViewerControl.Print(AFromPage, AToPage, ATitle) drukuje bez okna dialogowego, PrintDialog(ATitle) pokazuje okno drukarki (zakres stron, liczba kopii) i drukuje. Przeglądarka FireMonkey TsgcPDFViewerFMX ma te same dwie metody w systemach Windows i macOS. |
SetMeasurementUnits(0), SetOrigin(0) | domyślny i jedyny układ współrzędnych: punkty, początek w lewym dolnym rogu; pomocnicze sgcPDFMMToPoints, sgcPDFRectMM |