Hi @Donald Symmons
Yesterday I mentioned the method of converting first into pictures and then into PDF. I tested today and the result is invalid.
Today I changed your js method directly to:
function PrintPanel() {
window.print();
}
I found that it prints out the style you want.
But I know you don't want to print out the Edit program as well.
So the change I made was to fill in the <div>above label so that it could hold up one page.
<div class="row col-sm-12" runat="server" style="width: 100%; margin: 0 auto; padding: 10px; margin-bottom: 0%;">
<div class="col-sm-7" style="width: 100%; margin-bottom: 1%;">
<asp:Panel ID="pnlContents" runat="server" BorderStyle="Solid" BorderWidth="2" BorderColor="#f0f1f2">
<div class="card1" runat="server" id="permit" style="width: 100%; margin: 0 auto; padding: 6px; border-radius: 6px; border: 1px solid #dde0e2;">
<div class="row" style="width: 100%;">
<div class="col-2">
<asp:Image ID="Image2" ImageUrl="~/images/resources/linkedin.png" AlternateText="logo" runat="server" Width="35" Height="35" />
</div>
<div class="col-8">
<span style="float: inline-start;">
<div style="text-align: center;">
<asp:Label ID="Label7" runat="server" Text="Sleek Inc"></asp:Label>
</div>
<div style="text-align: center;">
<asp:Label ID="title" runat="server" Text="JAZZ MUSICAL FEST"></asp:Label>
</div>
<div style="text-align: center;">
<asp:Label ID="Label8" runat="server" Text="Emerald Event Center, 75 Mayne Avenue, Calabar"></asp:Label>
</div>
</span>
</div>
<hr style="margin-top: 3px;" />
</div>
<div class="eventdetail" runat="server" id="eventdetail" style="display: block; margin: 0 auto; margin-top: 5%;">
<div class="row" style="width: 100%;">
<div class="col-4">
<asp:Label ID="Label4" runat="server" Text="Access Level"></asp:Label>
</div>
<div class="col-4">
<asp:Label ID="Label5" runat="server" Text="Date"></asp:Label>
</div>
<div class="col-4">
<asp:Label ID="Label6" runat="server" Text="Time"></asp:Label>
</div>
</div>
<div class="row" style="width: 100%;">
<div class="col-4">
<asp:Label ID="Label11" runat="server" Text="REGULAR"></asp:Label>
</div>
<div class="col-4">
<asp:Label ID="Label13" runat="server" Text="Mar 17, 2023"></asp:Label>
</div>
<div class="col-4">
<asp:Label ID="Label15" runat="server" Text="8:00 PM"></asp:Label>
</div>
</div>
</div>
<div class="row" style="margin-top: 5%; margin-bottom: -1%;">
<div class="col-sm-10">
<div class="form-group">
<div class="input-group">
<asp:Label ID="Label2" runat="server" Text="David Iriepekin"></asp:Label>
</div>
</div>
</div>
</div>
<div class="row" style="width: 100%; margin: 0 auto;">
<div class="col-sm-5">
<div class="form-group">
<div class="input-group">
<asp:Label ID="phonelbl" runat="server" Text="0802347568"></asp:Label>
</div>
</div>
<div class="form-group" style="float: left; font-size: 5pt;">
<div class="input-group">
<asp:Label ID="permitID" runat="server" Text="31570"></asp:Label>
</div>
</div>
</div>
<div class="col-sm-7">
<div class="form-group" style="float: right; font-size: 5pt;">
<div class="input-group">
<asp:Image ID="Image3" ImageUrl="Test.png" runat="server" Width="80" Height="80" />
</div>
</div>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="card" style="width: 100%; background-color: #f2f8fb; border: 0.1px solid #dde0e2;">
</div>
</div>
</asp:Panel>
</div>
<div class="div1" style="margin-top: 2%; left: 0; z-index: 999; width: 100%; margin: 0 auto; padding: 10px; border-radius: 4px; border: 0.2px solid #f0f1f2; background-color: #fff;">
<div class="" style="width: 100%; margin: 0 auto; padding: 6px; margin-top: 1%; border-radius: 4px;">
<div style="margin-top: 1%; margin-bottom: 4%;">
<label style="font-weight: 500; font-size: 8pt; color: #93979e;">Edit your permit</label>
</div>
<asp:Label ID="headcolor" runat="server">Header Color</asp:Label>
<div class="input-group" style="font-size: 4pt;">
<asp:TextBox ID="TextBox1" runat="server" AutoCompleteType="None" Font-Size="4pt" CssClass="form-control" />
<cc1:ColorPickerExtender ID="ColorPicker1" runat="server" TargetControlID="TextBox1"
PopupButtonID="ColorBtn" PopupPosition="TopRight" OnClientColorSelectionChanged="ColorChanged" />
<div class="input-group-append">
<span class="input-group-text" id="ColorBtn" runat="server" style="height: auto; background-color: transparent; color: #404344;">
<span id="toggle_picker" class="fad fa-eye-dropper" aria-hidden="true" style="cursor: pointer; font-size: 11pt; border: none;"></span>
</span>
</div>
</div>
<asp:Label ID="Label3" runat="server">Background Color</asp:Label>
<div class="input-group" style="font-size: 4pt;">
<asp:TextBox ID="BackTxt" runat="server" AutoCompleteType="None" Font-Size="4pt" CssClass="form-control" />
<cc1:ColorPickerExtender ID="ColorPickerExtender1" runat="server" TargetControlID="BackTxt"
PopupButtonID="BackColorBtn" PopupPosition="TopRight" OnClientColorSelectionChanged="BackChangedColor" />
<div class="input-group-append">
<span class="input-group-text" id="BackColorBtn" runat="server" style="height: auto; background-color: transparent; color: #404344;">
<span id="perm_id" class="fad fa-eye-dropper" aria-hidden="true" style="cursor: pointer; font-size: 11pt; border: none;"></span>
</span>
</div>
</div>
<asp:Label ID="fontlbl" runat="server">Choose Font</asp:Label>
<div class="input-group">
<input type="text" class="fonts" />
</div>
</div>
</div>
</div>
</ContentTemplate>
<Triggers>
</Triggers>
</asp:UpdatePanel>
<br />
<div style="margin: 0 auto; padding: 10px;">
<asp:Button ID="PermitPrint" runat="server" CssClass="btn navbar-btn" Text="Print" OnClientClick="return PrintPanel();" />
</div>
Of course, for demonstration purposes, I only tested your font.
OutPut:
In fact, your previous code, I think the "innerhtml" to be printed did not contain the new styles. But I searched for a long time and couldn't find where. I think this method works well.
Best regards,
Qi You
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.