Skip to main content

We use a printer called dummy_printer to print on various printers from a table using the overwrite printer name parameter. This worked until we had a windows update a few days ago, after which the printer suddenly ignores all defaults and preferences set on the printer server (PRN01).

The addresses we use for the printers look like this: \\ROVEGPRN01.Roveg.local\Label1_Test_KBS.

We checked all defaults and preferences on the printer server to make sure they are set up correctly, and they are. We also tried local printers (installed on the indicium server), which equally do not use the printing defaults and preferences. Instead we get a zoomed in (not fit to page) and un-rotated version.

Does anyone know where to set the printing defaults/preferences for printing from thinkwise?

Printing via Indicium uses a so-called PrintTicket in which only the modified values are supplied.

For instance, when no page oriented is mapped via the process action, the Thinkwise Platform will not supply an orientation in the PrintTicket, leaving the orientation up to the driver/printer.

I hope this clears things up a bit, though I cannot answer why the default values within your environment seem to have changed.


Hi, Anne. 

Thanks for your answer, but I do have one more question: we're using a subflow with a process action called "print file."

Should we enter values ​​here (see screenshot below)? For example, the page orientation? Because we're currently getting a zoomed-in (not page-fitting) and un-rotated version.

 


Hi Geurt,

Setting the values here will explicity instruct the printer (driver) to use the supplied settings instead of the printer default settings. When you use these settings, do you get the correct result?


Hi ​@Anne Buit,

No, unfortunately not. I've now adjusted these settings, but the sticker is still very zoomed in. I also set the image to landscape mode, but that didn't change the result.

I think the problem also lies in the fact that it's a label printer, and it's printing on a label. It seems like it's printing from the application in A4 format and inserting it somewhere on a label without getting it in the exact label format.

 

 


I was able to solve it for us by rerouting the printing task through my own API, using a web connection.

For this, I also had to do some custom scaling to get the image to “fit to page”:

var pageBounds = e.PageBounds;

// Calculate scale to fit image proportionally inside the margin bounds
float scale = Math.Min(
(float)pageBounds.Width / image.Width,
(float)pageBounds.Height / image.Height);

// Calculate target size
int width = (int)(image.Width * scale);
int height = (int)(image.Height * scale);

// Calculate centered position within the margin bounds
int x = pageBounds.Left + ((pageBounds.Width - width) / 2);
int y = pageBounds.Top + ((pageBounds.Height - height) / 2);

// Draw the image scaled to fit the page
e.Graphics.DrawImage(image, x, y, width, height);

Which means that it’s not just thinkwise that lost the auto-scaling that was happening automagically before. What caused it to change other than the windows update I still do not know.

I was able to rotate my images (portait/landscape) using the printing defaults, which did not have an effect on thinkwise. This is probably because Thinkwise by default sends a portrait or landscape instruction to the printer, which will always overwrite the default setting. Changing the orientation in the print task parameters does also change the orientation in the printer, if I remember correctly.

In conclusion, it would be nice to have more control over the scaling of the image sent to the printer. In addition to that it would also be nice to be able to print other formats than PDF (images, for example). The printing feature in thinkwise has a lot of potential to be expanded.


Hi Jkruter,

Thanks for the clarification on your solution on location.

We definitely have plans to check and improve this later on.

Best regards,
Erik Brink