Print PDF gdpicture9

Example requests & Code samples for GdPicture Toolkits.
Post Reply
Albertotj
Posts: 1
Joined: Mon May 07, 2018 6:29 pm

Print PDF gdpicture9

Post by Albertotj » Mon May 07, 2018 6:42 pm

Good afternoon, this is my code and I try to print a c: \ file.pdf, but when I send it to the printer I realized that the size of the file is smaller than the original file can you help me,

This is my code, the commented are the different attempts I have made to get it printed.

thanks and best regards

path = "c:\\imprimir\\123.pdf"

impresora = "Sertec"
public void gdpicture(string path, string impresora)
{


GdPicturePDF oGdPicturePDFSrc = new GdPicturePDF();
GdPicturePDF oGdPicturePDFSrc1 = new GdPicturePDF();
GdPictureImaging ogdimagen = new GdPictureImaging();
GdPictureStatus Status = GdPictureStatus.OK;
ogdimagen.SetLicenseNumber("*********");
oGdPicturePDFSrc1.SetLicenseNumber(*************");


if (oGdPicturePDFSrc1.LoadFromFile(path, false) == GdPictureStatus.OK)
{
System.Drawing.Printing.PrinterSettings prnSettings;
prnSettings = oGdPicturePDFSrc1.PrintGetPrinterSettings();

//prnSettings.FromPage = 0;
//prnSettings.ToPage = 4;
//prnSettings.MinimumPage = 1;
//prnSettings.PrintRange = PrintRange.SomePages;
//prnSettings.Collate = true;
prnSettings.FromPage = 1;
prnSettings.DefaultPageSettings.Color = false;
////prnSettings.PrintFileName = @"C:\imprimir\123.pdf";

oGdPicturePDFSrc1.PrintSetPrinterSettings(prnSettings);
//oGdPicturePDFSrc1.PrintSetActivePrinter(impresora);

//setting = prnSettings.ToString();
oGdPicturePDFSrc1.Print();
}

oGdPicturePDFSrc1.CloseDocument();

}

Gabriela
Posts: 415
Joined: Wed Nov 22, 2017 9:52 am

Re: Print PDF gdpicture9

Post by Gabriela » Thu Jan 17, 2019 2:28 pm

Hello,

For such cases, we need the document you want to print. You can simply attach it here if it is possible. Each PDF document is unique, so we can't offer a common solution to a problem without deeper analysis. But you can try to use our latest published release available here https://www.gdpicture.com/download-gdpicture/ if the issue still persists, as the GdPicture 9 is a very old one. Please find here the very simple example of printing documents using GdPicture:
http://guides.gdpicture.com/content/web ... rePDF.html
Kind regards,

Gabriela
GdPicture Team

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest