Scale page to fit printer margins

I have a printer for labels with a special layout and can’t get the printing to fit the margins, it prints only a small portion of the page.

Is there a way (programmatically or not) to scale the page to fit the printer margins as in this example?

Thanks in advance.

Best Regards,
David Dumitrascu

Hello David,

if the setting is available in the printer’s driver dialog, you could make the setting there.
As of List & Label 27, we have introduced scaled printing. Could this help you?

Hi Thomas,

thank you for your quick answer!

Could you give me a snippet on how could that be archieved with C# programmatically?

Thanks!

Hi David,

Sorry, but this is not possible via code. You have to set this interactively in the dialog.

Hi Thomas,

I was testing your solution and its far from ideal for various reasons.

  • The List & Label printer settings have an option to “Save options permanently” that doesn’t work, or at least for me everything comes back to the default settings. Not even the selected printer is saved.

  • It lacks a automatic scaling to fit the page margins as in the example I’ve shown in the OP. So a guesswork is necessary to get the right scale.

  • The printer options that I’ve set in the printer manager are not being used, instead it loads the default values.

Selected preferences in windows:

Preferences that are being loaded by L&L:

I have tested that in other programs and it loads the windows saved properties.

Best Regards,
David Dumitrascu

Hi David,
if you specify the option “Save options permanently” the options
are saved in a special p-file (e.g. report.lsp ). If you do not activate the option (default) no p-file will be created. In this case the defaults of the driver should be used. However, the paper size results from the size used in the design.

Hi Thomas,

I didn’t see that in the documentation, how should I use that “p-file”?
Is this configuration “p-file” related to the printer I have selected or is it generic?

I still don’t understand why the print dialog doesn’t use the default values saved in the printer configuration through windows settings.

And you forgot to answer me about the automatic scaling to fit the page margins.

Best,
David Dumitrascu

Hi David,
Unfortunately, this question can not be solved in the forum. We need additional information that cannot be exchanged through the forum platform.I’d suggest to open a support case via our support portal at My acccount: Login, user registration, product registration. Please copy any pertinent information from this thread into the case description.

Thank you

© combit GmbH