Setting the document name

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
palehorse
Posts: 4
Joined: Mon Feb 26 2007

Setting the document name

Post by palehorse »

Is there a way to set the value that shows up in the "Document Name" column of a print queue when using the IacDocument.Print() method? Currently it always shows up as "PDF Creator". We would like to be able to give a little better description for a large number of small jobs that are sent to the printer fairly rapidly.

Thanks in advance
-Joel
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,


Yes, you can modify the document's title attribute before printing.

private void btnPrint_Click(object sender, System.EventArgs e)
{
//Open file-steam
System.IO.FileStream fs = new System.IO.FileStream("c:\\temp\\jose.pdf",
FileMode.Open,
FileAccess.Read,
FileShare.Read);


pdfCreator.Document.Open (fs, "");

//Change document title pdfCreator.Document.AttributeByName("Title").Value = "my document title";

//Print something
pdfCreator.Document.Print ( "", false);
}

Hope this helps?
palehorse
Posts: 4
Joined: Mon Feb 26 2007

Post by palehorse »

Thanks, that worked great!
Post Reply