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();
}
Print PDF gdpicture9
Re: Print PDF gdpicture9
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:
https://www.gdpicture.com/guides/gdpicture/web ... rePDF.html
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:
https://www.gdpicture.com/guides/gdpicture/web ... rePDF.html
Who is online
Users browsing this forum: No registered users and 2 guests