A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Can I change page size in AS2 or AS3?

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    6

    Can I change page size in AS2 or AS3?

    Hi,

    I'm trying to print a mc which is bigger than the default page size. I want to change the page/margin size so the content can fit in the page without scaling.

    Per the API reference http://help.adobe.com/en_US/AS2LCR/F...LangRef_1.html, the page settings are readonly.

    How can I print something bigger than the default page size? Is it doable in AS2 or AS3?

    Thanks a lot in advance.

  2. #2
    Senior Member ExpertAnimators's Avatar
    Join Date
    Sep 2005
    Location
    On top of a mosh pit
    Posts
    131
    Hi Asdev,
    Sorry if I'm way off track here, but by saying "Print something bigger than the default page size" I'm interpreting your problem to mean that:
    * You have created a document and chosen a default size.
    * You have then created a movie clip which is much bigger than that size.
    * Now you want to print that movie clip without scaling it down.

    If my assumptions above are correct you could try:
    * Using the Window-Info box to get the dimensions of your MC
    * Chaning your document size to match - to do this open your 'Properties' panel and under properties click 'Edit' next to the size area.

    If I'm way off track, perhaps provide some more info for someone cleverer than I to help you.

    Happy Flashing.
    EA.

  3. #3
    Junior Member
    Join Date
    Jun 2010
    Posts
    6
    Sorry, I didn't make myself clear. Let me try to explain it better.

    I want my Flash app to print a document onto 8.5x11(LETTER size) papers despite of the current printer settings for margin and paper size. Since my doc has barcode on it, I have to keep its original size so the barcode can scan. To keep its original size, I have to use printer margin 0.25". So I have two questions:

    1. Can I programmatically set the page margin to 0.25" in AS2 or AS3?
    I saw a post saying we can set the printable area when calling addPage. I'm going to give it a try.

    2. If the printer's paper size is currently set to A4 for example, can I programmatically change the paper size to 8.5x11(LETTER)?
    I prefer to using AS2 to support Flash Player 7 and up.

    I saw one post in other forum saying you can call selectPaperSize method on PrintJob object to select your desired paper size as shown below:
    myPrintJob.selectPaperSize(PaperSize.LETTER);

    I tried it in AS2 but CS5 complained the selectPaperSize method is not defined.

    Hope I made myself clear this time. Please let me know if you still have questions.

    Thanks.

  4. #4
    Junior Member
    Join Date
    Aug 2013
    Posts
    24
    Quote Originally Posted by asdev View Post
    Sorry, I didn't make myself clear. Let me try to explain it better.

    I want my Flash app to print a document onto 8.5x11(LETTER size) papers despite of the current printer settings for margin and paper size. Since my doc has barcode on it, I have to keep its original size so the barcode can scan. To keep its original size, I have to use printer margin 0.25". So I have two questions:

    1. Can I programmatically set the page margin to 0.25" in AS2 or AS3?
    I saw a post saying we can set the printable area when calling addPage. I'm going to give it a try.

    2. If the printer's paper size is currently set to A4 for example, can I programmatically change the paper size to 8.5x11(LETTER)?
    I prefer to using AS2 to support Flash Player 7 and up.

    I saw one post in other forum saying you can call selectPaperSize method on PrintJob object to select your desired paper size as shown below:
    myPrintJob.selectPaperSize(PaperSize.LETTER);

    I tried it in AS2 but CS5 complained the selectPaperSize method is not defined.

    Hope I made myself clear this time. Please let me know if you still have questions.

    Thanks.
    but the barcode size can be reset for what you want

  5. #5
    Junior Member
    Join Date
    Aug 2013
    Posts
    24
    have you solved this barcode prob.?

  6. #6
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    cindy, you are responding to posts from 2010 for some reason. Stop please. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center