ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnIO->PrintImage on printer: PDF Error 11: PostScript Error: LIMITCHECK
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Morgan

France
7 Posts

Posted - Apr 23 2024 :  09:21:36  Show Profile  Reply
I'm using ImageEn version 12.5.0.

I want to be able to print the same image several times on a single A4 page with a 600ppi printer.

Here's the example code for printing 3*6 images (this fits on an A4 page with my test image):
...

        ImageEnIO->LoadFromFile(pathFile);  //load image 4128x2322 px

	if (!PrinterSetupDialog->Execute()) //select printer
		return;

	//retrieve page dimension information
	TPrinter* printer = Printer();
	int widthPx = GetDeviceCaps(printer->Handle, HORZRES);
	int heightPx = GetDeviceCaps(printer->Handle, VERTRES);
	int DensiteLspx = GetDeviceCaps(printer->Handle, LOGPIXELSX);
	int DensiteLspy = GetDeviceCaps(printer->Handle, LOGPIXELSY);

	//reading basic image dimensions
	int widthPxImg = ImageEnIO->IEBitmap->Width;
	int heightPxImg = ImageEnIO->IEBitmap->Height;

	int nb_img_width = 3;  //number of images per line
	int nb_img_height = 6; //number of lines, with 4 this work

	//take the image size required for printing
	int widthMinImg = widthPx / nb_img_width;
	int heightMinImg = heightPxImg * widthMinImg / widthPxImg;

	ImageEnIO->IEBitmap->Resample(widthMinImg, heightMinImg); //image resized to print size

	//global image creation
	TImageEnIO * imgGlobal = new TImageEnIO(this);
	imgGlobal->IEBitmap->PixelFormat = ie24RGB;
	imgGlobal->IEBitmap->Resize(widthMinImg*nb_img_width, heightMinImg*nb_img_height);
	int PosXPx = 0;
	int PosYPx = 0;
	for(int i = 0; i < nb_img_height; i++){
		PosYPx = i * heightMinImg;
		for(int j = 0; j < nb_img_width; j++){
			PosXPx = j*widthMinImg;
			ImageEnIO->IEBitmap->DrawToTIEBitmap(imgGlobal->IEBitmap, PosXPx, PosYPx);
		}
	}
	/*float widthInch = ((float)imgGlobal->IEBitmap->Width*1.0) / ((float)DensiteLspx*1.0);
	float heightInch = ((float)imgGlobal->IEBitmap->Height*1.0) / ((float)DensiteLspy*1.0);
	imgGlobal->PrintImagePos(0,0, widthInch, heightInch); */
	//we define the image resolution
	imgGlobal->IEBitmap->ParamsEnabled = true;
	imgGlobal->IEBitmap->Params->DpiX = DensiteLspx;
	imgGlobal->IEBitmap->Params->DpiY = DensiteLspy;
	//print
	imgGlobal->PrintImage(0, ievpTop, iehpLeft, iesNormal);
	delete imgGlobal;

...

But the printer only prints a message :
PDF Error 11: PostScript Error: LIMITCHECK .

But with 3*4 images it works. They print fine.

Do you know why?
Is there a solution to make this work?

xequte

38608 Posts

Posted - Apr 23 2024 :  15:23:09  Show Profile  Reply
Firstly, please note that you can print multiple images to page using:

http://www.imageen.com/help/TImageEnMIO.PrintImagesToBitmap.html

Though I don't think it will make any difference here, because the error is occurring when you send the image to the printer.

Are you printing to a PDF driver (to create a PDF page)? Does it work correctly when you output to a different printer?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Morgan

France
7 Posts

Posted - Apr 24 2024 :  02:37:31  Show Profile  Reply
Yes, printing with a PDF driver works without a problem. It's printing on a physical printer that causes the problem.
Go to Top of Page

Morgan

France
7 Posts

Posted - Apr 24 2024 :  03:46:01  Show Profile  Reply
Installing the printer driver update works...

Thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: