douyong5476 2015-07-09 13:40
浏览 73

在所有打印机上统一打印(打印时,而不是PDF)

Below is the code that was put together by my developer but we're still having problems printing uniformly from http://sandboxalleninvestments.com/person/keith-albritton/. It prints fine when printing as a PDF but outside of that, it's all wonky. I'm out of time and running out of hair to pull out. On some printers it works on some days, on other it does not.

<?php get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php 
    // $post_id = get_the_id();
?>
<style>
@media print {
    .container {
        width: 100%;
    }
    .bio__content {
        max-width: none;
    }
    .bio__content p { 
        font-size:16px !important; }
    }
    .subheader--bio .tabelize__content h1 {
        font-size: 35px !important;
   }
    .bio__content hr {
        margin:0;
    }
    .bio__content p {
        padding:0 30px;
    }
} /* @media print */
</style>
 <div class="subheader subheader--bio">
        <img src="<?php the_field("bio_picture"); ?>" alt="">
         <div class="container">
            <div class="tableize tableize--middle">
                <div class="tableize__cell">
                    <div class="tabelize__content">
                        <?php
                        $first_name = get_field('first_name');
                        $last_name = get_field('last_name'); ?>
                        <h1><?php echo $first_name . " " .     $last_name ?></h1>
                        <small><?php the_field('job_title');     ?></small>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <main class="main main--inner main--border">
        <div class="container">
            <div class="bio__content">
                <div class="bio__bar">
                    <ul class="socials list--nostyle">
                        <?php if (get_field('facebook')) :  ?>
                        <li>
                            <a href="<?php the_field('facebook');    ?>"><svg role="img" class="icon icon--fb"><use xlink:href="<?php echo get_template_directory_uri() . '/icons/icons.svg#icon-fb' ?>"></use></svg></a>
                        </li>
                        <?php endif; ?>
                        <?php if (get_field('instagram')) : ?>
                        <li>
                            <a href="<?php the_field('instagram'); ?>"><svg role="img" class="icon icon--in"><use xlink:href="<?php echo get_template_directory_uri() . '/icons/icons.svg#icon-in' ?>"></use>  </svg></a>
                        </li>
                        <?php endif; ?>
                    </ul>
                      <?php  if(get_field('team')) : ?> 
                     <a href="<?php the_field('team'); ?>" class="link link--lg">View Team Page</a>
                     <?php  endif; ?> 
                </div>
                <?php the_field('description'); ?>
                <hr>
                <div class="bio__footer">
                    <a href="" class="link link--lg" onclick="window.print(); return false;">Print Bio</a>
                </div>
            </div>
        </div>
    </main>
  <?php endwhile; endif; ?>  
<?php 
get_footer();
?>

Here's a screenshot of the problem. You can see that the margins are way off and the font doesn't match the code (size-wise):

http://i.stack.imgur.com/93qDn.jpg

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#Java#的问题,如何解决?
    • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
    • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化