Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/247.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 跨所有打印机统一打印(打印时,不是PDF格式)_Php_Css_Wordpress_Pdf_Printing - Fatal编程技术网

Php 跨所有打印机统一打印(打印时,不是PDF格式)

Php 跨所有打印机统一打印(打印时,不是PDF格式),php,css,wordpress,pdf,printing,Php,Css,Wordpress,Pdf,Printing,下面是我的开发人员编写的代码,但我们仍然无法从中统一打印。当它以PDF格式打印时,打印效果很好,但除此之外,一切都不可靠。我没时间了,头发也没了。在某些打印机上,它有时工作,而在另一些打印机上则不工作 <?php get_header(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php // $post_id = get_the_id();

下面是我的开发人员编写的代码,但我们仍然无法从中统一打印。当它以PDF格式打印时,打印效果很好,但除此之外,一切都不可靠。我没时间了,头发也没了。在某些打印机上,它有时工作,而在另一些打印机上则不工作

<?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();
?>

@媒体印刷品{
.集装箱{
宽度:100%;
}
.bio___内容{
最大宽度:无;
}
.bio__内容p{
字体大小:16px!重要;}
}
.分标题——生物标签内容h1{
字体大小:35px!重要;
}
.bio___内容hr{
保证金:0;
}
.bio____含量p{
填充:0 30px;
}
}/*@媒体打印*/
“alt=”“>

下面是问题的屏幕截图。您可以看到边距过大,字体与代码不匹配(按大小):


(一般说明:在提问时,请不要添加指向外部网站的链接,而不是询问一个独立的问题。如果您解决了这个问题,未来的读者将检查有问题的网站,该网站可能不再存在,或者不再显示手头的问题)。您可以看到边距过大,字体与代码不匹配(按大小)好的。你尝试过不同的浏览器和操作系统吗?你目前在使用什么浏览器/操作系统方面有困难?找到这个问题会告诉你这是你的网站的问题还是与浏览器相关的问题。此外,浏览器打印得不太好-网页不是为纸张设计的,你得到的输出可能是g你确定这个网站需要打印吗?如果真的需要,只需在服务器上保存漂亮的PDF副本,并从每个个人资料页面链接到它们。(一般说明:在询问问题时,请不要添加指向外部网站的链接,而不是询问一个独立的问题。如果您解决了此问题,未来的读者将检查有问题的网站,该网站可能不再存在,或者将不再显示手边的问题)。您可以看到边距太远,字体与代码不匹配(尺寸方面)好的。你尝试过不同的浏览器和操作系统吗?你目前在使用什么浏览器/操作系统方面有困难?找到这个问题会告诉你这是你的网站的问题还是与浏览器相关的问题。此外,浏览器打印得不太好-网页不是为纸张设计的,你得到的输出可能是g你确定这个网站需要打印吗?如果真的需要,只需在服务器上保存漂亮的PDF副本,并从每个个人资料页面链接到它们。