Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be more consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.lang.xharbour / Re: print qr code

Re: print qr code

<4495779c-1f62-42a9-9eae-cf24c766b8a1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16987&group=comp.lang.xharbour#16987

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:6214:23c8:b0:432:e69f:5d77 with SMTP id hr8-20020a05621423c800b00432e69f5d77mr16263542qvb.7.1647247740882;
Mon, 14 Mar 2022 01:49:00 -0700 (PDT)
X-Received: by 2002:ae9:f117:0:b0:67d:4cc2:c9ea with SMTP id
k23-20020ae9f117000000b0067d4cc2c9eamr13433453qkg.29.1647247740705; Mon, 14
Mar 2022 01:49:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Mon, 14 Mar 2022 01:49:00 -0700 (PDT)
In-Reply-To: <fced0652-09cc-4da5-a0f9-a0c52529f046n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=223.229.129.122; posting-account=jZAeNwoAAABYWjMRM-FfqKkHfC3Iph0l
NNTP-Posting-Host: 223.229.129.122
References: <0ce8fa9b-a45f-40e9-9441-232d8f83bda6n@googlegroups.com>
<t0022p$dlt$1@rasp.pasdenom.info> <fced0652-09cc-4da5-a0f9-a0c52529f046n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4495779c-1f62-42a9-9eae-cf24c766b8a1n@googlegroups.com>
Subject: Re: print qr code
From: timecosting@gmail.com (timepro timesheet)
Injection-Date: Mon, 14 Mar 2022 08:49:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 266
 by: timepro timesheet - Mon, 14 Mar 2022 08:49 UTC

On Monday, March 14, 2022 at 1:58:22 PM UTC+5:30, timepro timesheet wrote:
> On Saturday, March 5, 2022 at 9:41:07 PM UTC+5:30, Otto Haldi wrote:
> > Le 03/03/2022 à 08:58, timepro timesheet a écrit :
> > > hi:
> > >
> > > my app is in xhb+ps32+wvw+dbf
> > >
> > > for my outputs to printer/pdf, i use the pagescripts32 lib functions.
> > > how do i print any QRC. (on top right corner of A4 invoices).
> > >
> > > thank you.
> > >
> > >
> > >
> > Here one example for the new Swiss bill:
> >
> > **********************************************************************
> > // Project : PrintTest of the function PsQrCode()
> > // File : PSTestQrCode.prg
> > //
> > **********************************************************************
> >
> >
> > #include "PSCRIPT.CH"
> > #define CRLF Chr(13) + Chr(10)
> >
> >
> >
> > // Procedure ..: Main()
> > FUNCTION Main()
> >
> > Set Century ON
> > SetColor("W+/B")
> > Scroll(0, 0, 24, 79, 0)
> >
> > // Bad programming techniques. Kids, don't do this at home <G> !
> > @0,1 say "PageScript 32 test QrCode" color "14/1"
> > @1,1 say "Initializing the PageScript printer driver. Please wait !"
> >
> > if (nError := PSInit()) == PSE_NOERROR
> > @2,1 say PsGetVersion()
> >
> > @3,1 say "Print to PDF File"
> > PsNewPage()
> > PSSetDevice(DEV_PDFFILE) // DEV_PREVIEW=2 Printer with
> > Print preview, DEV_PDFFILE=3 Print to a PDF File
> > PsSetFileName("TestQrCode1.pdf")
> > AbeeQrCode()
> > PsEndDoc()
> >
> > @4,1 say "Print to PDF Spooler"
> > PsNewPage()
> > PSSetDevice(DEV_PRINTER)
> > PsPrintDialog()
> > AbeeQrCode()
> > PsEndDoc()
> >
> > else
> > do case
> > case nError == PSE_DLLNOTLOADED
> > Alert("PageScript 32 DLL not loaded")
> > case nError == PSE_NOTINITIALIZED
> > Alert("PageScript 32 not initialized")
> > otherwise
> > Alert("Unknown error")
> > endcase
> > endif
> >
> > InKey(4)
> > SetColor("W/N")
> > Scroll(0, 0, 24, 79, 0)
> >
> > Return NIL
> >
> >
> >
> >
> >
> > /*-----------------------------------------------------------------------------
> > Function ...: AbeeQrCode()
> > Description : Show QrCode capabilities
> > Author .....: Otto
> > Date .......: April 2020
> > -----------------------------------------------------------------------------*/
> > Static Function AbeeQrCode()
> > Local QrCode := ""
> >
> >
> > BEGINDOC WITH 0 TITLE "Printing QrCodes" ORIENTATION APS_PORTRAIT
> >
> > PsSetFont(APS_ARIAL, APS_PLAIN, 8)
> > PsSetUnit(APS_MILL)
> >
> > // Test Swiss Payements Standards 2020
> > QrCode := QrCode + "SPC" + CRLF
> > // QRType SPC
> > QrCode := QrCode + "0200" + CRLF
> > // Version 0200
> > QrCode := QrCode + "1" + CRLF
> > // Coding Type 1
> > QrCode := QrCode + "CH4431999123000889012" + CRLF
> > // Konto (IBAN ZE) CH4431999123000889012
> > QrCode := QrCode + "S" + CRLF
> > // Adresstyp (ZE) S
> > QrCode := QrCode + "Robert Schneider AG" + CRLF
> > // Name (ZE) Robert Schneider AG
> > QrCode := QrCode + "Rue du Lac" + CRLF
> > // Strasse oder Adresszeile 1 (ZE) Rue du Lac
> > QrCode := QrCode + "1268" + CRLF
> > // Hausnr. oder Adresszeile 2 (ZE) 1268
> > QrCode := QrCode + "2501" + CRLF
> > // PLZ (ZE) 2501
> > QrCode := QrCode + "Biel" + CRLF
> > // Ort (ZE) Biel
> > QrCode := QrCode + "CH" + CRLF
> > // Land (ZE) CH
> > QrCode := QrCode + CRLF
> > // Adresstyp (EZE)
> > QrCode := QrCode + CRLF
> > // Name (EZE)
> > QrCode := QrCode + CRLF
> > // Strasse oder Adresszeile 1 (EZE)
> > QrCode := QrCode + CRLF
> > // Hausnr. oder Adresszeile 2 (EZE)
> > QrCode := QrCode + CRLF
> > // PLZ (EZE)
> > QrCode := QrCode + CRLF
> > // Ort (EZE)
> > QrCode := QrCode + CRLF
> > // Land (EZE)
> > QrCode := QrCode + "2500.25" + CRLF
> > // Betrag 2500.25
> > QrCode := QrCode + "CHF" + CRLF
> > // Wõhrung CHF
> > QrCode := QrCode + "S" + CRLF
> > // Adresstyp (EZP) S
> > QrCode := QrCode + "Pia-Maria Rutschmann-Schnyder" + CRLF
> > // Name (EZP) Pia-Maria
> > Rutschmann-Schnyder
> > QrCode := QrCode + "Grosse Marktgasse" + CRLF
> > // Strasse oder Adresszeile 1 (EZP) Grosse Marktgasse
> > QrCode := QrCode + "28" + CRLF
> > // Hausnr. oder Adresszeile 2 (EZP) 28
> > QrCode := QrCode + "9400" + CRLF
> > // PLZ (EZP) 9400
> > QrCode := QrCode + "Rorschach" + CRLF
> > // Ort (EZP) Rorschach
> > QrCode := QrCode + "CH" + CRLF
> > // Land (EZP) CH
> > QrCode := QrCode + "QRR" + CRLF
> > // Referenztyp QRR
> > QrCode := QrCode + "210000000003139471430009017" + CRLF
> > // Referenz
> > 210000000003139471430009017
> > QrCode := QrCode + "RG: 123456" + CRLF
> > // Unstrukturierte Mitteilungen
> > QrCode := QrCode + "EPD" + CRLF
> > // Trailer EPD
> > QrCode := QrCode + CRLF
> > // Rechnungsinformationen
> > QrCode := QrCode + "UV;UltraPay005;12345" + CRLF
> > // AV1 - Parameter Name AV1:
> > UV;UltraPay005;12345
> > QrCode := QrCode + "XY;XYService;54321"
> > // AV1 - Parameter Name AV2:
> > XY;XYService;54321
> >
> >
> > // Top of Page
> > PsSetImageQuality(200) // Quality default is 50
> > PsTextOut(20,10,"Swiss Payment
> > Standards",,,APS_ARIAL,14,APS_BOLD,APS_BLUE)
> > PsTextOut(30,10,"Printet with the help of PageScript32",,,APS_ARIAL,12)
> > PsTextOut(35,10,"Version : ",,,APS_ARIAL,12)
> > PsTextOut(35,40,PSGetVersion(),,,APS_ARIAL,12,,APS_RED)
> >
> > PsTextOut(40,10,"Layout created by Otto Haldi",,,APS_ARIAL,12)
> > PsTextOut(45,10,"8 Januar 2022",,,APS_ARIAL,12)
> >
> > PsBitmap(60,10,,93.5,"images/LogoAbee.bmp")
> >
> > PsTextOut(180,10,"Layout of the payment part and
> > receipt",,,APS_ARIAL,12)
> >
> >
> > pLn = 192
> > // Drucken Zahlteil
> > PsQrCode(pLn+17-6,67-6,QrCode,1,242,4)
> > PsBitmap(pLn+36.5,86.5,,93.5,"images/PrFlag.bmp")
> >
> > PsLine(pLn,5,pLn,205,0.3,APS_BLACK)
> > PsLine(pLn,62,pLn+100,62,0.3,APS_BLACK)
> >
> > PsTextOut(pLn+5,67,"Zahlteil",,,APS_ARIAL,11,APS_BOLD)
> > PsTextOut(pLn+68,67,"Wõhrung",,,APS_ARIAL,8,APS_BOLD)
> > PsTextOut(pLn+68,82,"Betrag",,,APS_ARIAL,8,APS_BOLD)
> > PsTextOut(pLn+72,67,"CHF",,,APS_ARIAL,10)
> > PsTextOut(pLn+72,82,"2500.25",,,APS_ARIAL,10)
> >
> > PsTextOut(pLn+88,67,"Name AV1:",,,APS_ARIAL,7,APS_BOLD)
> > PsTextOut(pLn+88,81,"UV;UltraPay005;12345",,,APS_ARIAL,7)
> > PsTextOut(pLn+91,67,"Name AV2:",,,APS_ARIAL,7,APS_BOLD)
> > PsTextOut(pLn+91,81,"XY;XYService;54321",,,APS_ARIAL,7)
> >
> >
> > PsTextOut(pLn+5,118,"Konto / Zahlbar an",,,APS_ARIAL,8,APS_BOLD)
> > PsTextOut(pLn+9,118,"CH44 3199 9123 0008 8901 2",,,APS_ARIAL,10)
> > PsTextOut(pLn+13,118,"Robert Schneider AG",,,APS_ARIAL,10)
> > PsTextOut(pLn+17,118,"Rue du Lac 1268",,,APS_ARIAL,10)
> > PsTextOut(pLn+21,118,"2501 Biel",,,APS_ARIAL,10)
> >
> > PsTextOut(pLn+28,118,"Referenz",,,APS_ARIAL,8,APS_BOLD)
> > PsTextOut(pLn+32,118,"21 00000 00003 13947 14300 09017",,,APS_ARIAL,10)
> >
> > PsTextOut(pLn+39,118,"Zusõtzliche Informationen",,,APS_ARIAL,8,APS_BOLD)
> > PsTextOut(pLn+43,118,"Bestellung No. 123456",,,APS_ARIAL,10)
> >
> > PsTextOut(pLn+58,118,"Zahlbar durch",,,APS_ARIAL,8,APS_BOLD)
> > PsTextOut(pLn+62,118,"Pia-Maria Rutschmann-Schnyder",,,APS_ARIAL,10)
> > PsTextOut(pLn+66,118,"Grosse Marktgasse 28",,,APS_ARIAL,10)
> > PsTextOut(pLn+70,118,"9400 Rorschach",,,APS_ARIAL,10)
> >
> >
> > // Drucken Emfangsschein
> > PsTextOut(pLn+5,5,"Empfangsschein",,,APS_ARIAL,11,APS_BOLD)
> > PsTextOut(pLn+12,5,"Konto / Zahlbar an",,,APS_ARIAL,6,APS_BOLD)
> > PsTextOut(pLn+15,5,"CH44 3199 9123 0008 8901 2",,,APS_ARIAL,8)
> > PsTextOut(pLn+18,5,"Robert Schneider AG",,,APS_ARIAL,8)
> > PsTextOut(pLn+21,5,"Rue du Lac 1268",,,APS_ARIAL,8)
> > PsTextOut(pLn+24,5,"2501 Biel",,,APS_ARIAL,8)
> >
> > PsTextOut(pLn+31,5,"Referenz",,,APS_ARIAL,6,APS_BOLD)
> > PsTextOut(pLn+34,5,"21 00000 00003 13947 14300 09017",,,APS_ARIAL,8)
> >
> > PsTextOut(pLn+40,5,"Zahlbar durch",,,APS_ARIAL,6,APS_BOLD)
> > PsTextOut(pLn+43,5,"Pia-Maria Rutschmann-Schnyder",,,APS_ARIAL,8)
> > PsTextOut(pLn+46,5,"Grosse Marktgasse 28",,,APS_ARIAL,8)
> > PsTextOut(pLn+49,5,"9400 Rorschach",,,APS_ARIAL,8)
> >
> > PsTextOut(pLn+68,5,"Wõhrung",,,APS_ARIAL,6,APS_BOLD)
> > PsTextOut(pLn+68,18,"Betrag",,,APS_ARIAL,6,APS_BOLD)
> > PsTextOut(pLn+72,5,"CHF",,,APS_ARIAL,8)
> > PsTextOut(pLn+72,18,"2500.25",,,APS_ARIAL,8)
> >
> > PsTextOut(pLn+80,40,"Annahmestelle",,,APS_ARIAL,7,APS_BOLD)
> >
> > ENDDOC
> >
> > Return NIL
> thanks otto:
>
> is PsQrCode(pLn+17-6,67-6,QrCode,1,242,4) an inbuilt function of ps32 or is it a separate coded func by you?

ok. the func is included in the newer ps32 version. i hadn't updates ps32 during covid period.
-has the newer version done away with the in-built preview window?

SubjectRepliesAuthor
o print qr code

By: timepro timesheet on Thu, 3 Mar 2022

4timepro timesheet
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor