Step 4 of 4: Running the Application

In this step, you will run the application and view the PDF  document you created. Complete the following steps:

1.   From the Debug menu, select Start Debugging to view the application in the Windows Phone Emulator.

2.   Click the Create PDF button to creat and display a PDF file. The application will appear similar to the following:

 

 

The code creates a Font object and calls the C1PdfDocument.DrawString method to write "Hello World!" on the page. This is exactly what you would do if you were writing to a Graphics object in .NET and is what makes PDF for Windows Phone so easy to use.

One important thing to remember is that PDF for Windows Phone uses a point-based coordinate system with the origin at the top-left corner of the page. This is similar to the default coordinate system used by .NET, but is different from the default PDF coordinate system (where the origin is on the bottom-left corner of the page). In this example, the top left point of the "H" in "Hello World" is located at [1,1].

Because the coordinate system is based on points, rather than pixels, PDF for Windows Phone uses Rect, SizeF, and PointF structures, which have members of type float, rather than Rectangle, Size, and Point, which have members of type int.

Congratulations! You have completed the PDF for Windows Phone quick start tutorial.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.