how to show "print to pdf" button as asp.net report viewer

Stimulsoft Reports.JS discussion
chenyb
Posts: 20
Joined: Fri Sep 22, 2017 8:39 am

how to show "print to pdf" button as asp.net report viewer

Post by chenyb »

the button "print to pdf" in asp.net viewer .how to show this button in js viewer?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: how to show "print to pdf" button as asp.net report view

Post by Alex K. »

Hello,

This option is available in the JS viewer.
Please clarify which version are you use?

Thank you.
Attachments
Capture.PNG
Capture.PNG (69.14 KiB) Viewed 5284 times
chenyb
Posts: 20
Joined: Fri Sep 22, 2017 8:39 am

Re: how to show "print to pdf" button as asp.net report view

Post by chenyb »

download [stimulsoft-reports-2018.1.5-Pack.zip] and get a demo .just show print button
not like the demo :http://demo.stimulsoft.com/demo_js_2018 ... SimpleList
demoJS.png
demoJS.png (106.28 KiB) Viewed 5281 times
chenyb
Posts: 20
Joined: Fri Sep 22, 2017 8:39 am

Re: how to show "print to pdf" button as asp.net report view

Post by chenyb »

found the reason:
var options = new Stimulsoft.Viewer.StiViewerOptions();
options.height = "100%";
options.appearance.scrollbarsMode = true;
options.toolbar.showDesignButton = true;
//options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Pdf; <------ remove this line
options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;


Test print to pdf ,use virtual printer: [microsoft print to pdf],get .pdf file,miss page number
show in viewer :
viewer.png
viewer.png (139.06 KiB) Viewed 5280 times
show in pdf file:
print_to_pdf.png
print_to_pdf.png (243.39 KiB) Viewed 5280 times
chenyb
Posts: 20
Joined: Fri Sep 22, 2017 8:39 am

Re: how to show "print to pdf" button as asp.net report view

Post by chenyb »

export pdf
ExportPDF.png
ExportPDF.png (210.61 KiB) Viewed 5279 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to show "print to pdf" button as asp.net report view

Post by HighAley »

Hello.

Usually, browsers add margins to the print pages.
Please, set the margins to None in the browser's print settings.

Thank you.
chenyb
Posts: 20
Joined: Fri Sep 22, 2017 8:39 am

Re: how to show "print to pdf" button as asp.net report view

Post by chenyb »

no matter how to set browser,[print to pdf] lost page number at bottom.
Test browser : firefox
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to show "print to pdf" button as asp.net report view

Post by HighAley »

Hello.

Sorry, we can't reproduce the issue.
Could you send us a step-by-step instruction or better a video that will help us to reproduce the issue?

Thank you.
chenyb
Posts: 20
Joined: Fri Sep 22, 2017 8:39 am

Re: how to show "print to pdf" button as asp.net report view

Post by chenyb »

1.set brower margin 0
BrowerPageSetting.png
BrowerPageSetting.png (28.96 KiB) Viewed 5267 times
2.open http://demo.stimulsoft.com/#Js
preview in page.png
preview in page.png (353.27 KiB) Viewed 5267 times
3.click [Print To PDF] and select [PDF printer]
print.png
print.png (46.57 KiB) Viewed 5267 times
4.click[Save]->[Adobe PDF File...]
pdfResult.png
pdfResult.png (427.62 KiB) Viewed 5267 times
5.click [Print To PDF] and select [XPS Printer]
printToPDF_XPS.png
printToPDF_XPS.png (56.98 KiB) Viewed 5267 times
xpsResult.png
xpsResult.png (189.74 KiB) Viewed 5267 times
[Print To PDF] lost page number
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to show "print to pdf" button as asp.net report view

Post by HighAley »

Hello.

Sorry, we still can't reproduce the issue.
Could you send us the pdf and xps files that you get after export?

Thank you.
Post Reply