Solved

"Page Setup" orentation to LandScape

Posted on 2003-12-04
4
258 Views
Last Modified: 2008-02-01
Hi
I have generated a report using JSP,and there are two buttons in that page
1, "Export to Excel" what it does is It Export the Report Data to Excel Format.
2, "Print" What it does is It format the report page by removing the Button etc.
now the Problem is client wants the "Page Setup" orentation to LandScape as default instead of (Potrait) for both the 2 pages(Export to Excel and Print).

any Idea how to do this through JSP.

Thanks
Naveeth
0
Comment
Question by:naveeth
4 Comments
 
LVL 3

Accepted Solution

by:
savalou earned 63 total points
ID: 9874523
People keep asking this question.  There's no way to even print with java/jsp code, first of all.  You'd have to use javascript in the final html document.  Secondly, even with javascript all you can do is bring up the print dialog, no more.  Tweaking with printer settings gets into platform/browser dependent issues and the javascript/css/html standards don't address it. You could probably do something in IE (you could probably reformat your disk in IE) but you'd have search and re-search the msdn site and you still wouldn't find any useful info.

0
 
LVL 14

Assisted Solution

by:kennethxu
kennethxu earned 62 total points
ID: 9874881
savalou is right that you cannot do this with javascript/css/html.

1. POI generates real excel document, I cannot be sure but you might have chance to page orentation with it. http://jakarta.apache.org/poi/

2. I used xsl-fo with FOP to generate pdf file, that for sure you can preset the orentation. http://xml.apache.org/fop/
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now