• Resolved strarsis

    (@strarsis)


    After the last updates the text was corrupted in preview and not visible in the PDF (viewed in Acrobat).

    I had to manually Reinstall plugin fonts, which fixed the issue immediately.

    It may be a good idea to add a reinstall plugin fonts action when the plugin is updated, the reinstallation is very fast and can prevent all those issues in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @strarsis,

    We already added a check that reinstall the fonts, if necessary, which runs daily. That said, I think yours is a good idea. I’ll pass it to the team to know their opinion about it. I’ll keep you posted!

    Thread Starter strarsis

    (@strarsis)

    Also note that on some WordPress sites, the WP Cron is disabled in favor of using a system cron. The daily font check script should take this into account.

    Hi @strarsis @yordansoares

    I have the same problem (trouble with font in the downloaded pdf). How can i fix it ? How can i reinstall a plugin font ?

    Thread Starter strarsis

    (@strarsis)

    There ia a button for reinstalling the fonts in the tools section on the plugin status settings page.

    • This reply was modified 1 year, 5 months ago by strarsis.

    Thank a lot !! ??

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Also note that on some WordPress sites, the WP Cron is disabled in favor of using a system cron. The daily font check script should take this into account.

    @strarsis we use a transient to do this, which is checked when a PDF document is generated, so we do not depend on the WP or server crons.

    I have the same problem (trouble with font in the downloaded pdf). How can i fix it ? How can i reinstall a plugin font ?

    As @strarsis mentioned, to solve this, please go to?WooCommerce > PDF Invoices > Status?tab, and click on the?Reinstall fonts?button.

    Thread Starter strarsis

    (@strarsis)

    Just had the issue again. Can the fonts be reinstalled using the WP CLI?

    The fonts are cached in uploads/-directory, correct?
    So the plugin does not notice when the font files are missing or corrupted, hence the incorrect text in the generated PDFs? Can a check be added that triggers are re-install of the fonts in case the font files are corrupted?

    • This reply was modified 1 year, 5 months ago by strarsis.
    Plugin Contributor Yordan Soares

    (@yordansoares)

    By default, we run a check daily, searching if the font files exist. However, you can override this behavior, running the check always, by activating this code snippet in your site:

    /**
     * PDF Invoices & Packing Slips for WooCommerce:
     * Always check if the 'fonts' subfolder has files 
     */
    add_action( 'wpo_wcpdf_before_html', function( $document_type, $document ) {
    	delete_transient( 'wpo_wcpdf_subfolder_fonts_has_files' );
    }, 10, 2 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Had to manually reinstall plugin fonts’ is closed to new replies.