Question How to decrease my output files' font size ?

Stefan

Well-Known Member
Code:
OUTPUT TO "small.html".
PUT UNFORMATTED
   '<html><body><font size="0.1em">cannot compute, need more input!</font></body></html>'.
OUTPUT CLOSE.
OS-COMMAND SILENT( "small.html" ).
 

David Tan

New Member
Code:
OUTPUT TO "small.html".
PUT UNFORMATTED
  '<html><body><font size="0.1em">cannot compute, need more input!</font></body></html>'.
OUTPUT CLOSE.
OS-COMMAND SILENT( "small.html" ).


If output to .pdf or .txt file, can you show how to write the syntax, your kind will be very appreciated.
 

Stefan

Well-Known Member
If output to .pdf or .txt file, can you show how to write the syntax, your kind will be very appreciated.
  1. .txt file does not have any font information, so how can you change something which is not there?
  2. how are you creating your pdf? I'm happy to post another silly bit of code that will create a pdf with a small font size - but it will not help you.
 

mayank

Member
  1. .txt file does not have any font information, so how can you change something which is not there?
  2. how are you creating your pdf? I'm happy to post another silly bit of code that will create a pdf with a small font size - but it will not help you.


Hi Stefan,

Please send me that source code to create the pdf file....

Thanks in advance.

Best Regards,

Mayank Sharma
 

Stefan

Well-Known Member
Code:
OUTPUT TO "small.pdf".
 
PUT UNFORMATTED 
   "%PDF-1.4" SKIP( 1 )
   .
PUT UNFORMATTED 
   "1 0 obj" SKIP
   "<< /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >>" SKIP
   "endobj" SKIP( 1 )
   .
PUT UNFORMATTED 
   "2 0 obj" SKIP
   "<< /Type /Outlines /Count 0 >>" SKIP
   "endobj" SKIP( 1 )
   .
PUT UNFORMATTED 
   "3 0 obj" SKIP
   "<< /Type /Pages /Kids [ 4 0 R ] /Count 1 >>" SKIP
   "endobj" SKIP( 1 )
   .
PUT UNFORMATTED 
   "4 0 obj" SKIP
   "<< /Type /Page /Parent 3 0 R /Resources << /Font << /F1 5 0 R >>  >> /MediaBox [0 0 595 842] /Contents 6 0 R >>" SKIP
   "endobj" SKIP( 1 )
   .
PUT UNFORMATTED 
   "5 0 obj" SKIP 
   "<< /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >>" SKIP
   "endobj" SKIP( 1 )
   .
PUT UNFORMATTED 
   "6 0 obj" SKIP
   "<< /Length 495 >>" SKIP
   "stream" SKIP
   "BT /F1 4 Tf 222 756 Td (this is silly too) Tj ET" SKIP
   "endstream" SKIP
   "endobj" SKIP( 1 )
   .
PUT UNFORMATTED 
   "trailer" SKIP
   "<< /Size 6 /Root 1 0 R >>" SKIP
   "%%EOF" SKIP( 1 )
   .
 
OUTPUT CLOSE.
OS-COMMAND SILENT( "small.pdf" ).

:p
 

TomBascom

Curmudgeon
DISPLAY statements are agnostic about fonts. Fonts are an attribute of an output device.

If this is related to your "chit chat" question you might want to repost those details so that actual QAD users might be able to help you.
 
Hello Everyone, hope you all are well.

Can i send data directly to file using OUTPUT TO and create PDF file. i tried the similar code as above and got error message: File corrupt.

Please Suggest.

Thanks & Regards!
Rajat.
 

TomBascom

Curmudgeon
Output files do not have fonts or font sizes. A file is just a collection of bits.

Devices that print or display data have fonts and font sizes (and many other interesting attributes).

Controlling the font that a user sees is a function of the device that the data is being viewed on.

In many (but not all) cases the file format can be used to provide helpful information about fonts and other display characteristics to the device. Often this information is mediated by an intervening bit of software -- such as a web browser, a PDF viewer, a print driver or a terminal emulator.

The specifics depend entirely on the type of file being created and the device that it is being displayed upon.

Progress does some rudimentary support for screen devices via protermcap on UNIX and GUI specific widgets for Windows.

The only nods that Progress makes to printers are newlines and form-feeds.

Beyond that you need to research the target device, whatever software you plan to use to deliver the data to that device, and the specific format needed to get the results that you are looking for. Progress will then allow you to create an appropriate output file -- but there is no magical one size fits all pre-built solution.
 
Top