Illustrator SDK :: CS3 - How To Change Page Size Of Active Document
Feb 15, 2014
Apparently, in the CS3 is impossible to do any scripting and using any actions. Can it be done using plugins sdk, without creating a new document? I tried using the functions SetPageSetup and SetCropBox but no effect
I'm trying to change the active document window size with vb.net. This seems like it should be straightforward, but I'm having some trouble. Below is some code that I tried to use which I found on the AutoCAD DevBlog.. I thought I understood how this works, but I can't seem to import the correct references to make it work.
Dim doc As Document = Application.DocumentManager.MdiActiveDocument() Dim docWindow As Window = doc.Window Dim size As Size = docWindow.Size docWindow.WindowState = Window.State.Normal docWindow.Size = New Size(500, 500)
It does almost what I need it to do. except that it also copies the ".ai" in to the layer name. Is there some way to modify this script to have it exclude or delete the file extension?
I love the new versions of Illustrator, but get left in the dust with new innovations that I can't figure out.
I am trying to go to File > Document Setup and all I get is a new dialog box that completely leaves out page orientation and page size as well. I just want to have an artboard that is 11" x 8 1/2" but there is nothing I see in menus or in palettes that give the old comfortable page orientation change that you used to be able to do in older versions of Illustrator. How do I set page or artboard size and orientation?
I quite often need a separate ruler scale on each page of a multi-page document. The only way I know how to do this is to create a separate document for each drawing that requires a new scale.
I request that you add the ability to change the ruler scale on a per page basis within a single multi-page document.
Is there event for change current (active) layer of document?
(it's not Database.ObjectModified - it's not raised).
I tried to do it with binding as:
public void Initialize() { var layerList = Application.UIBindings.Collections.Layers; layerList.PropertyChanged += new PropertyChangedEventHandler(LayerList_PropertyChanged);
And -= in Terminate, but... Autocad 2012 chashed _sometimes_!!!
Impossible to understand when it happened. So I reject this way. Is there other way to handle this event?
I use and action to print, save, save to desktop as PDF(using custom preset), close.New acocunt I am working on requests 2 printouts, but cannot record that in the action. If I can edit my actions. Am inexpereinced with this code but my guess is this is the area:
I have a document with multiple pages. How can I change the background of only one page? In the layout settings I only can set the background for all pages.
I am working with multiple page document in Illustrator CS6. I have saved my document in .pdf. Before I managed to open the whole file, but now it asks me which page I want to open. Can I some way open again the file as a multi page file and work with all the files at the same time?
in an open PDF File i press 'Ctrl+A' to select all Items in the document, then i choose Edit/Transform/rotate ... 90 degree.now i'd like to do the same with an vbscript.
the best thing i could find is:
rotate(90) Sub rotate (degree) Dim appRef, argument, element Dim changePositions, changeFillPatterns, changeFillGradients, changeStrokePattern, rotateAbout Set appRef = CreateObject("Illustrator.Application")
[code]....
not all, but all elements i am interested in are rotated - it would be better if really all elements would be rotated the elements are rotated around 'aiTransformDocumentOrigin' ... i would prefer if they are rotated around 'middle of document'.
How to go about making it only change the color of text frames on the active layer? In the final script I will hide all other layers so if it could be done by a visible attribute more easily that would work just as well.
I am currently preparing a brochure and need to have one page (of six) in DIN A3 instead of A4 like the others. But I find no possibility to change just the page I need into A3.
After moving a page in my document the master page elements no longer display on screen or in print. If I move the page to a different location in the document the master displays but if it is in the specific position that it needs to be it will not display. The document has multiple Masters and others do work on the page but the one that I need will not. I've tried deleting the page and adding a new one and that does not fix the problem. I've checked and "Hide Master Items" is not checked. The page in question is in position 48 with F-Master applied. If I move it to position 49 it works, 50, it works, 51, or any other it works. If I apply a different master to the page, it works. If I delete the page, add a new page and apply F-Master it still does not work. The only page that this problem is happening on is page 48.
Printing pdf's to an HP Designjet 1055 using the new Acrobat X version. I can't change the page size from 8.5x11and nothing comes out at the 1055. Works fine to our Xerox 6204 printers. Looks like I could be going back to Acrobat 9.4...
I have a set of Lightroom Print templates that I am trying to use, that are all for a 4x6 print. I can't get it to work because my page setup in the print module defaults to letter size. When I go in and change the page setup, it messes up the template and it gets all jumbled. Then when I go on to the next template, it switches back to letter size again. I want to create and hold a 4x6 canvas so these templates can either be saved to a 4x6 .jpg or printed on 4x6 paper. I know I can save a printer and page layout as part of a template by clicking the "update settings" once I have it all as i want it, but I can't even get that far because it messes up the template as soon as I change the page settings to 4x6. How do I get the canvas to 4x6 on templates that are already created so I can save them as a 4x6 .jpg or print to 4x6 paper?
I even just installed a printer that only prints 4x6 to see, but again, when I change the page layout it completely messes up the template.
This code works with no errors but does not change the text size. A user can over ride the text size (Font size) so I'm hoping it is possible thru code.
Dim oSketch As Inventor.Sketch Set oSketch = oPartDoc.ComponentDefinition.Sketches("Sketch1") Dim oText As Inventor.TextBox Set oText = oSketch.TextBoxes.AddByRectangle(pnt1, pnt2) oText.Style.FontSize = 0.1
Have been working on a little something and would like to know what units the user is using in their document. Basically what is selected here:
The thing is, no matter what is there (and while all other menus and such use the units) Active Document.unit stubbornly returns inches. Is there a way to get the proper ones using VBA?
When I go to create a new Document in Illustrator I'll select a default document type like : Mobile and Devices. Then I go down to the different sizes and bam. The problem. I can't pick a default size that "I" want to use. Yes there are preset sizes but none of them are the ones I want to use. Ok there has to be a text file or something that lets me edit/add new document sizes to illustrator. It shouldn't be this hard. I don't own CS6. I'm on an older version of Illustrator right now. I don't know if you guys fixed this in CS6. But it should be like photoshop or indesign. Why it's different baffles me.
This is a JDI if there ever is one. Make all presets in all programs the same (editing wise) and if possible make a preset manager that allows for one preset to be added or edited and all apps see these presets.
How can I stop changing active document? I was thinking I could use this, but I don't know how to cancel it in the event handler:
AcadApp.DocumentManager.DocumentToBeActivated += new DocumentCollectionEventHandler(DocumentManager_DocumentToBeActivated);static void DocumentManager_DocumentToBeActivated(object sender, DocumentCollectionEventArgs e){ // Messagebox to ask if user are sure bool AreYouSureYouWantToChangeActiveFile = MessageBox.... if(!AreYouSureYouWantToChangeActiveFile) //cancel change active file somehow...???}
I would like to turn off all the existing layers in active document. I have found in developer's guide how to turn off one layer with specified layer name but can not apply it on all layers with any layername.
I tried to get all the Object ID's in layer table and then for each object turn layer off but seems that it does not work.
<CommandMethod("FilterLayers")> _Public Sub FilterLayers()'' Get the current document and databaseDim acDoc As Document = Application.DocumentManager.MdiActiveDocumentDim acCurDb As Database = acDoc.Database'' Start a transactionUsing acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()'' Open the Layer table for readDim LayerTable As LayerTable = acTrans.GetObject(acCurDb.LayerTableId, OpenMode.ForRead)Dim LayerTableRecord As LayerTableRecord = acTrans.GetObject(LayerTable.ObjectId, OpenMode.ForWrite)For Each ObjectId In LayerTableLayerTableRecord.IsOff = TrueNext'' Save the changes and dispose of the transactionacTrans.Commit()End UsingEnd Sub
Im not even sure if Illustrator is the program or if i should use Indesign but im trying to create a single folded wedding invitation and be able to print on both sides. i want the invitation to be 14cm x 14cm and like i mentioned open up like a card and print on the front and on in the inside. Can you pleasssseeee direct me to some instructions or tell me which program would be best to do this. Im guessing that since its smaller than an A4 page size then i will need to cut it down after printing. To be able to do this do i need to make the canvas the size of a A4 page and then put my size of the invitation on this??
I've currently undertaken a project for truck design. They have requested for the final design to be 10% of the final size at 300 dpi and they will be using a large format printer, so no panel printing.
Here's the problem- even at 10% it is too large for the document restrictions.
The 24 ton truck at 10% of the final size is 1,278 meters by 228 meters.
All my Adobe programs won't even let me touch this final size, they limit me completely.
How do I create a final output size of 1,278 meters with the preset limitations and keeping a final output of 300 dpi?