Change Advanced Print Setup options

Hello


When I use this code
using (PdfFileSecurity sec = new PdfFileSecurity())
{
sec.BindPdf(stampedStream);
DocumentPrivilege documentPrivilege = DocumentPrivilege.ForbidAll;
documentPrivilege.AllowScreenReaders = true;
documentPrivilege.AllowPrint = true;
documentPrivilege.PrintAllowLevel = 2;
sec.EncryptFile(password, Guid.NewGuid().ToString(), documentPrivilege, KeySize.x128);
sec.Save(securedStream);
}

and after that I save file to PDF.

When I open this file in Acrobat Reader I see Print As Image is checked in Advanced Print Setup.

I want property Print As Image is unchecked.

How to fix this Problem ?








Hi,

Thanks for contacting support. I have tested the scenario using Aspose.Pdf for .NET 11.2.0 where I have used one of my sample PDF files and when using resultant file in Adobe Reader 10.1.16 and I am unable to notice any issue. Can you please try using latest release and in case you still face any issue, please feel free to contact. We are sorry for this inconvenience.

Hi


I create samples and attached to files samples.pdf and result.pdf
If you open result.pdf You see Print is Image is checked
Hi,

Thanks for sharing the resource files.

I have tested the scenario using input file and code snippet which you have shared and I am unable to notice any issue. As per my observations, Print As Image checkbox is appearing unchecked. For your reference, I have also attached the resultant file generated over my end. Furthermore, when viewing the result.pdf file which you have shared, I am able to notice the Print As Image is appearing unchecked. Can you please try using latest release and in case you still face any issue, please share some details regarding your working environment i.e. Operating System, .NET Framework version, Adobe Reader version etc.

We are sorry for this inconvenience.

[C#]

using (PdfFileInfo fileInfo = new PdfFileInfo("c:/pdftest/Sample.pdf"))

{

using (MemoryStream stampedStream = new MemoryStream())

{

MemoryStream securedStream = new MemoryStream();

PdfFileStamp pdfStamp = new PdfFileStamp();

try

{

pdfStamp.BindPdf("c:/pdftest/Sample.pdf");

pdfStamp.Save(stampedStream);

}

finally

{

pdfStamp.Close();

}

using (PdfFileSecurity sec = new PdfFileSecurity())

{

sec.BindPdf(stampedStream);

DocumentPrivilege documentPrivilege = DocumentPrivilege.ForbidAll;

documentPrivilege.AllowScreenReaders = true;

documentPrivilege.AllowPrint = true;

documentPrivilege.PrintAllowLevel = 2;

sec.EncryptFile(null, Guid.NewGuid().ToString(), documentPrivilege, KeySize.x128);

sec.Save(securedStream);

}

using (FileStream fs = new FileStream("c:/pdftest/Updated_result.pdf", FileMode.Create))

{

securedStream.WriteTo(fs);

}

securedStream.Close();

}

}

Hi,

Thank you
I find error.
Hi,

Thanks for the acknowledgement. We are glad to hear that your problem is resolved. Please continue using our API's and in the event of any further query, please feel free to contact.