📄 pdfboxapi.bas
字号:
' ---------- Brush styles (values of the BrushStyle property)
Global Const bsSolid = 0
Global Const bsClear = 1
' ---------- Pen style (values of the PenStyle property)
Global Const psSolid = 0
Global Const psDash = 1
Global Const psClear = 5
'----------- Image Compress Mode (values of the ImageCompressMode property)
Global Const cpNone = 0
Global Const cpZlib = 1
Global Const cpJpeg = 2
'----------- Length Units (values of the LengthUnit property)
Global Const luTenth = 0
Global Const luPoint = 1
'----------- Paper Orientation (values of the Orientation property)
Global Const poPortrait = 0
Global Const poLandscape = 1
'----------- Horizontal Alignment (to be used in DefineCol, DefineGrid and DrawText methods)
Global Const taLeftJustify = 0
Global Const taRightJustify = 1
Global Const taCenter = 2
'----------- Vertical Alignment (to be used in DefineCol and DrawText methods)
Global Const vaTop = 0
Global Const vaBottom = 1
Global Const vaCenter = 2
'----------- Field types (to be used in DefineField)
Global Const ftPushButton = 0
Global Const ftEditBox = 1
Global Const ftMemoBox = 2
Global Const ftListBox = 3
Global Const ftComboBox = 4
Global Const ftCheckBox = 5
Global Const ftRadioButton = 6
'----------- Field properties (to be used in SetStrFieldProp and SetNumFieldProp)
Global Const fpVisible = 0
Global Const fpReadOnly = 1
Global Const fpRequired = 2
Global Const fpPassword = 3
Global Const fpCanExport = 4
Global Const fpCanPrint = 5
Global Const fpAllowOutOfList = 6
Global Const fpMaxLength = 7
Global Const fpAlignment = 8
Global Const fpBorderStyle = 9
Global Const fpBorderColor = 10
Global Const fpBorderWidth = 11
Global Const fpCheckMark = 12
Global Const fpLabelFontName = 13
Global Const fpLabelFontSize = 14
Global Const fpLabelFontColor = 15
Global Const fpLabelFontBold = 16
Global Const fpLabelFontItalic = 17
Global Const fpLabelFontCharset = 18
Global Const fpItems = 19
Global Const fpDefault = 20
'----------- Field events (to be used in SetAction)
Global Const evOnChange = 0
Global Const evOnMouseMove = 1
Global Const evOnMouseExit = 2
Global Const evOnFormatting = 3
Global Const evOnGotFocus = 4
Global Const evOnKeyPress = 5
Global Const evOnLostFocus = 6
Global Const evOnMouseDown = 7
Global Const evOnMouseUp = 8
'----------- Field action types (to be used in SetAction)
Global Const acLink = 0
Global Const acHide = 1
Global Const acShow = 2
Global Const acSubmitForm = 3
Global Const acResetForm = 4
Global Const acImportData = 5
Global Const acJavaScript = 6
'----------- Field border styles (to be used in SetNumFieldProp)
Global Const boSolid = 0
Global Const boDashed = 1
Global Const boBeveled = 2
Global Const boInset = 3
Global Const boUnderline = 4
'----------- Page Counters (to be used in DrawPageCounter)
Global Const pgNone = 0
Global Const pgPageNumber = 1
Global Const pgPageCount = 2
Global Const pgPageNumberInChapter = 3
Global Const pgPageCountInChapter = 4
Global Const pgChapterNumber = 5
Global Const pgChapterCount = 6
Global Const pgFrontNumber = 7
Global Const pgFrontCount = 8
Global Const pgFrontNumberInChapter = 9
Global Const pgFrontCountInChapter = 10
'----------- Page number formats (to be used in SetPageNumberFormat)
Global Const pf1 = 0
Global Const pf01 = 1
Global Const pf001 = 2
Global Const pf0001 = 3
Global Const pfUpcaseLetters = 4
Global Const pfLowcaseLetters = 5
Global Const pfUpcaseRoman = 6
Global Const pfLowcaseRoman = 7
'----------- Color kinds (to be used in SetColorEx)
Global Const ckBrush = 0
Global Const ckPen = 1
Global Const ckFont = 2
'----------- Color systems (to be used in SetColorEx)
Global Const coColor = 0
Global Const coRGB = 1
Global Const coHSL = 2
Global Const coCMYK = 3
Global Const coGrayScale = 4
Sub CallBox(ByVal aFunctionCall As Long)
Dim Msg As String * 255
Dim n As Long
If aFunctionCall = -1 Then
n = GetErrorMsg(Msg)
MsgBox Msg, 16, "PDF In-The-Box"
Stop
End If
End Sub
Function GetStr(ByVal aBoxHandle As Long, ByVal aPropID As Long) As String
Dim Result As String * 255
CallBox GetStrProp(aBoxHandle, aPropID, Result)
GetStr = Result
End Function
Function GetStyleParameter(ByVal aBoxHandle As Long, ByVal aParameterName As String) As String
Dim Result As String * 255
CallBox StyleParameter(aBoxHandle, aParameterName, Result)
GetStyleParameter = Result
End Function
Function GetNum(ByVal aBoxHandle As Long, ByVal aPropID As Long) As Long
Dim Msg As String * 255
GetNum = GetNumProp(aBoxHandle, aPropID)
If GetNum = -1 Then
n = GetErrorMsg(Msg)
MsgBox Msg, 16, "PDF In-The-Box"
Stop
End If
End Function
Sub SetNum(ByVal aBoxHandle As Long, ByVal aPropID As Long, ByVal aValue As Long)
CallBox SetNumProp(aBoxHandle, aPropID, aValue)
End Sub
Sub SetStr(ByVal aBoxHandle As Long, ByVal aPropID As Long, ByVal aValue As String)
CallBox SetStrProp(aBoxHandle, aPropID, aValue)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -