Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Mar 06, 2020 9:52 am

I have a document that I have used SpirePDF to add a Watermark to (code below). If I print this on a HP printer through a a PCL driver it produces the document perfectly with the page contents and watermark appearing correctly.

Add Watermark code

private void AddWaterMark(string filePath, Image watermark)
{
var pdf = new PdfDocument();
pdf.LoadFromFile(filePath);
PdfPageBase page = pdf.Pages[0];
page.BackgroundImage = watermark;
pdf.SaveToFile(filePath);
pdf.Dispose();
}

Move to postscript Driver

If I open the document in Adobe Reader and print to a Postscript printer driver (same physical printer as above) then it works perfectly.

BUT

If I use a Postscript driver and print using the code below then only the Watermark is printed and the actual contents of the page are not printed. (The physical page only contains the watermark)

pdf.LoadFromFile(filePath);
pdf.PrintSettings.PrinterName = item.QueueName;
pdf.PrintSettings.Duplex = System.Drawing.Printing.Duplex.Vertical;
pdf.PrintSettings.PrinterResolutionKind = Spire.Pdf.Print.PdfPrinterResolutionKind.Low;
pdf.PrintSettings.Color = true;
pdf.PrintSettings.DocumentName = item.FileName;
pdf.Print();

Any ideas?

regards
Dan Kenny.

dankenny
 
Posts: 5
Joined: Sat Feb 15, 2020 3:45 pm

Fri Mar 06, 2020 10:32 am

Hello,

Thanks for your inquriy.
To help us further investigate your issue, please provide the following information.
1) Your source file without watermake, your watermark image as well as your watermarked file.
2) Your printer name and model, E.g. HP LaserJet P1007.

You could attach here or send them to us(support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Mar 06, 2020 3:11 pm

Sent via email as requested.

dankenny
 
Posts: 5
Joined: Sat Feb 15, 2020 3:45 pm

Mon Mar 09, 2020 6:36 am

Hello,

Thanks for your email and sorry for the late reply as weekend.
I tested your file and indeed reproduced your issue. This issue has been logged into our bug tracking system with the ticket SPIREPDF-3100. If there is any update, we will let you know.
Sorry for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF

cron