mirror of
https://github.com/donl/rsfpdf.git
synced 2026-06-30 06:12:18 -06:00
1 line
No EOL
16 KiB
Text
1 line
No EOL
16 KiB
Text
#tag Window
|
|
Begin Window Window1
|
|
BackColor = 16777215
|
|
Backdrop = ""
|
|
BalloonHelp = ""
|
|
CloseButton = True
|
|
Composite = False
|
|
Frame = 0
|
|
FullScreen = False
|
|
HasBackColor = False
|
|
Height = 355
|
|
ImplicitInstance= True
|
|
LiveResize = False
|
|
MacProcID = 0
|
|
MaxHeight = 32000
|
|
MaximizeButton = False
|
|
MaxWidth = 32000
|
|
MenuBar = 2044205055
|
|
MenuBarVisible = True
|
|
MinHeight = 270
|
|
MinimizeButton = False
|
|
MinWidth = 420
|
|
Placement = 0
|
|
Resizeable = False
|
|
Title = "rPDF Examples / Ejemplos"
|
|
Visible = True
|
|
Width = 441
|
|
Begin TextField EditField1
|
|
AcceptTabs = ""
|
|
Alignment = 0
|
|
AutoDeactivate = True
|
|
AutomaticallyCheckSpelling= False
|
|
BackColor = 16777215
|
|
Bold = ""
|
|
Border = True
|
|
CueText = ""
|
|
DataField = ""
|
|
DataSource = ""
|
|
Enabled = True
|
|
Format = ""
|
|
Height = 22
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 20
|
|
LimitText = 0
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = True
|
|
LockRight = True
|
|
LockTop = ""
|
|
Mask = ""
|
|
Password = ""
|
|
ReadOnly = ""
|
|
Scope = 0
|
|
TabIndex = 0
|
|
TabPanelIndex = 0
|
|
TabStop = True
|
|
Text = "Hello Word!"
|
|
TextColor = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 26
|
|
Underline = ""
|
|
UseFocusRing = True
|
|
Visible = True
|
|
Width = 401
|
|
End
|
|
Begin PushButton Ejemplo3
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
ButtonStyle = 0
|
|
Cancel = ""
|
|
Caption = "DEMO3"
|
|
Default = ""
|
|
Enabled = True
|
|
Height = 22
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 41
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = True
|
|
LockRight = False
|
|
LockTop = True
|
|
Scope = 0
|
|
TabIndex = 1
|
|
TabPanelIndex = 0
|
|
TabStop = True
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 205
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 80
|
|
End
|
|
Begin PushButton Ejemplo2
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
ButtonStyle = 0
|
|
Cancel = ""
|
|
Caption = "DEMO2"
|
|
Default = ""
|
|
Enabled = True
|
|
Height = 22
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 41
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = True
|
|
LockRight = False
|
|
LockTop = True
|
|
Scope = 0
|
|
TabIndex = 2
|
|
TabPanelIndex = 0
|
|
TabStop = True
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 160
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 80
|
|
End
|
|
Begin PushButton Ejemplo1
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
ButtonStyle = 0
|
|
Cancel = ""
|
|
Caption = "DEMO1"
|
|
Default = ""
|
|
Enabled = True
|
|
Height = 22
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 20
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = True
|
|
LockRight = False
|
|
LockTop = True
|
|
Scope = 0
|
|
TabIndex = 3
|
|
TabPanelIndex = 0
|
|
TabStop = True
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 71
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 80
|
|
End
|
|
Begin Label StaticText1
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
DataField = ""
|
|
DataSource = ""
|
|
Enabled = True
|
|
Height = 29
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 112
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = ""
|
|
LockRight = ""
|
|
LockTop = ""
|
|
Multiline = True
|
|
Scope = 0
|
|
Selectable = False
|
|
TabIndex = 4
|
|
TabPanelIndex = 0
|
|
Text = "Generate A4 Page and insert EditField text in it.\r\nGenerar una página A4 e insertar el contenido del EditField."
|
|
TextAlign = 0
|
|
TextColor = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 71
|
|
Transparent = False
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 288
|
|
End
|
|
Begin Label StaticText2
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
DataField = ""
|
|
DataSource = ""
|
|
Enabled = True
|
|
Height = 33
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 133
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = ""
|
|
LockRight = ""
|
|
LockTop = ""
|
|
Multiline = True
|
|
Scope = 0
|
|
Selectable = False
|
|
TabIndex = 5
|
|
TabPanelIndex = 0
|
|
Text = "Insert a Header and Footer with a page count.\r\nInsertar Cabecera y Pie con contador de numero de hoja."
|
|
TextAlign = 0
|
|
TextColor = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 160
|
|
Transparent = False
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 288
|
|
End
|
|
Begin Label StaticText3
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
DataField = ""
|
|
DataSource = ""
|
|
Enabled = True
|
|
Height = 32
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 134
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = ""
|
|
LockRight = ""
|
|
LockTop = ""
|
|
Multiline = True
|
|
Scope = 0
|
|
Selectable = False
|
|
TabIndex = 6
|
|
TabPanelIndex = 0
|
|
Text = "Simple Table\r\nTabla Simple"
|
|
TextAlign = 0
|
|
TextColor = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 205
|
|
Transparent = False
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 287
|
|
End
|
|
Begin PushButton Ejemplo4
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
ButtonStyle = 0
|
|
Cancel = ""
|
|
Caption = "DEMO4"
|
|
Default = False
|
|
Enabled = True
|
|
Height = 22
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 41
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = True
|
|
LockRight = False
|
|
LockTop = True
|
|
Scope = 0
|
|
TabIndex = 7
|
|
TabPanelIndex = 0
|
|
TabStop = True
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 249
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 80
|
|
End
|
|
Begin Label StaticText4
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
DataField = ""
|
|
DataSource = ""
|
|
Enabled = True
|
|
Height = 32
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 134
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = ""
|
|
LockRight = ""
|
|
LockTop = ""
|
|
Multiline = True
|
|
Scope = 0
|
|
Selectable = False
|
|
TabIndex = 8
|
|
TabPanelIndex = 0
|
|
Text = "Multiple Columns\r\nColumnas Multiples"
|
|
TextAlign = 0
|
|
TextColor = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 249
|
|
Transparent = False
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 287
|
|
End
|
|
Begin GroupBox GroupBox1
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
Caption = "Untitled"
|
|
Enabled = True
|
|
Height = 100
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = -315
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = ""
|
|
LockRight = ""
|
|
LockTop = ""
|
|
Scope = 0
|
|
TabIndex = 9
|
|
TabPanelIndex = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 255
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 100
|
|
End
|
|
Begin GroupBox GroupBox2
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
Caption = "Subclassing"
|
|
Enabled = True
|
|
Height = 205
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = ""
|
|
Italic = ""
|
|
Left = 20
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = ""
|
|
LockRight = ""
|
|
LockTop = ""
|
|
Scope = 0
|
|
TabIndex = 10
|
|
TabPanelIndex = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 130
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 401
|
|
Begin PushButton Ejemplo5
|
|
AutoDeactivate = True
|
|
Bold = ""
|
|
ButtonStyle = 0
|
|
Cancel = ""
|
|
Caption = "DEMO5"
|
|
Default = False
|
|
Enabled = True
|
|
Height = 22
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = "GroupBox2"
|
|
Italic = ""
|
|
Left = 41
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = True
|
|
LockRight = False
|
|
LockTop = True
|
|
Scope = 0
|
|
TabIndex = 0
|
|
TabPanelIndex = 0
|
|
TabStop = True
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 294
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 80
|
|
End
|
|
Begin Label StaticText5
|
|
AutoDeactivate = True
|
|
Bold = False
|
|
DataField = ""
|
|
DataSource = ""
|
|
Enabled = True
|
|
Height = 32
|
|
HelpTag = ""
|
|
Index = -2147483648
|
|
InitialParent = "GroupBox2"
|
|
Italic = ""
|
|
Left = 134
|
|
LockBottom = ""
|
|
LockedInPosition= False
|
|
LockLeft = ""
|
|
LockRight = ""
|
|
LockTop = ""
|
|
Multiline = True
|
|
Scope = 0
|
|
Selectable = False
|
|
TabIndex = 1
|
|
TabPanelIndex = 0
|
|
Text = "JPG Inclusion and Hyperlink\r\nIncrustar JPG y Marcadores"
|
|
TextAlign = 0
|
|
TextColor = 0
|
|
TextFont = "System"
|
|
TextSize = 0
|
|
TextUnit = 0
|
|
Top = 289
|
|
Transparent = False
|
|
Underline = ""
|
|
Visible = True
|
|
Width = 267
|
|
End
|
|
End
|
|
End
|
|
#tag EndWindow
|
|
|
|
#tag WindowCode
|
|
#tag EndWindowCode
|
|
|
|
#tag Events Ejemplo3
|
|
#tag Event
|
|
Sub Action()
|
|
dim pdf as fpdf
|
|
dim j,i as integer
|
|
|
|
me.Enabled = False
|
|
|
|
pdf = new FPDF("P")
|
|
pdf.AddPage()
|
|
|
|
pdf.SetFont("Courier","",8)
|
|
|
|
//Cabecera
|
|
for i = 1 to 4
|
|
pdf.Cell(40,7,"Cabecera " + str(i),1)
|
|
next i
|
|
|
|
pdf.Ln()
|
|
|
|
//Datos
|
|
for j = 1 to 10
|
|
|
|
for i = 1 to 4
|
|
pdf.cell(40,6,"Item " + str(i),1)
|
|
next i
|
|
|
|
pdf.ln()
|
|
|
|
next j
|
|
|
|
pdf.Output(me.Name + ".pdf")
|
|
|
|
me.Enabled = true
|
|
|
|
End Sub
|
|
#tag EndEvent
|
|
#tag EndEvents
|
|
#tag Events Ejemplo2
|
|
#tag Event
|
|
Sub Action()
|
|
dim pdf as EJEMPLO2
|
|
dim j,i as integer
|
|
|
|
me.Enabled = False
|
|
|
|
pdf = new EJEMPLO2("P" )
|
|
|
|
pdf.AliasNbPages()
|
|
pdf.AddPage()
|
|
pdf.SetFont("Times","",12)
|
|
|
|
for i = 1 to 40
|
|
pdf.cell(0,10,"Imprimiendo linea numero " + str(i),0,1)
|
|
next i
|
|
|
|
pdf.Output(me.Name + ".pdf")
|
|
|
|
me.Enabled = true
|
|
|
|
End Sub
|
|
#tag EndEvent
|
|
#tag EndEvents
|
|
#tag Events Ejemplo1
|
|
#tag Event
|
|
Sub Action()
|
|
dim pdf as fpdf
|
|
dim j,i as integer
|
|
|
|
me.Enabled = False
|
|
|
|
if EditField1.Text = "" then
|
|
MsgBox "You must write some text / Debe Ingresar Un Texto"
|
|
EditField1.SetFocus
|
|
return
|
|
end if
|
|
|
|
pdf = new FPDF("P")
|
|
pdf.AddPage()
|
|
pdf.SetFont("Arial","B",16)
|
|
pdf.Cell(40,10,EditField1.Text)
|
|
pdf.Output(me.Name + ".pdf")
|
|
|
|
me.Enabled = true
|
|
|
|
End Sub
|
|
#tag EndEvent
|
|
#tag EndEvents
|
|
#tag Events Ejemplo4
|
|
#tag Event
|
|
Sub Action()
|
|
dim pdf as EJEMPLO4
|
|
|
|
me.Enabled = False
|
|
|
|
pdf = new EJEMPLO4("P")
|
|
|
|
pdf.SetTitle("20000 Leguas de Viaje Submarino")
|
|
pdf.SetAuthor("Julio Verne")
|
|
pdf.PrintChapter(1,"UN RIZO DE HUIDA","20k_c1.txt")
|
|
pdf.PrintChapter(2,"LOS PROS Y LOS CONTRAS","20k_c2.txt")
|
|
|
|
pdf.Output(me.Name + ".pdf")
|
|
|
|
me.Enabled = true
|
|
|
|
End Sub
|
|
#tag EndEvent
|
|
#tag EndEvents
|
|
#tag Events Ejemplo5
|
|
#tag Event
|
|
Sub Action()
|
|
dim pdf as fpdf
|
|
dim link as string
|
|
|
|
me.Enabled = False
|
|
|
|
pdf = new fpdf("P")
|
|
pdf.SetEnconding(Encodings.WindowsLatin1)
|
|
|
|
//Primera página
|
|
pdf.AddPage()
|
|
pdf.SetFont("Arial","",20)
|
|
pdf.Write(5,"Para saber qué hay de nuevo en este tutorial, pulse ")
|
|
pdf.SetFont("","U")
|
|
|
|
link = pdf.AddLink()
|
|
pdf.Write(5,"aqui",link)
|
|
pdf.SetFont("")
|
|
|
|
//Segunda página
|
|
pdf.AddPage()
|
|
pdf.SetLink(link)
|
|
pdf.Image("demoinfo/pie_chart.jpg",10,10,150,0,"","http://rpdf.diego2k.com.ar")
|
|
|
|
pdf.Output(me.Name + ".pdf")
|
|
|
|
me.Enabled = true
|
|
|
|
End Sub
|
|
#tag EndEvent
|
|
#tag EndEvents
|