Skip to content

Author: Javier Menendez

PDFDocument Improvements

While PDFTable and PDFDataTableSource ease the way to render tables in your PDF documents on Desktop, Web, Raspberry Pi and Console projects (iOS to come!) and are the big new features for PDFDocument in Xojo 2022r3, that’s not all that improved. There are additional features added to PDFDocument you might find helpful such as more control while using PDFForm and improvements to dealing with TOC indexes. Learn more about how to get advantage of these additions!

Comments closed

Rotate that Picture!

Sometimes we need to rotate a Picture from portrait to landscape and vice versa. Since the introduction of the Graphics methods Translate and Rotate this is pretty simple to do! Continue reading and I will show you how to create a Method Extension for the Picture class that will be able to do that. This will work on Desktop and iOS projects by only copying and pasting the code, but you will need to make some changes to the example project for the Web version because of the need to convert Picture to WebPicture and back.

Comments closed

PDFDocument: How to Add New Content to a Given Page

When we create a PDF document is impossible (in most of the cases) to anticipate how many pages it will have. And yet, that is something that we are going to need if, for example, we want to add a footer reflecting the current page number over the total of pages in the document. The solution is using the PageCount and CurrentPage properties in the PDFDocument class.

Comments closed

Graphics: Right and Center Aligned Text

The DrawText method from the Graphics class offers a simple way to left-align text at the given X and Y coordinates, even applying a wrap value to wrap every line of the text block at the provided width value. Wouldn’t it be great to be able to do the same thing while aligning blocks of text to the right and center? Continue reading and I will show you a technique you can use as the starting point which you can fine-tune to your specific needs.

Comments closed

PDFDocument: Reports With Full Vectorial Quality

Back in 2020 when PDFDocument was first introduced in Xojo, we had to make a compromise in order to render the output created via Xojo’s integrated Report Editor. That was far from ideal, but we needed to first meet some other requirements in order to get the full vectorial quality you expect in both PDFs as well as in rendering reports.

With Xojo 2022r1 I am happy to say we have achieved that goal! The best part is that you don’t need to do anything to take advantage of the update. Keep your code as it is now and, the next time you output your report into a PDF document you’ll get the full vectorial quality you expect!

Comments closed