Create PDF Kifus With SGF2PDF

Czech developer Daniel Maslo has created a handy web application that converts SGFs into PDF kifus. Called SGF2PDF, Maslo’s program generates one-page game records that are easy to share and print, making it ideal for offline game reviews. I have tested SGF2PDF and it functions as advertised.

SGF2PDF works in a simple two-step process: users select the target SGF file, then click “create PDF kifu.” The converter then automatically downloads the PDF to the user’s computer. Behind the scenes, things get a little more complex. SGF2PDF is written in PHP and its logic runs on the server side. When a game file is uploaded, the application parses the SGF tree and separates information about moves. The resulting data is drawn by SVG into PDF.

According to Maslo, “Almost no baduk software produces valid [i.e. standardized] SGF.” This has necessitated the development of “some tricks” to handle different SGF types.

The PDF kifu looks like a traditional game record. Moves appear on a grid diagram marked by numbers up to three digits in length. The players’ information, game location, and result appear in a table at the bottom of the page. I noted only that the web address of my game ran across cells within the information table.

sgf2pdf

SGF2PDF does have a few limitations and bugs, and Maslo is open about these shortcomings. SGF2PDF will convert only single branch SGFs played on a 19×19 goban, and it can output only a single sheet PDF. Data within complicated games – that is, for example, those with extensive ko fights and drawbacks – will overflow onto the information table at the bottom of the page. Most users will find, however, that SGF2PDF does exactly what is asked of it: no-frills conversion of single tree SGFs into PDF files.

Maslo solicits both feature requests and suggestions on how to improve SGF2PDF from users. He wrote that the most sought after change is the ability to split kifus across multiple pages. My own request is for the addition of a grid coordinates toggle. Unfortunately, Maslo notes, there hasn’t been much feedback from the baduk community, although some servers are now posting links to the application. “SGF2PDF is here for all of you,” he writes, “Reporting errors and posting feedback will…push me to improve it.”

Disappointment with existing SGF converters sparked the development of SGF2PDF. Available software produced output that Maslo complains was “weird” and “ugly,” so he started to think about building his own program. Writing SGF2PDF, he noted, is a “pretty good way how to train your PHP skills.” Maslo has been playing baduk for nearly four years “for fun” and “brain training.”

Daniel Maslo has distinguished himself by bringing SGF2PDF to the baduk community. I am pleased to recommend this application, because it performs its singular task quite well. I hope players everywhere find SGF2PDF to their satisfaction.