Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
oipi image print
Sorry for posting here, but, easiest way for me to include files.
I have a signature that is being converted from base64 to a png file. All good, the image is convereted and correct.
BUT I have a problem printing the .png file using set)printer("BMP..., the image is printed as all BLACK
Here is the code
Attached is the image signature file(bsbstest.png) and a screenshot of the resultant pdf doc.
Observation: (Totally weird.)
File explorer in the RHSide preview shows as all black
Windows image viewer shows as black
Edit with photopad shows image with signature with transparent background.
Edit with msoft paint shows signature with white background.
Any image experts out there that can shed any light on this, or have some advice as to what further I need to do.
I have a signature that is being converted from base64 to a png file. All good, the image is convereted and correct.
BUT I have a problem printing the .png file using set)printer("BMP..., the image is printed as all BLACK
Here is the code
ApplicantQuoteSignature = SRP_decode(ApplicantQuoteSignatureBase64, "BASE64")
Guid=RTI_CreateGUID()
guid='bsbstest'
SignatureFilename="C:\fm_workarea\":guid:".png"
osdelete SignatureFilename
oswrite ApplicantQuoteSignature to SignatureFilename
Pos=get_printer("POS")
EndOfPage=Pos<2>
PosForImage=EndOfPage-.5
set_printer("BMP",SignatureFilename,.6:@fm:PosForImage:@fm:6.5:@fm:2.5,0,0)
Attached is the image signature file(bsbstest.png) and a screenshot of the resultant pdf doc.
Observation: (Totally weird.)
File explorer in the RHSide preview shows as all black
Windows image viewer shows as black
Edit with photopad shows image with signature with transparent background.
Edit with msoft paint shows signature with white background.
Any image experts out there that can shed any light on this, or have some advice as to what further I need to do.
Comments
If I save the .png that is created, as a .bmp it works
.png -> Stripping out crlf$ still black printing
Also, how are you stripping out the CR/LF characters?
set_printer2("ENABLERTF",1)
So, definitely steering well clear of oipi.net, always been waring due to issues reported.
cmd="magick convert ":SignatureFilename:" -background white -flatten ": SignatureFilename call SRP_Run_Command(CMD)
There is nothing wrong with the file.
Googling shows there are issues with photo viewers displaying images with transparent backgrounds, so oipi has that issue too.
How did the Base64 data get into the field in the first place?
I am happy it is working, so don't go to any further trouble.
Thanks for your help
Attached