0
votes

I am trying to convert PDFDoc object to a pdftronprivare.PTPDFdoc object. I have read the file into the PDFDoc oject and then add a StampText to the file. But then I will be using PrepareDocToPrint method that will only take in pdftronprivare.PTPDFdoc object. My goal is to be able to send this new updated file to the printer.

Is there a way to convert PDFDoc to pdftronprivare.PTPDFdoc object?

    var docToPrint = new PDFDoc(Path.Combine(documentsPath, FileName));
    docToPrint = AddDisclaimer(docToPrint, UserName);

    pdftron.PDF.PTPrint print = new PTPrint();
//Need to Convert the object
    print.PreparedToPrint(docToPrint, new PrintDelegate(this.View), sender as NSObject);
1
Could you please add the classes / nugets you are using for doing this (just to make sure everyone is on the same page?).Erik J.

1 Answers

1
votes

Using the ConvPDFDoc class will convert PDFDoc to pdftronprivare.PTPDFdoc

var privatePdfDoc = TypeConvertHelper.ConvPDFDocToNative(docToPrint);