मैं cfdocument का उपयोग कर कोल्डफ्यूजन में पीडीएफ बना रहा हूं। मुझे हेडर पंक्ति के साथ एक टेबल बनाने की आवश्यकता है ताकि यह पृष्ठ पर फिट हो। यहां एक उदाहरण दिया गया है जिसे मैं पूरा करने की कोशिश कर रहा हूं। मैंने अभी तक पाया है कि HTML या CSS उदाहरणों में से कोई भी काम नहीं किया है। अब मैं सोच रहा हूं कि यह कोल्डफ्यूजन और/या पीडीएफ सृजन के लिए विशिष्ट क्विर्क है। मुझे पता है कि यह कोड सीधे एक समान प्रश्न के उत्तर से आया है, लेकिन यह मेरे पीडीएफ में स्लॉट कॉलम के साथ एक टेबल नहीं बनाता है। यह इसे बनाता है। स्लेटेड हेडर के साथ पीडीएफ टेबल
//CSS
* {
box-sixing: border-box;
}
.outerDiv {
background: grey;
height: 200px;
width: 100px;
border: 1px solid black;
border-bottom: 0;
border-left: 0;
transform: skew(-30deg) translateX(58%);
}
th:first-child .outerDiv {
border-left: 1px solid black;
position: relative;
}
.innerDiv {
position: absolute;
width: 250px;
height: 85px;
bottom: -34%;
left: 10px;
transform: skew(30deg) rotate(-60deg);
transform-origin: 0 0;
text-align: left;
}
body,
html {
height: 100%;
}
body {
display: flex;
justify-content: center;
}
table {
border-collapse: collapse;
}
td {
border: 1px solid black;
}
.well {
min-height: 20px;
padding: 5px;
margin-bottom: 10px;
background-color: #f5f5f5;
border: 1px solid black;
border-radius: 3px;
}
.well_tight {
padding: 3px;
margin-bottom: 5px;
background-color: #f5f5f5;
border: 1px solid black;
border-radius: 3px;
}
//ColdFusion/HTML
<cfdocument format="pdf" name="#formname#" pagetype="letter" marginleft=".25" marginright=".25" margintop=".25" marginbottom=".5">
<cfoutput><style type="text/css">@import "/mach15/web/assets/css/formPDF.css";</style></cfoutput>
<div class="well">
<table cellpadding="0" cellspacing="0">
<tr>
<th>
<div class="outerDiv">
<div class="innerDiv">This is first column header</div>
</div>
</th>
<th>
<div class="outerDiv">
<div class="innerDiv">This is second column header</div>
</div>
</th>
<th>
<div class="outerDiv">
<div class="innerDiv">This is third column header</div>
</div>
</th>
</tr>
<tr>
<td> 1 </td>
<td> 2 </td>
<td> 3 </td>
</tr>
<tr>
<td> 4 </td>
<td> 5 </td>
<td> 6 </td>
</tr>
<tr>
<td> 7 </td>
<td> 8 </td>
<td> 9 </td>
</tr>
<tr>
<td> 10 </td>
<td> 11 </td>
<td> 12 </td>
</tr>
</table>
</div>
वैसे यह HTML के रूप में काम करता है, इसलिए यह निश्चित रूप से एक cfdocument सीमा है। यह केवल [सीएसएस 2 का समर्थन करता है] (https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-d-e/cfdocument.html) (अधिकतर) और 'ट्रांसफॉर्म' CSS3 है। निकटतम मैंने पाया है [यह पुराना धागा] (https://forums.adobe.com/thread/80941) जो कुछ हैक्स का उल्लेख करता है (हालांकि न तो बहुत अच्छा आईएमओ है)। – Leigh
मैं पीडीएफ दस्तावेज़ उत्पन्न करने के लिए कोल्डफ्यूजन 8, 9, 10, 11 और 2016 के साथ WKHTMLTOPDF (एक नि: शुल्क कमांड लाइन प्रोग्राम) का उपयोग करने की सलाह देता हूं। मुझे slanted/rotated text, shadows, webfonts (fontawesome), एसवीजी, सीएसएस ग्रेडियेंट्स, अल्फा पीएनजी समर्थन, सापेक्ष/पूर्ण स्थिति इत्यादि के साथ अच्छी सफलता मिली है। –
हां, मुझे संदेह है कि सीएफडी दस्तावेज़ के साथ स्लॉट टेक्स्ट संभव है।@JamesMoberg - यदि आपके पास WKHTMLTOPDF के साथ स्लॉट टेक्स्ट बनाने का एक उदाहरण है, तो इसे उत्तर के रूप में पोस्ट करने के लिए स्वतंत्र महसूस करें, क्योंकि यह भविष्य में दूसरों के लिए उपयोगी होगा। – Leigh