# Printing in A4 Landscape - Margin problem

**URL:** https://forum.kirupa.com/t/printing-in-a4-landscape-margin-problem/276749
**Category:** flash
**Created:** [December 3, 2008, 9:36am UTC](https://forum.kirupa.com/t/printing-in-a4-landscape-margin-problem/276749 "2008-12-03T09:36:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bojosiri](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@bojosiri](https://forum.kirupa.com/u/bojosiri)
#### Post date: [December 3, 2008, 9:36am UTC](https://forum.kirupa.com/t/printing-in-a4-landscape-margin-problem/276749/1 "2008-12-03T09:36:55Z")

</div>

Hi Every1.

Im trying to print a certificate in a4 landscape format and i managed to do that fine, however the problem im getting is that when it prints it does not adjust the margins, which in the end, it ends up with a tiny left margin and a massive right one, even though the movieclip that is being printed is in the correct size etc.  
How can I center the movieclip on the print out?

Here is my code:

```auto

import flash.printing.PrintJob;
import flash.display.Sprite;
import flash.text.TextField;
import flash.display.Stage;
import flash.geom.Rectangle;

function PrintScaleExample() {
	printPage();
}
function printPage():void {
	var pj:PrintJob = new PrintJob();

	if (pj.start()) {

		var margin_height = (pj.paperHeight - pj.pageHeight) / 2;
		var margin_width = (pj.paperWidth - pj.pageWidth) / 2;

		try {
			certMC.x = margin_width;
			certMC.y = margin_height;

			certMC.width = 11.11 * 72;
			certMC.height = 8.33 * 72;

			certMC.rotation = 90;
			
			pj.addPage(certMC);
		} catch (error:Error) {
			// Do nothing.
		}
		pj.send();
	} else {

	}

}

```

Thanks for your help guys! Really cant find anything or do anything about this, have wasted about a thousand trees due to this issue ¬¬ lol

:upset:
