I want to create a simple docuement with 2 pages?

I want to my plugin to create a simple document as soon as My Plugin is loaded in Indesign. I have derived my class IStartupShutdownService  so that it's called in startup.
But this is failing at line 23 below.
What else do I need to include in my .fr file?
class LTestStartupShutdownServiceImpl : public CPMUnknown<IStartupShutdownService>
public:
    LTestStartupShutdownServiceImpl(IPMUnknown* boss);
    virtual ~LTestStartupShutdownServiceImpl();
    virtual void Startup();
    virtual void Shutdown();
CREATE_PMINTERFACE(LTestStartupShutdownServiceImpl, kLTestStartupShutdownServiceImpl)
LTestStartupShutdownServiceImpl::LTestStartupShutdownServiceImpl(IPMUnknown *boss):CPMUnknown<IStartupShutdownService>(boss)
    do
        const PMReal width=612, height=792;
        const int32 numPages=5, numPagesPerSpread=1;
        // Create the command.
        InterfacePtr<ICommand> newDocCmd(Utils<IDocumentCommands>()->CreateNewCommand());  //<-----this is coming null and failing
        ASSERT(newDocCmd);
        if (newDocCmd == nil)
            break;
        // Set the command's parameterised data.
        InterfacePtr<INewDocCmdData> newDocCmdData(newDocCmd, UseDefaultIID());
        ASSERT(newDocCmdData);
        if (newDocCmdData == nil)
            break;
        newDocCmdData->SetCreateBasicDocument(kFalse); // Override the following defaults.
        PMPageSize pageSize( width, height);
        newDocCmdData->SetNewDocumentPageSize(pageSize);
        bool16 bWide = kTrue; // landscape orientation.
        newDocCmdData->SetWideOrientation(bWide);
        // Size margin proportional to document width and height.
        PMReal horMargin = width / 20;
        PMReal verMargin = height / 20;
        newDocCmdData->SetMargins(horMargin, verMargin, horMargin, verMargin);
        newDocCmdData->SetNumPages(numPages);
        newDocCmdData->SetPagesPerSpread(numPagesPerSpread);
        // Create the new document.
        CmdUtils::ProcessCommand(newDocCmd);
    while (false);
LTestStartupShutdownServiceImpl::~LTestStartupShutdownServiceImpl()
void LTestStartupShutdownServiceImpl::Startup()
void LTestStartupShutdownServiceImpl::Shutdown()
Below is the .fr file:
* Boss class definitions.
resource ClassDescriptionTable(kSDKDefClassDescriptionTableResourceID)
Class
  kLTestStartupShutdownServiceBoss,
  kInvalidClass,
  // Implementation of IStartupShutdownService
  IID_ISTARTUPSHUTDOWN, kLTestStartupShutdownServiceImpl,
  // Implementation to IK2ServiceProvider to identify the service type as startup-shutdown
  IID_IK2SERVICEPROVIDER, kLTestStartupShutdownServiceImpl,

Hi maddy,
I want to save the document to MyDocuments folder, I tried to look in IDocFileHandler but I can not get a function which takes path/name as input with docRef.
Can u suggest how can my document to disk?
I dont want user to enter any detail, the document just created should get saved on Disk with the use of some commands only.

Similar Messages

  • How to create a  PDF document with page curls using Adobe  CS 4?

    My  goal is to create a  PDF document with page curls. I am using Adobe  CS 4.
    1.      The document was created in Adobe InDesign  CS 4  where the page  turn (curl) transition  was applied.
    2.      Then the document was exported to .swf.
    3.     The .swf file was imported into   Adobe Acrobat Pro  to create a PDF file with  flip page or page curl transitions.
    These are the problems.
    1.      The background is not  transparent.
    2.      Page dimensions have to be increased at least an inch in width and length so that the full page can show
    3.      The command and+   will not only increases the document's  screen size. It increases the page margins.

    PDF was never designed to support the Flash page curl effect (it didn't exist back then). Anything you try (and you've tried the standard hack) will look like a hack. Personally, I don't think the effort is worth it for an effect that's much overused.

  • How do you create data base documents in Pages '09?

    Can you create Data Base documents with Pages, or any of the iWork Apps?

    If you want to create and use true databases, you must use an other app dedicated to this feature.
    There is a powerful database tool in LibreOffice but it requires a serious learn curve.
    There are numerous available apps starting from Bentoy to FileMaker or 4th Dimension.
    Matter of needs and finances.
    Yvan KOENIG (VALLAURIS, France)  dimanche 11 décembre 2011 10:54:27
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Creating a new document with different formats, i.e. A5

    Hi there,
    I want to create a nwe document in A5 with about 10 pages, how to do that?
    thanks a lot
    gustavo

    Hello
    I guess that triggering the menu item :
    File > Page Setup…
    may help.
    It's from this one that we may define the paper format.
    Yvan KOENIG (VALLAURIS, France) dimanche 22 mai 2011 12:37:12
    Please :
    Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Am creating document with Pages. pages are in "portrait" orientation, but two charts at end need to be "landscape". changing the orientation for one section changes it for entire doc. can i have different orientations in Pages for different sections?

    am creating a document with Pages.  all pages using "portrait" orientation, except 2 appendices need to be in "landscape".  in Word for Windows it is possible to have different page orientations for different sections of a document.  is that possible with Pages.  Even when i put the appendices in a different section, changing the page orientation changes it for the entire doc.

    Make a separate document the size and orientation you want.
    Turn that into a pdf and add it back into the original Pages document or into the pdf from from that document.
    Peter

  • I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that informat

    I have a photo of an ice surface and another of a flower. Now I want to create a merged photo with the flower lying under the ice. I understand that I shall use the function "Layer" and have even read in the manual and looked on a video, but that information is not sufficiently detailed for me. I have tried several options, but I come now way. Generally it seems that your information is only for the ones who can, not for the people who can´t although it is we who really need to learn. Please give me a step by step (click by click) information on how I can get the ice above the flower and then make the ice partly transparent so the flower is seen underneath. Please send me an e-mail Erik Solbu [email protected]

    Open a new document big enough for your image. Then additional open your ice and flower image as well. Copy each and paste it into your blank document. They will be placed on their own separate layers.
    Make sure in your layers panel. (Bottom right) the ice is above the flower, by dragging it in place. In that same layers panel click the ice layer to select in and find the opacity meter above. Drag to the left until you get the effect you desire.

  • Create a word document with TOC, table,etc

    Hi,
    How to create a word document with Table of content(TOC),header, footer, table, etc?
    Help me with any APIs or examples. I have already tried with POI API, but couldnt create TOC.. So any other api or any solution is available to create complex word document.
    Thank you

    Hi BIJ001,
    Thanks for your valuable suggestion.
    Open standards WordprocessingML format is supports by Microsoft word. It is typical xml format of designing word document. But creating document with TOC,tables, different styles of paragraphs are complex. Using this format, i have created simple docs. I never tried with complex formats like TOC. The generating File should be in ".doc or .docx" format only.
    Hi gimbal2,
    I am parallely looking to find solution in OpenOffice format also. But i never try out ".docx" file format. I will try to look out this option.
    Thanks for the input.
    Edited by: user13735134 on May 24, 2011 6:55 AM

  • I have made an 8.5 x 11 flyer and want to create handbills, four to a page, with Photoshbe op or Ado

    I have made an 8.5 x 11 flyer and want to create handbills, four to a page, with Photoshop or Adobe Acrobat Pro. Waht do I do?

    Create a new document the size of the handbill 4-up {example if handbill is 3"X4" then the new document would be 6"X8" Plus an optional margin and bleed (don't forget to include the gutters between the handbills - The gutter is used for the opposite margin to make the white space around the individual handbill equal)}
    place the original document into the new document
    make sure the layers are grouped for easy moving
    Drag out guides from the ruler (make sure ruler is visible) - Make the guides for each edge of the page for the margin, 2 guides between where each document should be (both rows and columns) Readjust if necessary until it looks right
    Optional - Scale original document to fit the guides if necessary
    Alt drag the group to the next location
    Repeat 6
    I can't make it any more or less detailed without see something from your screen, when in doubt post screen shots

  • Creating a PDF document with visible bookmarks

    Hi.
    I'm using VB to create a PDF document with bookmarks. I have no problem with this part.
    What I want to do, though, is to program the document so that the bookmarks pane is visible when I open the document.
    Any ideas?
    All Best,
    Ethan

    I found the answer in the Interapplication Communication API Reference:
    Dim SetPageMode as Boolean = PDDoc.SetPageMode(nPageMode),
    where nPageMode has the possible values:
    0: leave the view mode as is
    1: display without bookmarks or thumbnails
    2: display using thumbnails
    3: display using bookmarks

  • Create a billing document with no accounting document

    We have a requirement to create a billing document with no acocunting document. After this billing document is created, the status on all preceeding documents- SO,Delivery and Billing -should be status closed.
    It should perform somewhat like the Proforma invoice. We cannot use a proforma invoice setting for SD document category or Trasaction group for reporting purposes.
    So we configured a billing type and removed the account determination procedure. Now we are able to create a billing document, there is no accounting document, the preceeding documents are status closed. However the billing document itself has an account determination error and is status B-Posting Document not created (account Determination error).
    Is there a way I can get rid of this error message and have a status of Cor D(C-Posting document has been created, D-billing document is not relevant for accounting)
    Thanks for all help in advance.
    -Pratibha

    Hi,
    I would recommend you go to OBA7 --> Create a new FI Doc Type (i.e. XY) --> In the Accounts types Allowed, remove "Customer" check box (here you can control whethere you want posting to be permitted for Vendor, Customer, Assets, Material or G/L Account to suit your requirement) --> Save it.
    Now, go to VOFA --> Go to your given Billing Type --> In the "Document Type" field, replace the value with "XY" created earlier --> Save it.
    Perform your transaction again up to Billing. No Accounting doc would be created where the posting has been disabled in your FI Doc Type earlier (depending on your requirement).
    Hope this helps.
    Thanks.

  • I have 2 apple id's with different apps and data saved under each.  It's very annoying so now I want to create a new id with my primary email address I use now.  If I do that is there any way to transfer all my saved apps and app data like game saves etc?

    I have 2 apple id's with different apps and data saved under each.  It's very annoying so now I want to create a new id with my primary email address I use now.  If I do that is there any way to transfer all my saved apps and app data like game saves etc so I don't lose all of that information and can easily switch to a singular apple id?

    Apple does not transfer content bought with one Apple ID to another Apple ID. Apple will not merge two Apple IDs.
    If most of your content was bought with the Yahoo! Apple ID but you now want the Gmail address for your Apple ID, the trick will be to change the address used for the Yahoo ID with the Gmail address. However, to do that you must first free the Gmail address from that other Apple ID. Use the instructions from Apple to substitute another address that is not used as an Apple ID for your Gmail address in the Apple ID with the Gmail address. Then, when the Gmail address is no longer used in an Apple ID, you can use the same instructions to substitute the Gmail address for the Yahoo address in the Apple ID with the Yahoo address.
    Changing the email address you use for your Apple ID -
    http://support.apple.com/kb/HT5621

  • Not able to create a material document with movement type 103

    I am not able to create a material document with movement type 103,
    The system is populating the value as 101 .
    How do I create a matdoc with movement type 103?

    What is the error you receive? Please specify with message number.
    On MIGO, you need to change the default value mvmt type value to 103 before you enter the PO number to be able to do 103.
    Once this defualt value is set, you can enter the PO and item number in the document number fields and proceed with 103.
    But you cannot change the mvmt type for already entered items from 101-103 or vice versa.
    I think the 101-103 and 103-101 mvmt type conversion message is standard error message

  • I want to create a HD disc with my Adobe Premier Elements but I am getting low resolution.  When I go to share the DVD to disc the form only offers 8pixels at the bottom.  How do I burn this DVD in HD with higher number of pixels?

    I want to create a HD disc with my Adobe Premier Elements but I am getting low resolution.  When I go to share the DVD to disc the form only offers 8pixels at the bottom.  How do I burn this DVD in HD with higher number of pixels?  I have read other forums on burning HD DVD's but I do not see the option to turn the 8 pi into 40 pi the one forum recommended.  I want my DVD to be HD so I may sell these videos online for my business.  I can't sell them the low quality they are burning now.  Hopefully you can help me.  Thanks.

    desalvom
    Thank you for your reply.
    You cannot burn your high resolution video that you can view on your computer to an AVCHD on DVD disc
    that will replay through a regular DVD player. But players are marketed under a variety of names with
    different support opportunities. One manufacturer may call its product MultiMedia Player, media player, Blu-ray player,
    etc.The bottom line is the specifications for each of the players that are candidates for the playback of
    the AVCHD format on DVD disc or the format of interest.
    If you upload your HD (1920 x 1080) video to YouTube, YouTube converts the video to flash format, but it goes up as the HD video.
    But, beware. Look at the YouTube viewing setting when your uploaded video is playing back. The YouTube default is not
    HD. It might be 360p, 480p. If you have a 1080p video, then before the YouTube playback, you should be looking
    at the video with the YouTube 1080p HD setting for best viewing. That is a YouTube matter.
    Best results depend on you
    a. setting up the Premiere Elements project preset to match the properties of the source media. That means, if
    you have 1080p source, you (manually) or the project (automatically) set the project preset at
    NTSC
    DSLR
    1080p
    DSLR [email protected]
    or the PAL counterpart, depending on your region need.
    b. if you upload your video to YouTube using the Premiere Elements feature, there is a HD preset, but you cannot
    customize it.....if you need customization, then you can export your Timeline to a file...in this example
    Publish+Share
    Computer
    AVCHD
    with Presets = MP4 H.264 1920 x 1080p30 or PAL counterpart
    and then customize the preset under the Advanced Button/Video Tab of that preset. In increase quality, you might look to increase
    the Bitrate under Advanced Button/Video Tab settings - without compromising the file size.
    Then you would upload that file to YouTube at the YouTube web site.
    All of the above are factors that need looking into in order to determine the why for what you wrote
    I have published a shortened advertisement video to YouTube- say 5 minutes-
    and it is low quality
    Often SD video upscaled to HD can present poorly. But, you are dealing with a HD workflow so that should not be introduced into the matter. The setup of the project and
    the properties of the source video are important, but let us start with the above and rule in or out those considerations first.
    Thank you. As always, any clarification needed, please do not hesitate to ask.
    ATR

  • BAPI to create a billing document with reference to delivery or sales order

    Hi,
    Does anyone know any BAPI or function module that allows the creation of a billing document with reference to a sales order or to a delivery.
    Maybe the BAPI_BILLINGDOC_CREATEFROMDATA may be used to create a billing document with reference to a sales document, but i'm looking for a solution where I only need to indicate the number of the reference sales order or the reference delivery and maybe some few data more without the need of transfer all the items and conditions information.
    Thanks.
    Kind regards,
    Paulo Sousa

    Hello Paulo,
    To create a billing document based on a delivery use BAPI_BILLINGDOC_CREATEMULTIPLE. In table BILLINGDATAIN insert one line with the following data:
    REF_DOC = Delivery number
    REF_DOC_CA = 'J'
    If it runs fine, table SUCCESS will bring back useful data, like BILL_DOC (Billing document number).
    Regards,
    Joã

  • I want to create a second library with the same account on a separate hard drive....

    Hi,
    I am running out of room on my iMac to store all of my iTunes music and video. I want to create a second library with the same account on a separate hard drive. Will iTunes Match match both libraries ? Will I be able to acess both libraries from all my devices? Can iTunes Match merge them together so I can have easy access to everything?
    Thanks for any advice.
    christos

    Unfortunately, you can't.  The primary address for your iCloud account must be a non-Apple email account.  The only exception to this is for former MobileMe subscribers who migrated to iCloud when MobileMe closed, which was 18 months ago.

Maybe you are looking for