Base64 to PDF

Post Reply
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Base64 to PDF

Post by mtajkov »

I use:

cPdf = HB_BASE64DECODE( cTxt )
MEMOWRIT( "Test.Pdf", cPdf, .F. )

wherein cTxt:

Code: Select all | Expand

JVBERi0xLjUNCjIgMCBvYmoNCjw8IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlIC9MZW5ndGggMTYyMzcgL0xlbmd0aDEgMjgxNDAgPj4NCnN0cmVhbQ0KeAHtvAk8Vd3bN34kKUOpiCadoig5nPmIaDKHKFOGypAppExFNFEhiUplKpLKlMxDRUiGJmMRMpQoQsUp4r3WRnc0/bqf5/n/38/zeavT3nvtYX3XNV/XWns7cHOQSZIEMgkvCX/pkgQGHU+iUglkOp5OpRGkaHhTW26OdcrcHBK6eAqJAVslvBQVNus34yW0FNfB3rpN6/HohDLecY+TOTQo4A0kNqzfYsTNobyBm2P42fBLHI+KgrICjoUFh2OBv7jhOtx6HOukSegfKyvrZPjHNpWNbfJkNg529ilTuTi4uDg5ODm5p8/i4Z4+czonJ88cnpmzefn4+Lhm8AvM4RWYxcvHix7Cwgr3TGabxsY2jZebk5v3r/8M5+JmTsVtY4ljZVmCmzSThXUmy3ABbhHgZGPB/uBG/7BMYp3MNoV96jQOTrgglQc3iYWVddJkVoQarj4A53GTZ7LNWkxcO2W25g72JQ68pEOnL08VWpeUx6f1tFuYbLLn8DSOOfwCc+ctXSYiunwFhUqjM6RWrd8gr6CopKyyeYu2jq6e/lZTM/OdFpZW1nsdnZxdXPftP3LUy/vY8RM+gUFnzp4LPn/hYmTUleirMdeu37iVnJKalp6RmXUvv6DwftGD4pLyisqq6ppnz2ubmltaX71ue9Pe0dP74eOnvn7m5y8AexELjhUbFfpvZGCA+/txzYRxTZo8mXUyO9vkyTiWSS7wY505mW0xccqstZrsOxxmLyEdmsq77vTlpLxpQmStbj6TPU855ghTmpb2oKFhI/vPBnb4X42seWxg/4yrFsfFyoKbNJN1Jk4O93V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G9iag0KMTUgMCBvYmoNCjw8DQovVHlwZSAvQ2F0YWxvZw0KL1BhZ2VzIDEgMCBSDQovUGFnZU1vZGUgL1VzZU5vbmUNCi9WaWV3ZXJQcmVmZXJlbmNlcyA8PA0KL0Rpc3BsYXlEb2NUaXRsZSB0cnVlDQovUHJpbnRTY2FsaW5nIC9Ob25lDQo+Pg0KPj4NCmVuZG9iag0KeHJlZg0KMCAxNg0KMDAwMDAwMDAwMCA2NTUzNSBmDQowMDAwMDIwMjUxIDAwMDAwIG4NCjAwMDAwMDAwMTAgMDAwMDAgbg0KMDAwMDAxODMzNCAwMDAwMCBuDQowMDAwMDIwMTA0IDAwMDAwIG4NCjAwMDAwMTYzNDIgMDAwMDAgbg0KMDAwMDAxNjU0NSAwMDAwMCBuDQowMDAwMDE2ODExIDAwMDAwIG4NCjAwMDAwMTc1MDUgMDAwMDAgbg0KMDAwMDAxNzU4NCAwMDAwMCBuDQowMDAwMDE4NDc0IDAwMDAwIG4NCjAwMDAwMTg3NTIgMDAwMDAgbg0KMDAwMDAxOTM4NiAwMDAwMCBuDQowMDAwMDE5NDY2IDAwMDAwIG4NCjAwMDAwMjAzMTYgMDAwMDAgbg0KMDAwMDAyMDg3NCAwMDAwMCBuDQp0cmFpbGVyDQo8PA0KL1NpemUgMTYNCi9Sb290IDE1IDAgUg0KL0luZm8gMTQgMCBSDQovSUQgWzw1Yzc0ZTE5MTI2Zjk5YjYwYTdjMjA3NGFkZGU1ODRjOT48NWM3NGUxOTEyNmY5OWI2MGE3YzIwNzRhZGRlNTg0Yzk+XQ0KPj4NCnN0YXJ0eHJlZg0KMjEwMjENCiUlRU9GDQo=
I don't get the correct pdf?

if the same cTxt I decode in https://base64.guru/converter/decode/pdf I get the correct PDF.

Best regards,
Miloš
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
User avatar
cnavarro
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Base64 to PDF

Post by cnavarro »

This run Ok for me

Code: Select all | Expand


#include "Fivewin.ch"

Function Main()

   local cTxt := hb_MemoRead( "decode64.txt" )
   local cPdf := HB_BASE64DECODE( cTxt )
   hb_MEMOWRIT( "Test.Pdf", cPdf, .F. )

Return nil

 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Base64 to PDF

Post by mtajkov »

I am using xHarbour build 1.2.1, function HB_MEMOREAD() does not exist. I guess the problem might be in MEMOREAD()?

Best regards,
Miloš
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
User avatar
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Base64 to PDF

Post by Antonio Linares »

Dear Miloš,

Yes, as memoWrit() adds an extra HB_CHAR_EOF character

Use SubStr() to remove it when reading the saved string
regards, saludos

Antonio Linares
www.fivetechsoft.com
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Base64 to PDF

Post by mtajkov »

This is my code:

Code: Select all | Expand

Function test()

    LOCAL cFileName := cGetFile("*.txt", "Izaberi TXT" )
    LOCAL cPdf

    cTxt=MemoRead(cFileName) //[b]I check this cTxt on https://base64.guru/converter/decode/pdf[/b]

      cPdf = HB_BASE64DECODE( cTxt )

   return
 
cPdf:

Code: Select all | Expand

%PDF-1.5
2 0 obj
<< /Filter /FlateDecode /Length 16237 /Length1 28140 >>
stream
xíĽ  <UÝŰ7~$)C©ˆ&ť˘(9śůˆh2‡(S†Ę)¤LE4Q!‰Je*’Ę”ĚCEH†&c2”(BĹ)â˝ÖFw4ýşźçů˙ßĎóy«ÓŢ{ía}×5_×Z{;psI’2  /   é’O˘R   d:žNĄ¤hxS[nŽuĘÜşx
‰[%Ľ6ë7ă%´×ÁŢşMëńč„2ŢqŹ“94(ŕ
$6¬ßbÄ͡Ľ›cřŮđKŹŠ‚˛Ž…‡cż¸á:Üzë¤Ič++ëdřÇ6•Ťmňd6vö)Są8¸¸8989ą§Ďâáž>s:''Ďž™łyůřř¸fđ
Ěá˜ĹËÇ‹ÂÂ
÷Lf›ĆĆ6Ť—›“›÷Ż˙çâfNĹmc‰ceY‚›4“…u&ËpnŕdcÁţŕF˙°LbťĚ6…}ę4N¸ • 7‰…•uŇdV„®
I think the function HB_BASE64DECODE( cTxt ) does not give a good result?

Best Regards,
Miloš
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
User avatar
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Base64 to PDF

Post by Antonio Linares »

This is working fine using Harbour and fails using xHarbour:

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   local cPdf := memoRead( "fwintro.pdf" )
   local cText

   cText = hb_base64Encode( cPdf )  // xHarbour fails here
   MsgInfo( Len( cText ) )

   memoWrit( "encoded.txt", cText )

   cText = SubStr( memoRead( "encoded.txt" ), 1, Len( memoRead( "encoded.txt" ) ) - 1 )
   MsgInfo( Len( hb_base64Decode( cText ) ) )
   memoWrit( "fwintro2.pdf", hb_base64Decode( cText ) )

   ShellExecute( 0, "open", "fwintro2.pdf" )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Base64 to PDF

Post by mtajkov »

Antonio,

Works with xHarbour xHarbour 1.2.3 Intl. (SimpLex) (Build 20201212) but not with xHarbour build 1.2.1 Intl. (SimplLex) (Rev. 9382). I have to use xHarbour build 1.2.1 Intl. (SimplLex) (Rev. 9382)?
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
User avatar
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Base64 to PDF

Post by Antonio Linares »

Dear Milos,

Then you have to compare the source code of both xHarbour builds and check the differences and implement your own modified functions
regards, saludos

Antonio Linares
www.fivetechsoft.com
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Base64 to PDF

Post by mtajkov »

Thank you Antonio...

I found it on the forum, it works great:

https://www.fivetechsupport.com/forums/ ... =0#p206651
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
User avatar
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Base64 to PDF

Post by Antonio Linares »

very good!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Base64 to PDF

Post by Enrico Maria Giordano »

Antonio Linares wrote:Dear Miloš,

Yes, as memoWrit() adds an extra HB_CHAR_EOF character

Use SubStr() to remove it when reading the saved string
It is not required. Just add the third parameter to MEMOWRIT():

Code: Select all | Expand

MEMOWRIT( cFile, cString, .F. )
to not add the EOF character.
User avatar
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Base64 to PDF

Post by Antonio Linares »

Many thanks Enrico! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
cnavarro
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Base64 to PDF

Post by cnavarro »

mtajkov wrote:I use:

cPdf = HB_BASE64DECODE( cTxt )
MEMOWRIT( "Test.Pdf", cPdf, .F. )

[/code]

I don't get the correct pdf?

if the same cTxt I decode in https://base64.guru/converter/decode/pdf I get the correct PDF.

Best regards,
Miloš
look at the first post
So I think the problem has nothing to do with the MemoWrit function
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
nageswaragunupudi
Posts: 10691
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Base64 to PDF

Post by nageswaragunupudi »

Long time back, I was using my own functions

Code: Select all | Expand

GN_BASE64ENCODE
GN_BASE64DECODE
GN_BASE64URL
I am posting one of my old programs here.
You may check if my old functions work correctly for you.

Code: Select all | Expand

/*
*
*  BASE64.prg
*  May 02-2013 01:50 PM
*
*/

#include "FiveWin.Ch"


#ifdef __XHARBOUR__
#xtranslate HB_BASE64ENCODE( <c> ) => HB_BASE64( <c>, Len( <c> ) )
#endif

#ifdef TEST

//----------------------------------------------------------------------------//

function Main()

   local oDlg, cStr, oFont, cEnc, cDec, cEncH, cDecH, oEncUrl, oDecUrl
   local oStr, oEnc, oDec, oEncH, oDecH, cEncUrl, cDecUrl

//   FW_SetUnicode( .t. )

   test()
   return nil

   cStr := cEnc := cDec := cEncH := cDecH := cEncUrl := cDecUrl := ""

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12

   DEFINE DIALOG oDlg SIZE 900,700 PIXEL TRUEPIXEL FONT oFont ;
      TITLE FWVERSION + " BASE64 and BASE64URL"

   @  20, 20 GET cStr MEMO SIZE 660,080 PIXEL OF oDlg

   @  20,700 BTNBMP PROMPT "Encode" SIZE 180,30 PIXEL OF oDlg FLAT ;
      ACTION ( cEnc  := GN_BASE64ENCODE( Trim( cStr ) ), oEnc:Refresh(), ;
               cDec  := GN_BASE64DECODE( cEnc ), oDec:Refresh(), ;
               cEncH := HB_BASE64ENCODE( Trim( cStr ) ), oEncH:Refresh(), ;
               cDecH := HB_BASE64DECODE( cEncH ), oDecH:Refresh(), ;
               cEncUrl := GN_BASE64URL( Trim( cStr ) ), ;
               cDecUrl := GN_BASE64DECODE( cEncUrl ), ;
               oDlg:Update()  )

   @ 130, 20 SAY "GNR"     SIZE 400,20 PIXEL OF oDlg CENTER
#ifdef __XHARBOUR__
   @ 130,480 SAY "xHarbour" SIZE 400,20 PIXEL OF oDlg CENTER
#else
   @ 130,480 SAY "Harbour" SIZE 400,20 PIXEL OF oDlg CENTER
#endif

   @ 150, 20 SAY "BASE64" SIZE 100,16 PIXEL OF oDlg

   @ 170, 20 GET oEnc VAR cEnc MEMO ;
      SIZE 400,100 PIXEL OF oDlg UPDATE READONLY

   @ 290, 20 GET oDec VAR cDec MEMO ;
      SIZE 400,100 PIXEL OF oDlg UPDATE READONLY

   @ 170, 480 GET oEncH VAR cEncH MEMO ;
      SIZE 400,100 PIXEL OF oDlg UPDATE READONLY

   @ 290, 480 GET oDecH VAR cDecH MEMO ;
      SIZE 400,100 PIXEL OF oDlg UPDATE READONLY

   @ 200, 430 SAY If( cEnc == cEncH, "==", "<>" ) SIZE 40,20 PIXEL CENTER OF oDlg UPDATE

   @ 320, 430 SAY If( cDec == cDecH, "==", "<>" ) SIZE 40,20 PIXEL CENTER OF oDlg UPDATE

   @ 410,  20 SAY If( cDec == Trim( cStr ), "MATCHES WITH INPUT", "DOES NOT MATCH WITH INPUT" ) ;
      SIZE 400,20 PIXEL CENTER OF oDlg UPDATE

   @ 410, 480 SAY If( cDecH == Trim( cStr ), "MATCHES WITH INPUT", "DOES NOT MATCH WITH INPUT" ) ;
      SIZE 400,20 PIXEL CENTER OF oDlg UPDATE

   @ 440, 20 SAY "GN_BASE64URL" SIZE 100,16 PIXEL OF oDlg

   @ 480,  20 GET oEncUrl VAR cEncUrl MEMO SIZE 400,100 PIXEL OF oDlg UPDATE READONLY
   @ 480, 480 GET oDecUrl VAR cDecUrl MEMO SIZE 400,100 PIXEL OF oDlg UPDATE READONLY

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return (0)

#endif

//----------------------------------------------------------------------------//

function GN_BASE64URL( cData )

   local cEnc  := GN_BASE64ENCODE( cData )

   cEnc  := StrTran( StrTran( cEnc, '+', '-' ), '/', '_' )
   cEnc  := RemRight( cEnc, '=' )

return cEnc

//----------------------------------------------------------------------------//

function GN_BASE64ENCODE( cData )

   local cRet  := ''

   do while Len( cData ) > 0 //! Empty( cData )
      cRet     += EncodeSub( Left( cData, 3 ) )
      cData    := SubStr( cData, 4 )
   enddo

return cRet

//----------------------------------------------------------------------------//

static function EncodeSub( cData )

   static cRef := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

   local cIn      := Left( cData + Chr( 0 ) + Chr( 0 ), 3 )
   local n, x, i
   local cOut     := ""

   n     := Asc( SubStr( cIn, 1, 1 ) ) * 256 * 256 + ;
            Asc( SubStr( cIn, 2, 1 ) ) * 256 + ;
            Asc( SubStr( cIn, 3, 1 ) )

   for i := 1 to 4
      x     := n % 64 + 1
      cOut  := SubStr( cRef, x, 1 ) + cOut
      n     := Int( n / 64 )
   next

   if Len( cData ) == 1
      cOut  := Left( cOut, 2 ) + "=="
   elseif Len( cData ) == 2
      cOut  := Left( cOut, 3 ) + "="
   endif

return cOut

//----------------------------------------------------------------------------//

//----------------------------------------------------------------------------//

function GN_BASE64DECODE( cIn )

   local cOut  := ""

   cIn   := StrTran( StrTran( cIn, '-', '+' ), '_', '/' )

   do while Len( cIn ) > 0 //! Empty( cIn )
      cOut  += b64_sub( Left( cIn, 4 ) )
      cIn   := SubStr( cIn, 5 )
   enddo

return cOut

//----------------------------------------------------------------------------//

static function b64_sub( c4 )

   static cRef := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

   local a,b,c,d
   local x,y,z
   local cRet

   c4 := Left( c4 + "==", 4 )
   a  := At( SubStr( c4, 1, 1 ), cRef ) - 1
   b  := At( SubStr( c4, 2, 1 ), cRef ) - 1
   c  := At( SubStr( c4, 3, 1 ), cRef ) - 1
   d  := At( SubStr( c4, 4, 1 ), cRef ) - 1

   x  := a * 4
   x  += Int( b / 16 )
   if c == -1
      return Chr( x )
   endif
   b  := b % 16
   y  := b * 16
   y  += Int( c / 4 )
   if d == -1
      return Chr( x ) + Chr( y )
   endif
   c  := c % 4
   z  := c * 64
   z  += d

return Chr( x ) + Chr( y ) + Chr( z )

//----------------------------------------------------------------------------//

func test()

   local x := { 14, 209, 33, 83, 121, 99, 108, 72, 60, 47, 127, 21, 88, 7, 212, 2, 163, 178, 40, 3, 58, 249, 124, 126, 23, 129, 154, 195, 22, 158, 166, 101}
   local y := { 197, 10, 7, 211, 140, 60, 112, 229, 216, 241, 45, 175, 8, 74, 84, 128, 166, 101, 144, 197, 242, 147, 80, 154, 143, 63, 127, 138, 131, 163, 84, 213 }

   local r  := ""
   local s  := ""

   aeval( x, { |n| r += chr(n) } )
   aeval( y, { |n| s += chr(n) } )

   ? STRTOHEX( r + s )
   ? GN_BASE64URL( r + s )

return nil
 
Regards

G. N. Rao.
Hyderabad, India
Post Reply