Serializing PageFormat

I would like my application to remember the page format selected in the PageDialog and use that setting as the default next time the application is executed.
Sounds easy...but PageFormat is not serializable.
Ok I could extract page size and image offset and size to make a new PageFormat next time, but that doesn't record the page size name (such as A4, Letter etc).
I doubt if making a serializable subclass is an answer either because most of the printing system is really native code anyway.
Every time I run the program I have to change from letter to A4 and set the margins how I want them which can be very frustrating. I am sure there must be lots of people who have had the same problems.
Many thanks in advance,
Howard Amos

Looking at the source code, I see the following state:
PageFormat:
int orientation
Paper paper
Paper:
double height
double width
Rectangle2D imageableArea
And I don't think the returned objects, like from PrinterJob's pageDialog involve any subclasses.
So, while it's dirty and may need to be rewritten if features are added, I think you can just write the listed data and read it back in. What about A4 etc? My guess is that the paper type is inferred from paper width and height.
--Nax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Check(Script) - Pageformat

    Hi friends,
    I need the pageformat to assign as exactly as to my Check script.Here,Im using only the check window as needed to print the check details same to my client bank cheque.So, as u aware, the height of the check size will be upto approx 8cm and my client are using the dot matrix serial print cheques(continuous one as rolling format).
    Just reply me the exact pageformat.
    ****I've tested with available std INCH4/4C/2 and scheck formats but got no results.
    Pls advise.
    thanks & regards
    sankar.

    Hi,
    Solution for this problem will solve by your client, ask cleary the what the pageformat they are using. and by trail and error basis set the window heights, and Format the line, Paragrah, characer format.
    Bye

  • Projeto - Reconhecimento de Voz e Comunicação Serial

    Olá, estou desenvolvendo um projeto no qual devo reconhecer comandos de voz e enviar posteriormente informações através de comunicação serial.
    A idéia do projeto é a seguinte :
    - Reconhecer comandos de voz como "POSIÇÃO 1, POSIÇÃO 2"
    - Para cada comando reconhecido, uma mensagem deve ser enviada via comunicação serial.
    No entanto, não venho conseguindo reconhecer comandos de voz através de alguns VI's fornecidos pela NI, então venho pedir ajuda para procurar um caminho para começar a construir tal projeto.
    Grato desde já.
    Gilberto Neto
    Estudante de Tecnologia em Mecatrônica Industrial
    Faculdade de Tecnologia Termomecanica

    Olá, achei bem interessante este projeto, porém tenho algumas perguntas:
    Existe alguma especificação quanto ao Hardware para capturar o sinal?
    Quando você diz: "Reconhecer comandos de voz como "POSIÇÃO 1, POSIÇÃO 2", você está se referindo que o conteúdo da mensagem falada é "POSIÇÃO 1,POSIÇÃO 2" ou que isso é uma mera identificação para uma mensagem diferente?
    Capturar o sinal emitido pela voz é relativamente fácil,porém a identificação e interpretação desse sinal que é algo mais complexo (Relativo a segunda pergunta que eu fiz). Com as VI's da paleta (Sound), você irá apenas coletar esse sinal, porém a análise heurística para interpretação fica a cabo do desenvolvedor. Felizmente, existem algumas Library como o SAPI e outras para abreviar este processo.
    Sobre a serialização deste sinal, você será basicamente "obrigado" a trabalhar com filas de tamanho fixo , pois os dados devem ser armazenados em sequência e serem despachados em blocos ANTES de serem repassados as funções VISA. Uma dica é repassar essa informação utilizando dados do tipo Digital (0,1) em vetores bidimensionais para assegurar que a mensagem seja serializada completamente (sem perder nenhum bit pelo caminho)
    Você irá precisar de 3 Loops: Um para a captura dos dados, um para interpretação e arranjo e outro para envio das informações. Pesquise sobre a arquitetura QMH ou P/C. Não é necessário usar nada mais complexo neste quesito
    Espero que eu tenha ajudado
    "In theory, theory and practice are the same. In practice, they’re not."

  • Deploying only Acrobat XI Pro CC package w/ Enterprise Serial # - Still getting "Sign In Required"

    Downloaded Creative Cloud Packager to create a serialized package of only Acrobat XI Pro.  I further customize the deployment via Adobe Customization Wizard XI, but did not re-enter the serial number (as suggested).  I am able to deploy from the Exceptions folder with the following cmd, msiexec /i "%inst%AcroPro.msi" PATCH="%inst%Updates\AcrobatUpd11006.msp" TRANSFORMS="%inst%Transforms\en_US.mst" /qn.  Upon launching Acrobat, I receive the a pop-up message, "Sign In Required.  Siging in with an Adobe ID and registering Creative Cloud Membership Enterprise is required within 32767 days otherwise it will stop working."  I don't understand why the serial number and Adobe ID I enterred when packaging did not carry over.  Any insight would be appreciated.

    Downloaded Creative Cloud Packager to create a serialized package of only Acrobat XI Pro.  I further customize the deployment via Adobe Customization Wizard XI, but did not re-enter the serial number (as suggested).  I am able to deploy from the Exceptions folder with the following cmd, msiexec /i "%inst%AcroPro.msi" PATCH="%inst%Updates\AcrobatUpd11006.msp" TRANSFORMS="%inst%Transforms\en_US.mst" /qn.  Upon launching Acrobat, I receive the a pop-up message, "Sign In Required.  Siging in with an Adobe ID and registering Creative Cloud Membership Enterprise is required within 32767 days otherwise it will stop working."  I don't understand why the serial number and Adobe ID I enterred when packaging did not carry over.  Any insight would be appreciated.

  • Using a serial Wacom tablet on a Mac Pro

    I have a good Wacom tablet with serial port interface that I would like to connect to a Mac Pro.
    Is there some way to do this? Is there any sort of serial to usb adapter or would that not work with a Mac Pro?
    Thanks for any advice.

    I don't think so. See these knowledge base articles from Wacom:
    http://www.wacom.com/faqs/knowledge_search.cfm?id=67
    http://www.wacom.com/faqs/knowledge_search.cfm?id=185

  • HT1349 How do you get help from apple if you don't know where to find the serial number of my "product."  I don't know if they mean my itunes program, my iphone, my computer, which one, the number on the computer (is there one), or something in Windows or

    How are you supposed to get help from Apple if you don't know what your serial number is?  They say to input the serial number of the "product" that you are asking about.  Since my problem is how to deauthorize/authorize computers, and they are saying I have more than 5 (which I have never owned more than 5 computers in my life), I can't imagine what serial number they mean.  Does it mean your desktop computer?  If so, which one?  Do they mean your device?  LIke your iPhone, iPod or whatever?  Do they mean the software ON one of your computers and/or devices?  If so, which program, and on which computer/device?
    We have three operational computers, one does not have iTunes on it.  Since Apple is saying I have more than 5 authorized computers, and I can't imagine what they are, I am afraid to deauthorize all my computers.  See what I mean?  I just wanted to ask the question about how I can find out WHICH computers Apple thinks I have authorized, so I can decide if it's safe to deauthorize them all or not.  I only know of 2 computers that have iTunes on them, so how can there be 5?  We also have 2 iPhones and 2 iPods in this family, but one of the iPhones has his own apple id.  He may have been using mine, since his computer died.  I read that those don't count as "computers" to the 5.  Do they, then?
    Help!  I can't contact apple because I have no idea what they mean about serial number.  I doubt they would help me anyway.  In order to get the serial number off my desktop computer (that has iTunes on it already), I will have to move furniture, so I don't want to if that's not it.  Is there some way to find the serial number in the software, either on my desktop or my iPhone?

    sunshinecowgill wrote:
    We have three operational computers, one does not have iTunes on it.  Since Apple is saying I have more than 5 authorized computers, and I can't imagine what they are, I am afraid to deauthorize all my computers.  See what I mean?  I just wanted to ask the question about how I can find out WHICH computers Apple thinks I have authorized, so I can decide if it's safe to deauthorize them all or not. 
    You could have more 5 computers authorized if you ever, for example, reformatted a hard drive or replaced a hard drive without deauthorizing the computer first. Apple's system would see that as a different computer, even though you don't. There's nothing to be afraid of in deauthorizing everything and the reauthorizing what you actually have. You won't lose any data. Mistimp is correct, they can't tell you which computers are authorized.

  • How Many Times Can I Use The Same Serial Number For Adobe Creative Suite 4?

    I have design standard and was told I can use the same serial number on multiple computers. How many time can I use it? And say I install it on the maximum number of computers, but get a new computer, can I uninstall it on one of the old computers and use it on the new one? And can I use the programs on both computers simultaneously or do I have to use them one at a time?

    Fred Tech wrote:
    Broadly speaking, it depends on the type of license you have.
    Specifically, if you have a single license then officially, you should only install it once on one computer.
    Practically, (unless it has changed with CS4) you maybe able to install it on more then one computer, BUT can only run one instance of the software at a time. You can not run more then one instance of the software concurrently; i.e. you can't run Dreamweaver on Computer 1 and Photoshop on Computer 2. That would be two instances, and is not permitted.
    This is my understanding. I am happy to be corrected if I am wrong
    Fred
    Sorry Fred you are wrong.
    If you have a single license you can install it on as many computers as you like. you can only activate the suite on two computers at anyone time. Work and Home or as many of us do it Desktop and Laptop. You can not use the computers simultaneously. You only have 20 activation/deactivations so use them wisely. Student versions only have one activation. You can not break up the suite installs the suite is considered one application.

  • How do I transfer an Acrobat serial number from one adobe account to another?

    I've installed Adobe DC Pro on one of our user's computers. When it asked for an Adobe ID I entered the ID I used to purchase the serial number. Unfortunately now acrobat always starts on the new computer and displays my name instead of the end user name. So I'm wondering how to either transfer the serial number to the end user's adobe account, or alternatively re-associate the acrobat on the end user machine with the end user's own adobe account.

    contact adobe support by clicking here and, when available, click 'still need help', https://helpx.adobe.com/contact.html

  • How many computers can you authorize with one serial number?

    Hey guys.
    I'm thinking about buying a 2nd Mac, but I'm just curious how many total computers you have authorize Logic studio on at one time (my guess would be 3 but I hope more).
    Please let me know if you can.
    Thanks,
    Nathan

    I'll copy my post from the other thread:
    I don't know for the others but in my retail package ((not upgrade) I found two serial numbers. Though I haven't got time yet to try the second serial number on my MacBook, my logic says that with two different serials I could run both macs simultaneously and be on the network. But, my logic fails so often so it's better to shut my mouth, install Logic on MacBook and come back here again.

  • How many times can you use a serial number?

    I used my serial number on one computer and I'm trying to use it on the other computer. But, on the other computer, it keeps saying that the serial number is invalid. I checked my number to see if i typed it correctly, and its correct but it still wont work! So I'm wondering if you are allowed to use one serial number on two computers. (I'm triying to use it to download the Adobe Photoshop Elements 11 app)

    You need to contact Adobe Support when you have serial number and activation issues, either by chat or via phone.

  • My serial number for Logic Studio doesn't work. I used one from a different box and it worked. How can I get a new number?

    My serial number for Logic Studio doesn't work. I used one from a different box and it worked. How can I get a new number?

    http://support.apple.com/kb/TS2005
    http://support.apple.com/kb/HT1861
    https://ssl.apple.com/support/proapps/serialnumbers/

  • How do I find a serial number for my iPod touch that I used with iTunes

    I used my iPod touch previously to down load music and I am looking for the serial number for that device....is the information stored in iTunes somewhere?

    The serial number of your device can be located at the back. Check on this page for more information.

  • Error message with a Serial Number after purchasing CS6 Design Standard

    Hello everyone,
    I have an error message "we are unable to validate this serial number for CS6 Design Standard" when using my official serial number.
    I got the Serial Number from my Adobe ID account and e-mail purchase validation.
    And no phone number to contact. Someone knows what I could do ?

    You should Contact Customer Care via chat; phone support is only available Mon-Fri during US daytime.

  • DI API error while adding AP Invoice (Using serial Nos.)

    Hi,
    Im getting the following DI API error when adding an AP Invoice which has serial numbers and i cant seem to find any logical fault in the code.
    " [PCH1.WhsCode][line: 4] , 'This entry already exists in the following tables (ODBC -2035) "
    If anybody has encountered this error and found a solution kindly let me know.

    Hi Vivek,
    Are you trying to add same document number, serial number or so on?
    "entry exist " means like "duplicate key problem", I guess.
    Basically, whscode column in PCH1 table allows duplicating.
    So, I think serial number is duplicated among same item code.
    Hope this useful for you.
    Regards,
    Hyunil Choi.

  • Goods Receipt PO, Based on Goods Return, Including Serials

    Hi All,
    When you received an item to stock from your vendor, and the item was defective,
    You should return the item to the vendor using 'Goods Return'.
    What should one do in the following case:
    Instead of crediting the returned item - the vendor decided to fix the defective part - and resend it to our stock.
         The normal procedure, as I know it, would be to copy the 'Goods Return' to a 'Goods Receipt PO'.
    However, if the item is managed by serials - The system won't allow me to return the same serial to stock,
    and only lets me create a new serial.
    If I will type the original serial manually in the 'Goods Receipt PO', the system will simply create a new record in the serial table (assuming duplicated serials are allowed).
    What is the correct way to handle this situation ?
    Many Thanks ! 

    Anyone ??
    Pretty Please .....

Maybe you are looking for

  • Field in the dropdown in PCR.

    Hi, We have custom infotype 9500 and bonus types are maintained in custom infotype. there are 6 entries in the bonus types dropdown and one field in the dropdown xxxxx we are not using from 2008. We dont want that field to fetch to the portal in the

  • How can I sync photos from events in iphone 4s to macbook pro?

    The hard drive in my macbook pro crashed so I had to get a new hard drive. Unfortunately, all the data in the hard drive, including photos, music, and movies are all gone . All of my files are in my iphone 4s. When I try to sync some of the photos to

  • Pages works real slow

    Hello, I'm a Computer Science student and I write all my assignments in Pages, I use a lot MathType in my documents to enter equations. Pages gets really really slow and lagging when typing and moving the cursor after filling about half of the page.

  • LZW won't stick in export preset

    When I set up a TIFF Export preset, I cannot get LZW compression to stick. It's always Compression = None. Building a new preset or updating an existing one -- doesn't matter. Is this a Lightroom bug or just me? MacPro, latest Leopard, LR 2.4, tons o

  • Sending unix command with java

    Hi! I need to terminate program from server with "Ctrl+x" command. How do I send this kind of command to the server?