2016-10-13 23 views

回答

0

,可以用一些這樣的事
現在ü只需要設置類UR頭父元素像我一樣在這裏

打印P1-頭添加P1級,打印P2頭添加類P2其特定頁面

<header class="p1"> 
    // this p1-header will be visible only rest will hide 
    <h1 class="p1-header">some text p1</h1> 
    <h1 class="p2-header">some text p2</h1> 
    <h1 class="p3-header">some text p3</h1> 

</header> 

.p1-header, .p2-header, .p3-header{ 
    display: none; 
} 

.p1 .p1-header{ 
    display: block; 
} 
.p2 .p2-header{ 
    display: block; 
} 
.p3 .p3-header{ 
    display: block; 
} 
+0

感謝烏拉圭回合的反應@Rahul, – Ranjana

+0

但是,我有針對不同的頭文件CSHTML使用與NReco我打印的每一頁上的頁眉上的容器。 – Ranjana

+0

像這樣:HtmlToPdfConverter htmlToPdf = new HtmlToPdfConverter(); htmlToPdf.PageHeaderHtml = htmlHeader; – Ranjana

相關問題