Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Forum: Plugins
    In reply to: [PDF Creator Lite] styling

    @robindehaan Its a bit tricky but I was able to add an img tag to the top and bottom in pdf-creator-lite/scripts/build-pdf-admin.php and pdf-creator-lite/scripts/build-pdf-frontend.php
    Original:

    //build the page content
    $htmlStr = '<h1>' . $title . '</h1>';
    $htmlStr .= $PRcontent;

    Modified:

    //build the page content
    $htmlStr = '<img src="http://placehold.it/350x150"><h1>' . $title . '</h1>';
    $htmlStr .= $PRcontent;
    $htmlStr .= '<img src="http://placehold.it/350x150">';

    Forum: Plugins
    In reply to: [PDF Creator Lite] styling

    Wow, what a compliment! cheers fellas. Having the ability to add custom css will be fantastic.

    I used to use the plugin “Post PDF Export” but it was rather heavy. One option it did have, which was very useful and I imagine you could implement easily enough, was in the backend export the option to specify what categories you wanted and whether you wanted posts or pages. Maybe something you could look at in a future update.

    Congrats on the awesome plugin!

    Forum: Plugins
    In reply to: [PDF Creator Lite] styling

    I needed something a little more user friendly so I made the plugin below then added:

    $cssStr .= get_option('pdfcss');

    Above:

    $cssStr .= ' </style>';

    My PDF Creator Lite CSS plugin:

    <?php
    /**
    * Plugin Name: PDF Creator Lite Styler
    * Description: Add custom CSS to PDF Creator Lite
    * Version: 1.0
    * Author: Sprogger
    **/
    
    add_action('admin_menu', 'pdfcsss');
    
    function  pdfcsss() {
    	add_submenu_page( 'tools.php', 'pdfcss', 'PDF Creator CSS', 'add_users','pdfcss_options', 'overview');
    	add_action( 'admin_init', 'register_mysettings' ); //call register settings function
     }
    
    function register_mysettings() {
    	register_setting( 'myoption-group', 'pdfcss' );
     } 
    
    function overview() { ?>
    
    <div class="wrap">
    <h2> Theme Option Panel</h2>
        <form method="post" action="options.php">
            <?php settings_fields( 'myoption-group' ); ?>
            <textarea name="pdfcss" size="80" value="<?php echo get_option('pdfcss'); ?>"><?php echo get_option('pdfcss'); ?></textarea>
            <p class="submit">
            <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
            </p>
        </form>
    </div>
    
    <?php } 
    
    ?>

    Ideally the PDF Creator Lite plugin would have a custom CSS window… but then I suppose it will no longer be lite!

    Forum: Plugins
    In reply to: [PDF Creator Lite] styling

    The same CSS is in pdf-creator-lite/scripts/build-pdf-admin.php and will need to be changed there. I added “p{ color: blue;}” to make the paragraph text blue and it seemed to work:

    //set some extra document css
    $cssStr = ‘<style type=”text/css”> ‘;
    $cssStr .= ‘.pageBreak { page-break-after: always; } ‘;
    $cssStr .= ‘* { font-family:’ . $text_font . ‘; } ‘;
    $cssStr .= ‘a { color:’ . $link_hex . ‘; } ‘;
    $cssStr .= ‘a:visited { color:’ . $link_hex . ‘; } ‘;
    $cssStr .= ‘ p{ color: blue;}</style>’;

    Forum: Plugins
    In reply to: [PDF Creator Lite] styling

    I found the below in pdf-creator-lite/scripts/build-pdf-frontend.php. Maybe adding CSS to that would work. Try adding it before </style> in the last line.

    //set some extra document css
    $cssStr = ‘<style type=”text/css”> ‘;
    $cssStr .= ‘.pageBreak { page-break-after: always; } ‘;
    $cssStr .= ‘* { font-family:’ . $text_font . ‘; } ‘;
    $cssStr .= ‘a { color:’ . $link_hex . ‘; } ‘;
    $cssStr .= ‘a:visited { color:’ . $link_hex . ‘; } ‘;
    $cssStr .= ‘ </style>’;

    Thread Starter sprogger

    (@sprogger)

    so when I run the pipe as a test, instead of [ Found: 25 ][ +25 ][ 25/100 ] I would have [ Found: 100 ][ +100 ][ 100/100 ].

    Ya dig?

Viewing 6 replies - 1 through 6 (of 6 total)