Hi
I am making an app and i need to paste an image on another image and finally convert to PDF and got some prob like:
I have changed the color of canvas in signature to transparent. It comes correctly on the App, but when it is printed on PDF the background is black instead of white.
For this I used this
Canvassignaturemain.DrawColor(Colors.Transparent
and rest also paste below:
:sign0085:
Dim temprect2 As Rect
Dim temprect As Rect
Dim imageback As Int
Dim imageback2 As Int
temprect = pnlsign.GetScaleRect
signleftposition = temprect.Left
Log(signleftposition)
signtopposition = temprect.Bottom
Log(signtopposition)
Dim datetimePdf As String
' PDFWriter1.Initialize("PDFWriter1",100%x,100%y)
PDFWriter1.Initialize("PDFWriter1",PaperSize.A4_WIDTH, PaperSize.A4_HEIGHT)
If s <> "" Then
bmchoosefile.Initialize(File.DirRootExternal,s)
PDFWriter1.addImage2(5%x,5%y,100%x,100%y,bmchoosefile)
End If
If bgsign <> "" Then
ksignp.Initialize(File.DirRootExternal,bgsign)
'PDFWriter1.addImage(signleftposition,signtopposition, ksignp )
PDFWriter1.addImage(signleftposition,signtopposition, ksignp )
End If
PDFWriter1.addText(30%x,95%y,20,emailtext1)
PDFWriter1.addText(30%x,85%y,20,emailtext2)
PDFWriter1.addText(30%x,75%y,20,emailtext3)
PDFWriter1.addText(30%x,65%y,20,emailtext4)
PDFWriter1.addText(30%x,55%y,20,emailtext5)
PDFWriter1.addText(30%x,45%y,20,emailtext6)
PDFWriter1.addText(30%x,35%y,20,emailtext7)
'PDFWriter1.addText(20,300,20,lbl2slide1.Text)
PDFWriter1.ConverseDocument
datetimePdf = ""
datetimePdf = DateTime.GetDayOfYear(DateTime.Now)
datetimePdf = datetimePdf & DateTime.GetHour(DateTime.Now)
datetimePdf = datetimePdf & DateTime.GetMinute(DateTime.Now)
datetimePdf = datetimePdf & DateTime.GetSecond(DateTime.Now)
PDFfilename = datetimePdf & ".pdf"
PDFWriter1.outputToFile(File.DirRootExternal,PDFfilename,PDFContent,"ISO-8859-1")
ToastMessageShow("saving Document complete.",False)
End Sub
thanks
Kamal
I am making an app and i need to paste an image on another image and finally convert to PDF and got some prob like:
I have changed the color of canvas in signature to transparent. It comes correctly on the App, but when it is printed on PDF the background is black instead of white.
For this I used this
Canvassignaturemain.DrawColor(Colors.Transparent
and rest also paste below:
:sign0085:
Dim temprect2 As Rect
Dim temprect As Rect
Dim imageback As Int
Dim imageback2 As Int
temprect = pnlsign.GetScaleRect
signleftposition = temprect.Left
Log(signleftposition)
signtopposition = temprect.Bottom
Log(signtopposition)
Dim datetimePdf As String
' PDFWriter1.Initialize("PDFWriter1",100%x,100%y)
PDFWriter1.Initialize("PDFWriter1",PaperSize.A4_WIDTH, PaperSize.A4_HEIGHT)
If s <> "" Then
bmchoosefile.Initialize(File.DirRootExternal,s)
PDFWriter1.addImage2(5%x,5%y,100%x,100%y,bmchoosefile)
End If
If bgsign <> "" Then
ksignp.Initialize(File.DirRootExternal,bgsign)
'PDFWriter1.addImage(signleftposition,signtopposition, ksignp )
PDFWriter1.addImage(signleftposition,signtopposition, ksignp )
End If
PDFWriter1.addText(30%x,95%y,20,emailtext1)
PDFWriter1.addText(30%x,85%y,20,emailtext2)
PDFWriter1.addText(30%x,75%y,20,emailtext3)
PDFWriter1.addText(30%x,65%y,20,emailtext4)
PDFWriter1.addText(30%x,55%y,20,emailtext5)
PDFWriter1.addText(30%x,45%y,20,emailtext6)
PDFWriter1.addText(30%x,35%y,20,emailtext7)
'PDFWriter1.addText(20,300,20,lbl2slide1.Text)
PDFWriter1.ConverseDocument
datetimePdf = ""
datetimePdf = DateTime.GetDayOfYear(DateTime.Now)
datetimePdf = datetimePdf & DateTime.GetHour(DateTime.Now)
datetimePdf = datetimePdf & DateTime.GetMinute(DateTime.Now)
datetimePdf = datetimePdf & DateTime.GetSecond(DateTime.Now)
PDFfilename = datetimePdf & ".pdf"
PDFWriter1.outputToFile(File.DirRootExternal,PDFfilename,PDFContent,"ISO-8859-1")
ToastMessageShow("saving Document complete.",False)
End Sub
thanks
Kamal