Preserving page orientation.

Apr 29, 2014 at 4:03 PM
I am using Ghostscript.net to create a PDF document viewer using the GhostscriptRasterizer for a number of files, some of which are intended to be viewed as landscape.

The orientation of the rasterized pages seems to always be portrait in my viewer, regardless of how they appear in Acrobat. This behavior also appears in the viewer bundled with the component. The only reference to orientation that I have found searching the code is the ORIENT1 switch in gs_init.ps, which did not seem to make a difference when I changed it from True to False.

Is there some way that I can preserve the orientation of the page when rasterizing them or detect the orientation of the page within the PDF so that I can handle rotating it after the rasterizer has completed its operation?

I apologize if I've missed something; thanks for any assistance, and thanks for this great component.
Coordinator
Apr 29, 2014 at 6:46 PM
Hi,

This is fixed for the future release (1.1.7). You can get latest source code from the https://github.com/jhabjan/Ghostscript.NET or apply changes to existing from the https://github.com/jhabjan/Ghostscript.NET/commit/06f19f295b0586da93827fec1c8e788d7c772220

Cheers,
Josip
May 1, 2014 at 3:51 PM
Perfect! Thank you very much.