Hi again,
I've got another question regarding trays in a roundabout way. The tray stuff I'm not too concerned about, but what I am interesting in is the use of PaperSizes in Aspose.
Basically I have this situation:
- I have a printer where you can specify custom paper types
- I create a paper type with A4 dimensions, but call this paper type "JoJo"
- I open Word, type some stuff, select that printer
- I open Page Setup (whichever Word version), go to Paper tab.
- I select "JoJo" as my paper size (which is A4 with a different paper size name).
Now when I create an Aspose Document class in code, I generally do this:
- Create new instance of document using file path
- Create new instance of Printing.PrinterSettings class, set to printer with "JoJo"
- When I loop through PaperSizes on that printer, I can see "JoJo" and the rawkind.
- I use code similiar to:
asposeDoc.GetPageInfo(0).GetDotNetPaperSize(pSettings).RawKind
- Now I'd expect the RawKind of the Aspose call to match the RawKind when I looped through the paper sizes on that printer. But I don't I usually have 0 returned.
What my question is:
Because I can save that document in Word, open it up again (this is not even considering Aspose in the picture yet) and see that it knows the PaperSize I picked earlier, I'm guessing Word saves this information into the file itself.
Can I read the paper size from the Aspose document? I can if the size is normal and not a custom one, but what I'd like to do ideally is:
- Read document in using Aspose
- Get the custom paper size, specfically the custom name of the paper size for an individual page
Is there anywhere I can do this?