include PDF metadata

Asked

Viewed 213 times

1

I need to include a text in the metadata area of a pdf printed via Delphi using Pdfcreator version 3.51 as a virtual printer.

I searched I tried to do by the manual of Pdfcreator and searched on the internet but could not do. Someone could help?

Below the code part for printing:

uses ... ActiveX, ComObj, PDFCreator_COM_TLB;

//Parte da procedure que faz a impressão:
var
   sDocUser:         String;
   bTemPdf:          Boolean;
   job,
   PDFObject:        OleVariant;
   pdf:                    IPDFCreator;
   LPrintJob:         IPrintJob;
   LQueue:            IQueue;

begin
     ...
     sDocUser := skey + '-' + sDoc + '-' + '7899067733';
     SetDefautPrinter('PDFCreator');
     rptIProt.PrepareReport;  // relatório feito em fastreport
     PDFObject := CoPdfCreatorObj.Create;
     LQueue := CoQueue.Create;
     LQueue.Initialize;
     LPrintJob.SetProfileSetting('Keyword', sDocUser);  // linha com o erro

error presented:

project pReport.exe Raised Exception class Eaccessviolation with message 'Access Violation at address 0054EB4A in module' pReport.exe '. Read of address 00000000 '. Process pReport.exe (9408)

  • Edit your question and enter more information, so we can help you better. Enter the code of what you tried so far, will you missing just fill out a property? :D

  • Place a [mcve] of the code in question.

  • No one could help???

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.