Post by code on May 7, 2020 9:09:13 GMT
Hi,
Here the code to make a ugly ,pdf.
The code is free to use/modify/spread.
Here the code :
Here the code to make a ugly ,pdf.
The code is free to use/modify/spread.
Here the code :
nomainwin
WindowWidth=800
WindowHeight=600
button #scr, "Make ugly pdf and run... ", [b1], UL, 550, 500
texteditor #scr.te, 10, 10, 600, 450
open "Ugly pdf..." for graphics_nsb as #scr
print #scr.te, "Type here some text..."
print #scr, "fill darkred"
print #scr, "flush"
wait
[b1]
print #scr.te, "!lines cl" ;
open "test.pdf" for output as #tf
print #tf,"%PDF-1.1"
print #tf,"%????"
print #tf,"1 0 obj"
print #tf,"<<"
print #tf,"/Kids [2 0 R]"
print #tf,"/Type /Pages"
print #tf,"/Count 1"
print #tf,">>"
print #tf,"endobj"
print #tf,"2 0 obj"
print #tf,"<<"
print #tf,"/Rotate 0"
print #tf,"/Parent 1 0 R"
print #tf,"/MediaBox [0 0 792 612]"
print #tf,"/Resources 3 0 R"
print #tf,"/Type /Page"
print #tf,"/Contents [4 0 R]"
print #tf,">>"
print #tf,"endobj"
print #tf,"3 0 obj "
print #tf,"<<"
print #tf,"/Font"
print #tf,"<<"
print #tf,"/F0"
print #tf,"<<"
print #tf,"/BaseFont /Arial"
print #tf,"/Subtype /Type1"
print #tf,"/Type /Font"
print #tf,">>"
print #tf,">>"
print #tf,">>"
print #tf,"endobj "
print #tf,"4 0 obj "
print #tf,"<<"
print #tf,"/Length 121"
print #tf,">>"
print #tf,"stream"
print #tf,"0.5 g"
print #tf,"BT"
print #tf,"/F0 40 Tf"
print #tf,"1 0 0 1 60 550 Tm"
print #tf,"40 TL"
print #tf,"() Tj T*"
for i = 0 to cl step 1
print #scr.te, "!line ";i;" linete$" ;
print #tf,"2 Tr"
print #tf,"(";linete$;") Tj T*"
next i
print #tf,"ET"
print #tf,"0.8 0 0 rg"
print #tf," 10 510 m"
print #tf," 60 510 l"
print #tf," 60 10 l"
print #tf," 10 10 l"
print #tf," f"
print #tf,"endstream"
print #tf,"endobj"
print #tf,"5 0 obj"
print #tf,"<<"
print #tf,"/Pages 1 0 R"
print #tf,"/Type /Catalog"
print #tf,">>"
print #tf,"endobj xref"
print #tf,"0 6"
print #tf,"0000000000 65535 f"
print #tf,"0000000015 00000 n"
print #tf,"0000000074 00000 n"
print #tf,"0000000192 00000 n"
print #tf,"0000000291 00000 n"
print #tf,"0000000466 00000 n"
print #tf,"trailer"
print #tf,""
print #tf,"<<"
print #tf,"/Root 5 0 R"
print #tf,"/Size 6"
print #tf,">>"
print #tf,"startxref"
print #tf,"516"
print #tf,"%%EOF"
close #tf
b$ = "test.pdf"
RUN "rundll32.exe url.dll,FileProtocolHandler ";b$
wait