• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

How can I make the PDF be recognized as a different Paper Type on a Commercial Printer?

recently started a project to move reports to be generated as PDFs. I generate many reports into many PDFs. At the end of the Process, I use PDFSharp to combine the results into a single PDF. This has all worked fine.

However, the Printer has 6 different trays. It pulls certain paper for different paper types (Letter, A4, ect...).

My combined PDF and single document PDFs all print on plain white paper. I need invoices to print on perforated paper sources, but I have no way to tell the printer that this paper type is different.

The printer is a KODAK NEXPRESS SX Platform.

http://graphics.kodak.com/US/en/product/printers_presses/comm_sheet/digital_color/nexpress/sx/support/drivers/default.htm

How can I make the PDF be recognized as a different Paper Type?

Any advice would be appreciated.
0
farminsure
Asked:
farminsure
1 Solution
 
Bob LearnedCommented:
I believe that you need to set the PdfPage.Size property, as shown here:

PDFsharp Sample: Page Sizes
http://www.pdfsharp.net/wiki/PageSizes-sample.ashx?AspxAutoDetectCookieSupport=1

// Create a new PDF document
PdfDocument document = new PdfDocument();
 
// Create a font
XFont font = new XFont("Times", 25, XFontStyle.Bold);

PageSize[] pageSizes = (PageSize[])Enum.GetValues(typeof(PageSize));
foreach (PageSize pageSize in pageSizes)
{
if (pageSize == PageSize.Undefined)
continue;
 
// One page in Portrait...
PdfPage page = document.AddPage();
page.Size = pageSize;
XGraphics gfx = XGraphics.FromPdfPage(page);
gfx.DrawString(pageSize.ToString(), font, XBrushes.DarkRed,
new XRect(0, 0, page.Width, page.Height),
XStringFormats.Center);

// ... and one in Landscape orientation.
page = document.AddPage();
page.Size = pageSize;
page.Orientation = PageOrientation.Landscape;
gfx = XGraphics.FromPdfPage(page);
gfx.DrawString(pageSize + " (landscape)", font,
XBrushes.DarkRed, new XRect(0, 0, page.Width, page.Height),
XStringFormats.Center);
}
 
// Save the document...
const string filename = "PageSizes_tempfile.pdf";
document.Save(filename);
// ...and start a viewer
Process.Start(filename);

Open in new window

0
 
DansDadUKCommented:
>> ... different paper types (Letter, A4, ect...) ...

I don't know the answer, but (perhaps backing up the reply from Bob Learned) would like to point out that values such as A4 and Letter are Paper Sizes - typical  Paper Types are Plain and Letterhead.
0
 
hdhondtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now