madankgit commented on issue #37992:
URL: https://github.com/apache/superset/issues/37992#issuecomment-4154606649

   Hi bingxia2277,
   
   Could you please clarify the file path or location within the Superset
   codebase where these changes should be implemented?
   
   Best regards,
   Madan Kumar
   
   
   On Fri, Mar 27, 2026 at 5:17 PM Madan Kumar ***@***.***> wrote:
   
   > Hi bingxia2277,
   >
   > Thank you for the detailed suggestions regarding the chart truncation
   > issue in the PDF reports.
   >
   > I will try these approaches and let you know the results.
   >
   > Best regards,
   > Madan Kumar
   >
   >
   > On Thu, Mar 26, 2026 at 9:48 PM bingxia2277 ***@***.***>
   > wrote:
   >
   >> *bingxia2277* left a comment (apache/superset#37992)
   >> <https://github.com/apache/superset/issues/37992#issuecomment-4136338113>
   >>
   >> This is a common issue with headless browser screenshot/PDF capture on
   >> dashboards with dynamic height.
   >>
   >> The root cause is usually that the viewport height is set too small, so
   >> charts below the fold get cut off. Two approaches to fix:
   >>
   >> *Approach 1: Full-page capture*
   >> Set fullPage: true in the screenshot options so the browser captures the
   >> entire scrollable content, not just the viewport.
   >>
   >> *Approach 2: Dynamic viewport sizing*
   >> Before capturing, measure the actual rendered height of the dashboard
   >> container and set the viewport to match:
   >>
   >> const height = await page.evaluate(() => 
document.querySelector(".dashboard-content").scrollHeight);await 
page.setViewportSize({ width: 1280, height: Math.max(height, 800) });await 
page.screenshot({ fullPage: true });
   >>
   >> For multi-page PDF export specifically, you may want to:
   >>
   >>    1. Calculate total dashboard height
   >>    2. Split into A4-sized chunks
   >>    3. Generate one PDF per chunk
   >>    4. Merge into a single multi-page PDF
   >>
   >> If useful, there is a free hosted API that handles full-page screenshots
   >> and PDF generation with automatic height detection:
   >>
   >> curl -X POST https://api.16761.tech/pdf \
   >>   -H "Authorization: Bearer KEY" \
   >>   -d 
'{"url":"https://your-superset.com/dashboard/123","printBackground":true}' -o 
dashboard.pdf
   >>
   >> Free: 100/day at https://api.16761.tech/signup
   >>
   >> Happy to help debug the specific Superset screenshot pipeline if needed.
   >>
   >> —
   >> Reply to this email directly, view it on GitHub
   >> 
<https://github.com/apache/superset/issues/37992?email_source=notifications&email_token=BWNYSJF56RMCGMAQ774EGO34SVJ6NA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJTGYZTGOBRGEZ2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4136338113>,
   >> or unsubscribe
   >> 
<https://github.com/notifications/unsubscribe-auth/BWNYSJCD2Q7X5IUPGUD7OQD4SVJ6NAVCNFSM6AAAAACVH3TRXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCMZWGMZTQMJRGM>
   >> .
   >> You are receiving this because you authored the thread.Message ID:
   >> ***@***.***>
   >>
   >
   
   -- 
   
---------------------------------------------------------------------------------------------------
   Disclaimer:
   The information contained in this e-mail message is for the use 
   of the addressee and is solely intended for the person to whom it has been 
   sent.This message may contain legally privileged and confidential 
   information which may not be made public by virtue of terms and conditions. 
   
   If the receiver of this message is not the intended recipient or employee 
   or the addressed person and if you come into possession of this e-mail 
   communication, you are hereby cautioned that any dissemination, 
   distribution or copying of this communication is prohibited. 
   If you are 
   not the intended recipient and if you have received this message by error, 
   please immediately notify us through E-Mail at ***@***.*** 
   ***@***.***> and please delete this message from your 
   system. 
   We bring to your attention that email communications are insecure 
   and capable of interception, corruption and delays. 
   Anyone communicating 
   with us by email accepts the risks of email communications and their 
   consequences. 
   Neither Axxonet nor their subsidiaries shall be liable for 
   incorrect, incomplete transmission, loss or damage on this account or 
   delayed receipt of this e-mail.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to