- Home
- Forum
- ASP.NET Web Forms (Classic)
- Change PrintOptions in PdfViewer (Header/Footer)
Change PrintOptions in PdfViewer (Header/Footer)
Hi.
Attachment: PrintOptions_56aea5c7.zip
we just noticed that if we print a pdf document, there is a header- and a footerrow included.
I guess its just some option to deactivate this, but unfortunately i cant find it.
Could you please tell me how to switch off the header- and footerrow, when printing a pdfdocument?
I attached my sample project.
Thanks
Matthias
Attachment: PrintOptions_56aea5c7.zip
SIGN IN To post a reply.
11 Replies
MW
Matthias Wagner
July 3, 2020 08:24 AM UTC
Here is a screenshot just to clarify what i mean.
Attachment: 20200703_10_19_12PDF_viewer_cbbdd6c5.zip
We want to remove the yellow marked area.
Attachment: 20200703_10_19_12PDF_viewer_cbbdd6c5.zip
AA
Akshaya Arivoli
Syncfusion Team
July 6, 2020 12:54 PM UTC
Hi Matthias,
Thank you for contacting Syncfusion support.
We are currently checking on the reported query. We will update you with further details on July 7th, 2020
Regards,
Akshaya
AA
Akshaya Arivoli
Syncfusion Team
July 7, 2020 08:52 AM UTC
Hi Matthias,
Thank you for your patience.
We are unable to reproduce the reported issue with the sample which you have provided. Please find the below screenshot for reference.
Also we are using the browser default printer settings to the print the PDF document from PDF Viewer. Can you please try removing the header/footer in your browser settings and print the document. If you still have concerns, please revert us with browser details, version and browser settings. These details will be helpful for us to investigate further and assist you better.
Regards,
Akshaya
AA
Akshaya Arivoli
Syncfusion Team
July 8, 2020 02:36 PM UTC
Hi Matthias,
Thank you for your update. Currently we do not have support to remove the header/footer-option of the browser print settings when pressing the print-button in the Pdf Viewer. We will analyze further on your requirement and update you with more details on July 10th, 2020
Regards,
Akshaya
MW
Matthias Wagner
July 8, 2020 02:38 PM UTC
Hi Akshaya,
thanks for your response.
Removing the header/footer-option in my browser settings manually is working and the pdf is printed correctly.
But unfortunately we cant demand from our customers, to change their settings manually.
Is there a possibility to set the header/footer-option of the browser print settings when pressing the print-button in the pdfviewer?
This should work for Chrome, Firefox, IE, Edge.
For example it is possible to remove the header and footer with javascript if you print in the browser with following code.
@page
{
size: auto; /* auto is the initial value */
/* this affects the margin in the printer settings */
margin: 25mm 25mm 25mm 25mm;
}
body
{
/* this affects the margin on the content before sending to printer */
margin: 0px;
} But this doesnt work with the Syncfusion pdfviewer.
Thanks for your help.
Matthias
AA
Akshaya Arivoli
Syncfusion Team
July 9, 2020 02:24 PM UTC
Hi Matthias ,
Thank you for your update. As mentioned earlier, we will analyze further on your requirement and update you with more details on July 10th, 2020
Regards,
Akshaya
AA
Akshaya Arivoli
Syncfusion Team
July 10, 2020 04:04 PM UTC
Hi Matthias ,
We have validated to remove the header/footer in the document printed from PDF Viewer. We will provide you the patch for the same on July 24th, 2020.
Regards,
Akshaya
AA
Akshaya Arivoli
Syncfusion Team
July 29, 2020 05:18 PM UTC
Hi Matthias ,
Sorry for the inconvenience caused.
We are currently working on the reported and we will update you with patch on August 7th, 2020
Regards,
Akshaya
AA
Akshaya Arivoli
Syncfusion Team
August 7, 2020 03:57 PM UTC
Hi Matthias ,
Thank your for your patience
We have tried to remove the header and footer by using the CSS property,but still the header and footer is displayed. So we have reported issue in the Chromium forum and we will let you know once we got the update from them. We appreciate your patience until then.
Regards,
Akshaya
GÖ
Göran
November 1, 2024 01:13 PM UTC
Any updates to this issue or another way to fix it?
PA
Priyadharshini Annamalai
Syncfusion Team
November 4, 2024 12:22 PM UTC
Hi Goran,
It is not feasible to completely control the browser's default print headers and footers through code alone. This limitation arises because the browser manages headers and footers in print settings, and typically does not provide programmatic access to these elements due to concerns regarding security, privacy, and standardization.
Regards,
Priyadharshini
SIGN IN To post a reply.
- 11 Replies
- 4 Participants
-
MW Matthias Wagner
- Jul 3, 2020 08:13 AM UTC
- Nov 4, 2024 12:22 PM UTC