I hadn't tried it, but I really expected that when you went to the Windows Printer Properties and in there created a custom size for "Custom 1", and then select "Custom 1" in InfoPath, that it would work as expected.
I'm glad you were able to find a solution though.
--
Greg Collins [InfoPath MVP]
Visit
http://www.InfoPathDev.com
Nope, you're not missing anything
The dropdown does contain "custom 1-20". However, I cannot find any
documentation on what those sizes are. When I try to use one of them, it
always acts like a 8.5 x 11.
What I was talking about is making a completely custom size (one that I set
up) through the printers & faxes area. I can set the height and width
exactly how I think they should be. Windows takes it fine and MS Word can
see it. However, InfoPath cannot. I thought that was pretty odd.
I've decided to move on and create a web based - custom solution. The code
I used to create the app is posted below... Maybe it might help someone else.
Greg, I sincerely appreciate your help!
C# 2005
using System.Drawing.Printing;
PrintDocument printDoc = new PrintDocument();
printDoc.PrinterSettings.PrinterName = PrinterToUse;
printDoc.DefaultPageSettings.PrinterSettings.Copies = NumberOfCopies;
//Create a custom paper size. This enables the printer to print the card and
//not line feed.
PaperSize customPaperSize = new PaperSize("Generic ID Card", 550, 365);
//Attach the paper size and then associate an event to be raised.
printDoc.DefaultPageSettings.PaperSize = customPaperSize;
printDoc.PrintPage += new PrintPageEventHandler(PrintDoc_PrintPage);
printDoc.Print();
private void PrintDoc_PrintPage(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
//Set the font to use
System.Drawing.Font printFont = new System.Drawing.Font("Arial", 10);
//"draw" the text in the exact location on the form. The 8, 132 tells the
printer to move 8 points to the right and 132 down from the top
e.Graphics.DrawString("Some text", printFont, System.Drawing.Brushes.Black,
8, 132);
e.Graphics.DrawString("Some more Text", printFont,
System.Drawing.Brushes.Black, 8, 145);
}
Greg Collins said:
Hmm. Didn't you say that your drop-down list showed custom 1-20? Aren't these what you are looking for? Maybe I'm missing something.
--
Greg Collins [InfoPath MVP]
Visit
http://www.InfoPathDev.com
Hi Greg, thanks again.
Yes, I've tried your suggestion and created a custom form size. However,
this custom form size does not show up in InfoPath. It only shows the same
paper sizes everytime. I don't know why infoPath isn't picking up the new
additons.
As a test, i created a c# program to make a completely custom printer size.
I wanted to use this new program to test the printer and see if it can even
do what i'm looking for.
I was able to do:
PaperSize customIdCardSize = new PaperSize("ID Card custom Size", 550, 360);
And print. It came out fine. Therefore, I can be reasonably sure that the
printer isn't the issue.
Greg Collins said:
I would assume that if there are custom sizes available, that you would need to set those up through your printer properties. If using WinXP:
* Click Start, and then Printers And Faxes.
* Right-click your printer, and then choose Properties.
Dig around in there--there should be something that allows you to create those custom print sizes.
--
Greg Collins [InfoPath MVP]
Visit
http://www.InfoPathDev.com
Thanks for your response Greg...
Yes, I go to View Properties --> Page Setup and then select the paper size
from the drop box. It doesn't seem to be making any difference.
I did some research on wikipedia on the various paper size standards and
found some info on the A1,A2 type sizes. Neither worked in this case. In my
paper size dropdown i have a bunch of custom sizes (custom 1-20)... Do you
know what they are or if maybe one would give me the aspect that I need?
Thanks for answering these questions... if i don't get it resolved soon the
bosses will make me move on to another solution and I want to stick with
Microsoft!
Greg Collins said:
You cannot set the size programmatically. But did you try going into your view properties and setting the page size there?
--
Greg Collins [InfoPath MVP]
Visit
http://www.InfoPathDev.com
Hello, I have an InfoPath form that will fill out an insurance card on a dot
matrix printer. The printer uses a card stock that has three cards to a
"sheet". Each card is about 3 inches high and about 5 inches wide.
I can print the first card with no trouble. However, after the first card
is printed, the printer feeds up about 2 cards and screws everything up. Its
basically like printing the first card and then twisting the form feed knobs
a few times.
How can I tell it to not do the paper feed and position its self for the
next card?
So far i've tried playing around with the paper sizes (A5, B5) and haven't
had any luck. Any ideas? Anyone know what the custom(1-20) paper sizes are?
Thanks very much for any help you can provide!!