When printing pdfs, sometimes underlines go in random spots- sometimes they go on the word itself (which makes it look like a strikthrough) and other times it gets rendered way below the word.
![Click image for larger version.
Name: underlineIssue.PNG
Views: 3
Size: 10.5 KB
ID: 2155]()
In the image above the strikethroughs displayed are actually underlines in the original pdf.
The strange thing is that if I were to run my application on another machine with the same exact document it works fine.
Here's a snippet of code to give an idea of how I'm doing this:
Any ideas what I should be looking for to debug this issue?
Thanks in advance.
In the image above the strikethroughs displayed are actually underlines in the original pdf.
The strange thing is that if I were to run my application on another machine with the same exact document it works fine.
Here's a snippet of code to give an idea of how I'm doing this:
Code:
using (System.Drawing.Printing.PrintDocument cPrintDocument = new System.Drawing.Printing.PrintDocument())
{
cPrintDocument.PrintController = new System.Drawing.Printing.StandardPrintController(); //turns off the print progress dialog
cPrintDocument.PrinterSettings = cPrinterSettings;
cPrintDocument.DocumentName = documentname;
using (TXTextControl.ServerTextControl serverTextControl1 = new TXTextControl.ServerTextControl())
{
bool created = serverTextControl1.Create();
TXTextControl.BinaryStreamType t = TXTextControl.BinaryStreamType.AdobePDF;
if (cFile.Format.Replace(".", "").ToLower() == "doc" || cFile.Format.Replace(".", "").ToLower() == "docx")
{
t = TXTextControl.BinaryStreamType.MSWord;
}
serverTextControl1.Load(cFile.Bytes, t);
serverTextControl1.Print(cPrintDocument); //loads bytes into printdocument, attaches event handler, and calls pd.print()
}
retval = true;
}
Thanks in advance.