Skip to main content
15-Moonstone
February 13, 2020
Solved

How to remove border from print using laserjetv4 in pcf file.

  • February 13, 2020
  • 11 replies
  • 7725 views

Hello, 

 

I want automate printing drawings in creo, which mostly works fine with our printer but there is a huge white border around while I use laserjetv4 printer type. Obviusly I can't use MS_PRINTER_MANAGER if I want to automate the whole process. I attached my .pcf file for reference but it doesn't really look like that it has anything to do with it.

Only the "plotter" settings seems to affect the border. Anyone can help me with this problem?

 

 

Best answer by mvitárius

At the end of the day I had to go with your 2nd suggestion, to simulate a click on the print dialog box. I use vb.net for automation and here is the code if anyone ever needs it:

 

 

Imports System.Runtime.InteropServices

Dim hWndAbout As IntPtr = FindWindowExW(IntPtr.Zero, IntPtr.Zero, Nothing, "Print") 
 Dim hWndOkButton As IntPtr = FindWindowExW(hWndAbout, IntPtr.Zero, "Button", "Ok")
 SendMessageW(hWndOkButton, BM_CLICK, IntPtr.Zero, IntPtr.Zero)
 SendMessageW(hWndOkButton, BM_CLICK, IntPtr.Zero, IntPtr.Zero)

 

 

Source is from: Microsoft forum , the rest of the code is at the bottom of the thread. Not really the best solution for my original problem, but as close to it I could get.

 

11 replies

Dale_Rosema
23-Emerald III
February 21, 2020