Posted by: edv on 20 October 2020, 12:23 am EST

  • Posted 20 October 2020, 12:23 am EST


    I am using C1.C1Pdf.C1PdfDocument to save a scanned image to pdf. It works fine.


    Dim image As Image …

    Dim pdf As New C1.C1Pdf.C1PdfDocument()

    Dim rect As RectangleF = pdf.PageRectangle
    rect.Inflate(-5, -5)
    pdf.DrawImage(image, rect, ContentAlignment.TopLeft, C1.C1Pdf.ImageSizeModeEnum.Clip)



    Is it possible to save the pdf-document as read only with timestamp?


  • Replied 20 October 2020, 10:11 pm EST


    To change the security properties of the document you can use the Security property of the PdfDocument to set properties like AllowCopyContent, AllowEditAnnotations, and etc (refer to this link given below). If you want to change the attributes of the saved file, first make sure you have the right to change the file attributes then you use the File class of the System.IO assembly to change the attributes like ReadOnly, LastWriteTIme, creationTime, etc using its methods.

    For example:-


    The above line of code sets the file to read-only.

    For more on File Class refer to this link -

    Hope this helps.

    Prabhat Sharma.
  • Marked as Answer

    Replied 20 October 2020, 11:06 pm EST

    "Security property" is exactly what I meant.

    Thank you very much.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels