Printing PDF
-
When I try to print a PDF of selected chessgame posts using the plugin Print My Blog I have the board and moves only for the first post, next posts show only players and metadata, without board and moves. How to make them visible?
-
Chessgame Shizzle is the best plugin to make collections of chess games. That’s why I want to combine it with the capability of the Print My Blog plugin to save in seconds any group of chess games posts as a nice PDF file. For some reason when Chessgame Shizzle custom posts are displayed in one place only the chessboard of the first post is visible. When the games are inserted in ordinary posts with a shortcode (using iframe) they all are visible. Other chess plugins like Embed Chessboard (pgn4web) and RPB Chessboard don’t use iframes to add chess games in ordinary posts and each game has the chessboard when printing. So, the issue or restriction has to do with the Shizzle custom posts, I think. If this is resolved the best chess plugin on Earth will become the best in the Universe.
Hello teodorcat,
Thank you 😉
I don’t see the exact same thing. I chose ‘paper’ as option. But I did see some issues and there have been some fixes. For some reason the extended board was drawn out to a height of 800px. Also, it now supports the background color for print. There is another topic I need to check, I plan to do a release shortly.
Regards, Marcel
Quick Print is for default WordPress posts and pages only.
Go to Print My Blog – Pro Print – Add New Project and add some chessgame custom posts for printing.
Marcel, I found another good plugin Print-O-Matic for printing single CPT. One can target any div id or class that we want to print and ignore anything that we don’t want to print.
It can’t print several posts.
I used plugin Display Posts to show the full content of several chessgame CPT on one regular WordPress post.
https://best.chessstudy.art/?p=521
This way I can print many CPT items with Prin-O-Matic plugin. But as you see only the chessboard and game text of the first CPT is visible. So, the issue is definitely with the Shizzle CPT.
Hello Teodorcat,
Sorry for the slow reply.
I did add some integration code for these two plugins. It turns out that the query in Display Posts is not treated as singular, and the chessgames were added to the content of each post. But a chessgame can only be added once to the main content, if there are more games, they should be added as iframes.
For the Display Posts plugin I removed the content filter of chessgames. Then I added the iframe as a content filter. In my testing they all show up when I use the shortcodes:
[display-posts post_type="cs_chessgame" include_content="true"]and[print-me]. Though the parameter for include_content should maybe go away now.Does this work for you? It is only in git for now, I haven’t released an update yet.
https://codeberg.org/cyclotouriste/chessgame-shizzleHello,
It turns out there was a bug in this plugin. The chessgame should not have been added to the post content if it was not singular, but a list. That is fixed in the next version.
About the added code for this. I started to think it is not in the general interest, but more something that can be seen as custom code for you.
The custom code is located here:
https://codeberg.org/cyclotouriste/chessgame-shizzle/src/branch/trunk/functions/cs-integration.php
Is it possible for you to add this PHP code to your own plugin? I will remove this again from the chessgame plugin.
Please be aware that the code calls a function that is only in git, it is not part of 1.2.6.Thank you Marcel.
Now I see all the diagrams and solutions from several chessgames and I can print them as PDF. Great.
I added the custom code into my plugin. You are right that others probably don’t need it and it’s better not to use it in the chessgame plugin. But I am happy to have it. Thanks a lot.
The topic ‘Printing PDF’ is closed to new replies.