How to get a pdf printout in landscape format? - pdf

This is with reference to this thread How to make a pdf printout occupy the entire A4 page.
I am able to bring all the content into a single page, but even if I set the printer preferences to landscape format, it doesn't print it.
What could be the problem?

Are you setting the orientation attribute of the tag? That attribute controls the orientation of the page, and you should set it to landscape.
From the Seam documentation
orientation — The orientation of the
page. Valid values are portrait and
landscape. In landscape mode, the
height and width page size values are
reversed.

Related

Making caption portrait in landscape table in overleaf latex

I have a long table in landscape format. So used longtable and landscape. I need to have caption portrait in top of the page in overleaf latex. how to make caption portraitt?
used below code inside long table, but not working
\begin{minipage}{.95\textwidth} \rotatebox{270}{ \begin{minipage}{\textwidth}
\caption{~~{Tablecaption}}\label{T:LR}\ \end{minipage}} \end{minipage}
Also, tried slideways.....Plz suggest a way to make caption portrait.

Display a PDF in a webview

I want to display a pdf in a webview, but the chrome pdf plugin only shows a blank/grey rectangel.
Am I missing a permission in my manifest.json?
Ok, it looks like that if the width of the webview is set to a high value (in my case I set it to 10000) the pdf renders only a grey rectangel. Resetting the width to a more sane value brings back the pdf.

XCode flipping pdf orientation

I'm doing some drawing on pdfs, and I've found what may be a problem on Xcode handling of pdf dimensions, which then become clear when CGPDFDocumentCreateWithURL is triggered.
I have two PDFs. One is A4 portrait size (612w x 792h) and it displays fine. The other one is closer to A4 landscape, 842w x 595h. While it displays in the UIScrollview I'm using, the vertical offset of page height (pageRect.size.height) in CGContextTranslateCTM caused it to move too far down the view. I NSlogged pageRect dimensions and found that the height and width had been flipped. I then checked back to the pdf's listing in supporting documents, and while clearly displaying the pdf as landscape, the dimensions were shown as 595x842, whereas the A4 portrait was correctly dimensioned as 612x792.
Has anyone else hit this problem, and is there a fix.
The link to the original landscape file is here.
You can create landscape pages in 2 ways:
set the width to 842 and height to 595 or
set the width to 595 and height to 842 and rotate the page with 90/270 degrees.
In your situation I assume you have a rotated portrait page (2).
After you get the page width and height you also have to get the page rotation and if the rotation is 90/270 you have to swap the width/height.
You also have to consider the origin of the coordinate system. When the page is not rotated the origin is in the visual bottom left corner of the page, visually X grows from left to right, Y grows from bottom to top. When the page is rotated with 90 degrees, the origin is in the visual top left corner, visually X grows from top to bottom, Y grows from left to right.
The actual PDF coordinate system does not change when the page is rotated, what changes is how to PDF coodinate system is mapped to what you actually see on the screen, this is what 'visually' refers to.

Superimposing PDF pages

I am trying to superimpose two pdf pages; one on top of the other. I am using Cocoa and the PDFKit framework. When I superimpose the second page onto the first, the second page covers the content of the first page entirely (so the first page is no longer visible). Is there a way to change the transparency of the second page so that its background is fully transparent so that the page underneath it is visible?
Thanks.
EDIT: Here is my method. Create a subclass of PDFPage that holds an instance of another PDFPage and in the following method of the PDFPage class, draw the superimposed page.
- (void)drawWithBox:(PDFDisplayBox)box
{
[super drawWithBox:box];
[overlayedPage drawWithBox:box];
}
Your code may be fine.
It can be caused by the PDF itself if it does have a non-transparent (white) background.
I would first try to operate with 2 PDFs that have "known good" (transparent) backgrounds, like most PDFs have.
You can easily check enable Acrobat Reader to show transparent background as a non-white raster. Use the settings dialog to achieve this:
This page has a background that is transparent. However, the white box's background is... white.
If your page background is non-transparent and white, the Reader would display all the page background in white.
You might want to try rendering the PDF into a bitmap to be displayed in a Core Animation layer. Then you can set the transparency of the layers to whatever you need.

SQL Server Reporting Services Change report layout to Portrait

Im writing a report with Reporting services that is almost always only going to be used as exported to PDF, but the PDFs i get are always in Landscape mode and i want them in Portrait (but only for this report)
Is there a way to change it between these pages layouts?
To change my reports to landscape, I simply swap the "PageSize" property's Height and Width values on the report itself. If I make the width 29.7cm and the height 21cm, I get a landscape report. The other way around is portrait.
Reports are portrait by default though - if yours are showing up as landscape and nobody has changed the height and width of the page, then I'm not sure what's happening.