Persistent zero left margin when printing A5

Hello,

I am using the script below to try to print A5 (HTML print) (148 mm x 210 mm). Everything is working fine except that the left margin printout is zero, which causes the first letters of words starting on the left to be partially cut off.

In the script below, I exaggerated the left margins, just to see if the script has an impact on left margin printing which it does not.

I tried everything imaginable am still cannot increase the left margin.

Please note that apart from the left margin problem, all is fine, including top, bottom, right margins, header and body font size, etc

thank you for your time and help

——————————————————

@page { size: A5 portrait} [[title]] @charset "utf-8";

html {
width: 148mm;
height:210mm;
// size A5 portrait;
margin-left:20;
margin-right:10;
font-size: 100%;
font-family: “Helvetica Neue”, “Helvetica”, sans-serif;
}
h1 {
font-size: 18px;
color: blue;
/* background-color:yellow ;
display: inline-block; */
text-align: center;
font-family:arial;
}
h2 {
font-size: 14px;
color: black;
text-align: center;
font-family:arial ;
}
h3 {
font-size: 14px;
color: black;
font-family:arial ;
}
body {

margin:30; margin-left:20; color: black; font-family:arial ; font-size: 13px; padding:1em; } @media (max-device-width: 480px) {

}
@media (min-device-width: 481px) {
body {
// JL margin auto to 10
margin:20;
max-width:600px;
}
}

blockquote {
font-style: italic;
}

code, pre {
border-radius: 3px;
background-color: yellow;
color: inherit;
}

code {
border: 1px solid #EAEAEA;
margin: 0 2px;
padding: 0 5px;
}

pre {
border: 1px solid #CCCCCC;
line-height: 1.25em;
overflow: auto;
padding: 6px 10px;
}

pre > code {
border: 0;
margin: 0;
padding: 0;
}

table {
margin: 1em 0;
border: 1px solid #aaa;
border-collapse: collapse;
}

th {
padding:.25em .5em;
background: #efefef;
border: 1px solid #ccc;
}

td {
padding:.25em .5em;
border: 1px solid #ccc;
}

img {
max-width: 90%;
}

Can you screen shot your print preview (as opposed to preview)? As it stands I can’t get anything to actually change the margins on any side with any CSS.

Currently I’m always getting what looks like an A4 page with 2-2.5 cm margins. I’ve tried a variety from various web sources as well as hacking them back to basics around media, etc. but all with the same non-result to this point.

I’m wondering if perhaps my default local printer is affecting it?

Even pinching in to view a PDF-able version gives me the same result.

1 Like

Thank you for giving my question some thought.

Snapshot below from my iPad.

I tried the following:
. increasing margins in drafts configuration
. printing directly using both air print and google print. With google print, I set the printer options to paper size A5. With air print, there does not seem to be a paper size option.
. printing using the Print Central Pro app and configuring paper to A5
. configuring paper size A5 directly in my printer using the printer configuration menu
. putting A5 paper in my printer just in case there is a feedback mechanism from the tray to indicate to the printer the size of the paper.
. it’s not a printer problem because I can print A5 from my Mac, for example using Nisus Writer Pro.

Once again, I reiterate that top, bottom, and right margins are fine. The sole problem is that the left margin seems to be set to zero, causing the 1st and part of the 2nd letter at the beginning of each line to be truncated.

On the snapshot below, you see A5 size on an A4 size background

thanks again

Okay. That’s broadly the same sort of output that I see where on screen the margin looks to be over an inch on all sides.

I don’t see A5 on an A4 background though in your screenshot. ISO A paper sizes are all identical proportions and the relative text size looks appropriate to A4. So I don’t see where the A5 comes in. Maybe I’m overlooking something?

Is it only when you physically print that you see the margin issue or can you see it on screen in the preview?

If the former, is there any chance you have access to a second printer to compare against? I realise you say it works okay on a different type of device, running a different OS, with different software, but that’s like saying there ain’t a communication issue because two people speak in English whilst when someone else tries to communicate to one of the same people and has only limited luck because they only speak a little English; only enough to ask for directions for example.

A5 on A4 background: you are right and the snapshot below is the proof. It is the same printout using the A4 script.

I will get going on printing on another printer. I have an old second printer. Problem is that it is not air print nor google print compatible. I will look for a solution and get back to you.