11
Web Server - Ask For Help / Re: Use DRAW to Create QR Code in NT app?
« Last post by DonRidley on October 30, 2025, 08:25:15 AM »Nice!
12
Web Server - Ask For Help / How to use webfonts, etc. on web app button?
« Last post by jking on October 30, 2025, 08:20:05 AM »Hello all,
I'm trying to improve the icons/images on a NT 14.30 web app. In the template, Button tab, there are fields for Icon and Image. I have successfully used a few image files, in the image field, such as 'images/search.png'. However, I tried to use 'calendar large' and 'calendar xlarge' in the icon field, to use a Webfont icon. Both are the same size and very difficult to see. Any suggestions? Other font sets I might add that work better?
Thanks,
Jeff King
I'm trying to improve the icons/images on a NT 14.30 web app. In the template, Button tab, there are fields for Icon and Image. I have successfully used a few image files, in the image field, such as 'images/search.png'. However, I tried to use 'calendar large' and 'calendar xlarge' in the icon field, to use a Webfont icon. Both are the same size and very difficult to see. Any suggestions? Other font sets I might add that work better?
Thanks,
Jeff King
13
Web Server - Ask For Help / Re: Use DRAW to Create QR Code in NT app?
« Last post by osquiabro on October 30, 2025, 08:17:14 AM »Hi Don, with QrCode.dll the resolution is perfect a generate small image, very fast and less code
14
Web Server - Ask For Help / Re: Use DRAW to Create QR Code in NT app?
« Last post by DonRidley on October 30, 2025, 04:20:53 AM »Good day Ron,
If you take a look at the NetTalk webserver Insight Graphing example's WebGraphSize procedure you will find:
The important parts are:
ThisGraph2.SaveAs:
SaveAs uses draw to create the image that is eventually displayed using p_web.CreateImage.
Now, this is one way to approach this. You could use this method to generate a QR code image and display it but you're going to run into the main problem I have with Insight graphs in a web app...resolution.
If you want a higher resolution image with this approach you'll need to make the container Window larger and the image control larger which creates a larger image. The larger the image file then the slower the HTML page loads.
So, this is a long winded way of saying that I suggest you use a JavaScript approach using jQuery.
Here's a link to a jQuery plugin for QR codes:
https://github.com/jeromeetienne/jquery-qrcode
I think this would be a better way. Generate the QR code client side.
That's my humble opinion.
If you take a look at the NetTalk webserver Insight Graphing example's WebGraphSize procedure you will find:
Code: [Select]
If not p_Web &= NULL
loc:silent = p_web.GetValue('_Silent')
p_web.DivHeader('WebGraphSize_2','nt-left')
If loc:Silent = 0
Window{prop:hide} = 1
ThisGraph2.Reset()
ThisGraph2.DrawGraph()
ans = 'images\@@@' & format(random(1,99999),@n05) &'.png'
ThisGraph2.SaveAs(clip(p_web.site.WebFolderPath) & '\' & Ans)
Window{prop:pixels} = 1
packet.append(p_web.CreateImage(ans,ThisGraph2.Width,ThisGraph2.Height,ThisGraph2.HeaderName))
End
p_web.ParseHTML(packet,1,0,NET:NoHeader)
packet.SetValue('')
p_web.DivFooter()
Return(Level:Notify)
End
The important parts are:
Code: [Select]
ans = 'images\@@@' & format(random(1,99999),@n05) &'.png' !<<--- Path string to an image file is create
ThisGraph2.SaveAs(clip(p_web.site.WebFolderPath) & '\' & Ans) !<<--- Actual image file is saved to the path
packet.append(p_web.CreateImage(ans,ThisGraph2.Width,ThisGraph2.Height,ThisGraph2.HeaderName)) !<<--- HTML for the image is generated
ThisGraph2.SaveAs:
Code: [Select]
InsightRoot.SaveAs Procedure (string FileName)
f string(255)
code
if self.thisDraw &= null then return . ! ghnn
f = filename
if instring('.',lower(f),1,1) = 0
f = clip(f) & '.png'
end
if instring('.wmf',lower(f),1,1)
elsif instring('.bmp',lower(f),1,1)
Self.ThisDraw.Writebmp(f)
elsif instring('.png',lower(f),1,1)
Self.ThisDraw.WritePng(f)
end
SaveAs uses draw to create the image that is eventually displayed using p_web.CreateImage.
Now, this is one way to approach this. You could use this method to generate a QR code image and display it but you're going to run into the main problem I have with Insight graphs in a web app...resolution.
If you want a higher resolution image with this approach you'll need to make the container Window larger and the image control larger which creates a larger image. The larger the image file then the slower the HTML page loads.
So, this is a long winded way of saying that I suggest you use a JavaScript approach using jQuery.
Here's a link to a jQuery plugin for QR codes:
https://github.com/jeromeetienne/jquery-qrcode
I think this would be a better way. Generate the QR code client side.
That's my humble opinion.
15
Web Server - Ask For Help / Re: Use DRAW to Create QR Code in NT app?
« Last post by osquiabro on October 30, 2025, 04:06:28 AM »I use QrCode.dll and it's very easy to use look example, in preupdate and display a result in Media field
p_web.ssv('Loc:receipt_url',Eve4:RECEIPT_URL)
Loc:Text = CLIP(Eve4:GUI)
Loc:PathFileUci=clip(p_web.site.WebFolderPath)&'\uploads\$$$QRInvoice' & CLIP(Eve4:GUI)&'.jpg'
Loc:Pixel=100
Loc:Format='png'
Loc:ColorBlack ='black'
Loc:ColorWhite = 'white'
GenerateQrCode(CLIP(Loc:Text),clip(Loc:PathFileUCI),clip(Loc:Pixel),clip(Loc:Format),clip(Loc:ColorBlack),clip(Loc:ColorWhite))
loc:st_filename3 = '/uploads/'&'$$$QRInvoice'&CLIP(Eve4:GUI)&'.jpg'
p_web.ssv('loc:st_filename3',clip(loc:st_filename3))
p_web.ssv('Loc:receipt_url',Eve4:RECEIPT_URL)
Loc:Text = CLIP(Eve4:GUI)
Loc:PathFileUci=clip(p_web.site.WebFolderPath)&'\uploads\$$$QRInvoice' & CLIP(Eve4:GUI)&'.jpg'
Loc:Pixel=100
Loc:Format='png'
Loc:ColorBlack ='black'
Loc:ColorWhite = 'white'
GenerateQrCode(CLIP(Loc:Text),clip(Loc:PathFileUCI),clip(Loc:Pixel),clip(Loc:Format),clip(Loc:ColorBlack),clip(Loc:ColorWhite))
loc:st_filename3 = '/uploads/'&'$$$QRInvoice'&CLIP(Eve4:GUI)&'.jpg'
p_web.ssv('loc:st_filename3',clip(loc:st_filename3))
16
Web Server - Ask For Help / Use DRAW to Create QR Code in NT app?
« Last post by rjolda on October 29, 2025, 12:19:02 PM »Hi,
NT 14.36 C11.0136
I want to generate a QR code with DRAW. I am currently doing it with ezCam but if I can do it with DRAW it will be much cleaner.
PROBLEM. DRAW requires an Image. I have tried creating QR without the Image on a window and it does NOT work.
If I place an IMAGE on the window, I have to DISPLAY the image and then I can write it to a PNG file.
The documents state that displaying the image is optional- however, If I don't display the image, it will not save ( save writes a black square ).
Anyone with insight?
Do I have to try to write it to an Image file in NT first?
Thanks,
Ron
NT 14.36 C11.0136
I want to generate a QR code with DRAW. I am currently doing it with ezCam but if I can do it with DRAW it will be much cleaner.
PROBLEM. DRAW requires an Image. I have tried creating QR without the Image on a window and it does NOT work.
If I place an IMAGE on the window, I have to DISPLAY the image and then I can write it to a PNG file.
The documents state that displaying the image is optional- however, If I don't display the image, it will not save ( save writes a black square ).
Anyone with insight?
Do I have to try to write it to an Image file in NT first?
Thanks,
Ron
17
Available For Hire / Re: Available for hire, call me now!
« Last post by kaptice on October 29, 2025, 02:58:02 AM »I have project for building web app based using Net Talk on existing desktop app in clarion
18
Web Server - Ask For Help / Re: Uploading files loc:AcceptTypes
« Last post by rjolda on October 19, 2025, 12:43:10 PM »Solved,
'application/jpg,application/png,application/pdf' is the syntax. However, this will limit the files to pick from to those file types.
The user can use "All files' and upload something else. So, they can get around it.
This is where the code above from Osquiabro comes in. If someone overrides the suggested file types and actually uploads something like a BMP file, then his code will intercept it and delete it with a message.
Ron
'application/jpg,application/png,application/pdf' is the syntax. However, this will limit the files to pick from to those file types.
The user can use "All files' and upload something else. So, they can get around it.
This is where the code above from Osquiabro comes in. If someone overrides the suggested file types and actually uploads something like a BMP file, then his code will intercept it and delete it with a message.
Ron
19
Web Server - Ask For Help / Re: Printing Picture on PDF Report very SLOW a- any way to speed up the printing?
« Last post by rjolda on October 19, 2025, 12:37:37 PM »SLow JPG image printing - solved.
I got some insights from folks on discord.
While I used imageEx to shrink original JPG file from 4 MB to 200KB it still printed very slowly.
The answer was to actually change the size of the picture. It was 4080px x 3072 px. I shrunk it down to 408 x 300 and it was the RIGHT size and printed Normally! So the answer for me was taking the original picture and shrinking it to 10% and compressing it with JPG compression to 20 %. Just right!
Ron
I got some insights from folks on discord.
While I used imageEx to shrink original JPG file from 4 MB to 200KB it still printed very slowly.
The answer was to actually change the size of the picture. It was 4080px x 3072 px. I shrunk it down to 408 x 300 and it was the RIGHT size and printed Normally! So the answer for me was taking the original picture and shrinking it to 10% and compressing it with JPG compression to 20 %. Just right!
Ron
20
Web Server - Ask For Help / Re: Uploading files loc:AcceptTypes
« Last post by rjolda on October 13, 2025, 03:19:02 PM »Ahhh,
I see how you are doing this.
Thanks,
Ron
I see how you are doing this.
Thanks,
Ron
Recent Posts