PDF Creator & Producer (Document) Information change

Hi

I want to programitically change "Creator/Producer paramtere values via programming in vb.net.


How can i do this.

Comments

  • You can use:

    PDFExport pdfExport = new PDFExport();

    pdfExport.Creator = "CreatorName";

    pdfExport.Producer = "ProducerName";

  • Try

          Dim i As Integer

          i = DataGridView1.CurrentRow.Index

        currentid = DataGridView1.Item(0, i).Value.ToString()

        MsgBox(currentid & " : Please note this ID for Report Printing", vbInformation)


         Dim report1 As New Report

          report1.Load("3.frx")

          report1.Prepare()

          Dim myreportx As String = "D:\Letter_Head.pdf"

          myreportx = myreportx.Replace(".pdf", "_" & System.DateTime.Now.ToString("dd-MM-yyyy") & "_" & DateTime.Now.ToString("hh-mm-ss") & ".pdf")

          Dim export As FastReport.Export.Pdf.PDFExport = New FastReport.Export.Pdf.PDFExport()

          report1.Export(export, myreportx)

               Process.Start(myreportx)

         Catch ex As Exception

          ' MsgBox(ex.Message)

        End Try



    This is my vb.net code. Where I need to put your code and please provide in vb.net not in C Sharp.

    Thanks,

  • Thanks It worked. I converted c sharp code to vb.net online.


    Thanks. It worked like a charm. You are genius.

  • Hello!

    You can programmatically change the metadata of a PDF document (Creator and Producer) before exporting (including in VB.NET) using the properties of the PDFExport object:

    Dim pdfExport As New FastReport.Export.Pdf.PDFExport()
    pdfExport.Creator = “MyVBApp 1.0”
    pdfExport.Producer = “Custom Producer”
    ' If necessary, also: .Title, .Author, .Subject, .Keywords
    report.Export(pdfExport, “output.pdf”)
    

    We’re glad the tip from the forum helped you solve the problem!

This discussion has been closed.