Apache PDFBox - Creating PDF in Landscape Mode - reporting

I am currently trying to generate PDF file in landscape mode using Apache PDFBox version 2.0.17.
In Portrait mode, PDF got generated properly.
In landscape mode, the data in PDF is also rotating to 90 degree.
Is it possible to create PDF in landscape mode using Apache PDFBox?
To create landscape PDF I am using below code,
PDPage page = new PDPage();
page.setMediaBox(PDRectangle.A4);
page.setRotation(90);

Related

Non-dev Marketer using Drupal 7 having trouble adding images to our homepage - only showing codes after uploading image into Media Browser

Image field is set to default. Image views in edit mode, just not on live site. I've tried using different image types (jpg, png) but not working.

Image stretching in ios not working (ios)

I've got an image and when I apply different stretch modes - aspectFill and aspectFit seem to work as fill mode.
This is ios.
What I'm trying to achieve is to fit a portrait photo w/ proper aspect - even if the device is in landscape mode.
I think aspectFit is the proper mode.
Any help?

using UIImage to load png image in landscape mode

I have an app running in landscape mode (home button on right) I built long time ago using Xcode 4. It loads a 480 x 320 png file as background image and has been working well. Recently I updated my Xcode to 5 and the image is loaded in a portrait orientation not landscape anymore. I thought it was an Xcode compatibility issue and easy to fix first but couldn't find my way out and had to ask for some help here.
I have found that Xcode 5 sometimes disregards the settings for orientation when converting or interpreting an old project file. Find the place where you set the orientation for your target and set the orientation again explicitly.

FREE3OF9 barcode font not displaying in Firefox's new built-in PDF viewer

I have a PHP web app that uses FPDF (v1.53) and the FREE3OF9 barcode font to dynamically generate a PDF which includes a barcode string in it. In versions of Firefox prior to 19, the PDF opened in a new tab, was displayed by the Adobe Acrobat plugin, and the barcode showed up perfectly fine.
Now that Firefox 19.0 is using its own built-in PDF viewer, the barcode no longer displays at all. It continues to display fine in IE and Chrome. How I can get the barcode to display correctly in the newest version of Firefox?

RDLC Embedded Image Distorted In PDF

I have a very simple RDLC report I've built with a PNG image in the header. After many trials we could not get external images to work with the report in staging and production.
I then embedded the image in the RDLC and deployed the updated file. The image displays in the ReportViewer control fine. However, when using the export functionality of the viewer to get a PDF the image comes out garbled and distorted. It basically looks as if the image was like the Star Wars intro text but repeated vertically till it disappears. This happens both on my test machine and in stage/production.
Is there something I'm not doing correctly with embedding the image? I've thought about seeing if I could MIME encode the image another way and then insert that into the RDLC. Seems stretched to work though.
Figured this out.
It does have to do with the encoding, in a way. It appears that the PNG encoding is doing weird things. I tried JPEG and GIF encodings and both work in the ReportViewer and PDF export. I tried changing to different PNGs (transparency and non-transparent) and had various distortion issues.
It is my suggestion that if using an embedded image with the ReportViewer that will be exported to PDF that you should use GIFs or JPEGs for embedding in your RDLC.
I just encountered this issue. For me, the PDF you can generate from the SSRS preview showed the PNG just fine. But when i published the report to SharePoint and then managed email subscriptions to send a PDF, that PDF showed the image all screwy (basically tilted image and then repeated vertically). In my case, I was using a PNG file that had a resolution of greater than 4000 x 4000. I resized it to something more like 1200 x 1200 and the PDF from the subscription showed the PNG just fine.

Resources