Spanish PDF en blanco con PDFWRITER

Descartex

Well-Known Member
Licensed User
Longtime User
Buenas,
Sin un trozo de codigo ni nada, lo tenemos entre jodido y muy jodido.
Un saludo.
 

Anton Solans Argemí

Active Member
Licensed User
Buenos días, al final he modificado la manera de realitzar un tiquet y utilitzo el PDFJET.

El pdf que quiero generar es el de un tiquet con la información de la venta donde incluye la firma del cliente que hemos solicitado previamente.

El problema que tengo ahora es que el tamaño de la firma en el tiquet me está quedando en un tamaño muy grande y no se como reducir el tamaño de la firma capturada para que en el tiquet me quede bien.

Envío código de como estoy realizando la captura de firma y de como estoy incorporando la firma en el tiquet:

CAPTURA DE FIRMA
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim px, py As Int
Type SignatureData (Canvas As Canvas, Panel As Panel, SignatureColor As Int, SignatureWidth As Int)
End Sub
Sub Panel_Touch(SD As SignatureData, x As Int,y As Int, Action As Int)
If Action = 0 Then 'mouse down constant
px = x
py = y
Else
SD.Canvas.DrawLine(px, py, x, y, SD.SignatureColor, SD.SignatureWidth)
SD.Panel.Invalidate
px = x
py = y
End If
End Sub
Sub Clear(SD As SignatureData)
SD.Canvas.DrawColor(Colors.White)
SD.Panel.Invalidate
End Sub
Sub Save(SD As SignatureData, Dir As String, Name As String)
Dim out As OutputStream
out = File.OpenOutput(Dir, Name, False)
SD.Canvas.Bitmap.WriteToStream(out, 100, "PNG")
out.Close
End Sub
VISUALIZAR FIRMA EN TIQUET
wfila=wfila+10
inStream2= File.OpenInput(Main.dirpdf, "sign.png")
image2.Initialize(PDFjetPDF1, inStream2, PDFjetConstants1.ImageType.PNG)
image2.setPosition(10,wfila)
image2.scaleBy(1)
image2.drawOn(PDFPage)

Muchas gracias por vuestra ayuda !!
 
Top