You can create a Rectangle object and set its BackgroundColor property. Use your Rectangle to initialize your Document.
Public Class Chap0102
Public Shared Sub Main()
Console.WriteLine("Chapter 1 example 2: PageSize")
' step 1: creation of a document-object
Dim pageSize As New Rectangle(144, 720)
pageSize.BackgroundColor = New Color(&Hff, &Hff, &Hde)
'// pageSize.BackgroundColor.BackgroundColor = BaseColor.WHITE
Dim document As New Document(pageSize)
' step 2:
' we create a writer that listens to the document
' and directs a PDF-stream to a file
PdfWriter.getInstance(document, New FileStream("Chap0102.pdf", FileMode.Create))
' step 3: we open the document
' step 4: we Add some paragraphs to the document
For i As Integer = 0 To 4
document.Add(New Paragraph("Hello World"))
Catch de As DocumentException
Catch ioe As IOException
' step 5: we close the document
Give it a try.
If you are one of the millions of people who have suffered a browser hijacking, you likely know it, and you clearly remember what you were doing when it happened. The best known form of browser hijacking is when a sudden flood of pop-ups, many of them obscene, explode over your screen and you are forced to use the CTRL-ATL-DEL sequence to close your browser and regain control of your computer.
Continue reading “What are browser hijackers?”
If you have, or are planning to have web servers connected to your network, you will need to consider the security implications
Continue reading “Web Servers and Firewall Zones”
This article demonstrates how to call Nest API from .NET using FirebaseSharp, an unofficial open source Firebase.NET client.
To follow along and test drive Nest API you do not need to own a Nest device, a simulator is available. Continue reading “How to use the NEST API using FirebaseSharp”
Most of you only know that TelNet is a Port ( Port 23 ) or that TelNet is a Remote Control Tool. Remote Control means in this aspect that you as Client can get a Connection to for example a TelNet Server and then you can write Commands in a derivative of a Shell and this commands are executed only on this server not on your machine. But I want to show all you guys how to use this simple Remote Control Tool in several ways, because this simpleness is brilliant. Continue reading “How to use Telnet”
This section explains some of the basics of doing math in Assembly language. There are several hardware and software tricks that can be used to perform math calculations as quickly as possible. This section discusses bit level multiplication with shifts and adds. Continue reading “Assembly Language: Easy Math”
This section has a set of code examples for writing character data to a PC in 80 character by 25 line mode. The first routine will check the video mode, and if it is a standard mode, the code returns with a no carry condition and starts using the standard video BIOS routines to perform the requested functions. These routines provide many code entry points where other programs may call in. Before using any of the video routines, the program must call the reset_video routine to initialize and make ready the other video calls. Some of the video display routines will respond to video display escape codes. Most of the escape codes deal with standard cursor control functions. There is an example of table selection jumping code.
Most computers use a raster graphics video system. The data is sent to the monitor as rows from left to right that are arranged from top to bottom. The first data bit sent goes to the upper left corner and the last data bit in a frame goes to the lower right corner. When addressing video RAM, the memory may be divided into rows that can be divided into columns. A fundamental understanding of this system is necessary when translating a row and column position into the actual video RAM address for a character or pixel location.
Continue reading “Assembly Language: Video Character Interface”