Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom css is not applied for downloaded pdf #10197

Open
Bhavana1v opened this issue Sep 9, 2024 · 0 comments
Open

custom css is not applied for downloaded pdf #10197

Bhavana1v opened this issue Sep 9, 2024 · 0 comments
Labels
bug A bug to fix pdf Produce PDF as the output format

Comments

@Bhavana1v
Copy link

Bhavana1v commented Sep 9, 2024

Describe the bug
We have custom css for "@media print" in normal style and case.

/* custom-table-style.css */
@media print {
.custom-table {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
}

.custom-table th,
.custom-table td {
word-wrap: break-word;
overflow: hidden;
border: 1px solid #D3d3d3;
padding: 5px; /* Adjust padding as needed */
}
}

.custom-table {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
}

.custom-table th,
.custom-table td {
word-wrap: break-word;
overflow: hidden;
border: 1px solid #D3d3d3;
padding: 5px; /* Adjust padding as needed

Style is being applied for docfx site. But it is not getting applied for the downloaded pdf.

To Reproduce
Steps to reproduce the behavior:

  1. Create custom css as mentioned above for a page having table and try to generate PDF.

Expected behavior
Both docfx website and PDF should show similiar table styles.

Context (please complete the following information):

  • OS: Windows
  • Docfx version: [e.g. 2.77.0]

Actual behaviour
Website shows correct css style but downloaded pdf is showing theme style itseems..

Additional context
If we try to print - custom style is reflected.

@Bhavana1v Bhavana1v added the bug A bug to fix label Sep 9, 2024
@yufeih yufeih added the pdf Produce PDF as the output format label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix pdf Produce PDF as the output format
Projects
None yet
Development

No branches or pull requests

2 participants