Can you post a simple file that demonstrates what you perceive to be the issue??
I am going to suspect printer driver margins interfering... but that is an uninformed guess at best
I'm not sure that I can. It's file-specific, in that I can't make it happen in a new test database. The file it's affecting is a very complex one, with medical records, so I can't post it.
I had discounted printer drivers, given that the pdf file itself prints correctly to the same printer, and that the test database is also printing correctly. It must be something specific to this one database.
To clarify what's happening - the pdf is created perfectly, with correct margins. But the print command results in a document with everything shifted upwards by 17mm. I could compensate by shifting everything in the layout down 17mm, but then the pdf would come out wrong.
There could be a combination of things here.
1. Save as pdf works to the page layout specs you have set, and therefore looks right.
2. Printing brings in printer software and hardware issues. The extra top margin may be printer specific. If you can, try printing on a different printer to see if you get a different result. At the very least, print a test page on the printer you are using, thus: draw a fat vertical line that goes from top edge to bottom edge of an A4 page; draw a horizontal line from left to right edges; to make sure you know the orientation, label the four edges—well inside the page edges—top, bottom, left right. Print this page—the amount of line not printed at the paged edges will show you the extent of default margins the printer uses; you can then adjust you layout to suit.
3. The fact that the pdf itself looks right when printed could be simply because the default setting with pdf printing (certainly Acrobat) is resize to fit, so your page might look right because it has been resized to 97% or some such, which is not instantly perceptible. Check the print settings and see.
One layout design technique to use with layouts from which you will print and or generate PDF's is to go into layout setup and specify some page margins for all sides of your page. Margins of at least a half inch should result in layouts that fit to pages much more consistently from one printer to another and also for Save As PDF.
Agreed however I've found that I rarely can set a bottom margin of 1/2" (36pts) without error. So I opt for the 3/4" (54pts) bottom margin. It seems to be ok for more printers.
Sent from miPhone
I think I've fixed it now. I deleted the Print step in the script and added it in again, and it seems to print fine now. I really can't see what was wrong - I made a copy of the script beforehand, and as I go through all the various print settings comparing the two commands I can't see any difference between them. I guess at some point the settings had become invisibly corrupted.
Thanks for the help everyone!
[Edit: Hadn't seen all the above replies when I posted this. Just to clarify, my margins were in centimetres, with 2cm top and bottom and 1.5cm left and right. I had tried a range of top and bottom margins, going up to 5cm (2 inches), but every time the top margin printed out 17mm less than directed. Incidentally, the bottom margin was also MORE by 17mm, indicating that the entire page had moved upwards.]
Yes, I do recall having to go up to about .6. But it seems most recent printers can print a bit closer to the trailing edge these days, but as they say, Your mileage may vary and that's what we are trying to avoid here.
Thanks! when it comes to printing or web, I've switched to points. and I rarely use decimals in any dimension. I go up to the nearest whole point.