How to combine resources with a plugin files

Envy, I'm missing something obvious here.

Try to group a zip file with my plugin (c), and then access it in the code.

I have added to the Group of resources in my project in XCode, which caused to be copied into the resources folder of the. InDesignPlugin package.

What is the right way to go about this? How I can access it in the code?

Thank you

Hello

You try to use the ODFRC compiler?

Unfortunately I do not know how to create a resource appropriate for compressed data. I found in the SDK (CoreResTypes.h)

#define kPackagesRsrcType 'PCKS.

and

#define kBinaryBlobType 'BBlb' DynamicDocumentsExtrasDefs //taken

But do not know the macro to create this type of resource.

The good thing is that you can cheat a little and use PNG resources, since it is also binary data.

Simply set your zip file as resource PNG and use IPMStream to write data to the disk.

All you need to do is set the zip which is the relative path to your project file in your path .fr:

#define kYOUR_ZIP_FILERsrcID 15

#ifdef __ODFRC__

resources NFSP (kYOUR_ZIP_FILERsrcID) "... /.. '. "/ your_zip_file.zip".

#endif / / __ODFRC__

and in your class read the resource and write it to a file:

WideString theFilePath("/Users/userName/Desktop/theFile.zip");

IdFichier theFile (theFilePath) const;

RsrcSpec theRsrc (kYourPluginID, kPNGArtRsrcType, kYOUR_ZIP_FILERsrcID, kFalse);

InterfacePtr rsrcStream ((IPMStream*) StreamUtil::CreateResourceStreamRead (theRsrc, kFalse));

InterfacePtr fileStream(StreamUtil::CreateFileStreamWrite(theFile)); )

fileStream-> Open();

fileStream-> SetEndOfStream();

unsigned long totalIBytes = 0;

unsigned long totalOBytes = 0;

unsigned long iSize = - 1;

unsigned long oSize = 0;

While (rsrcStream-> IsReading() & iSize > 0)

{

given unsigned char [1024];

iSize = rsrcStream-> XferByte (data, 1024);

oSize = fileStream-> XferByte (data, iSize);

totalIBytes += iSize;

totalOBytes += oSize;

}

rsrcStream-> Close();

fileStream-> Close();

Concerning

Bartek

Tags: InDesign

Similar Questions

  • How to get out with renaming a file every time that I change it?

    How to get out with renaming a file every time that I change it?

    Since the last update, I have more the possibility to combine files. How can I recover this feature

    10 pro version

    For the first issue: disable the preview pane in Windows Explorer.

    Wednesday, July 15, 2015 to 18:46, keithf52379832 [email protected]>

  • How to download resources HTML and PDF files?

    How to download resources HTML and PDF files?

    We have currently no help for download of the resources shared via the user interface.

    Neil

  • How to combine multiple PDFs into one file

    How to combine multiple PDFs into one file

    Hi Marketing Haskin,

    The link mentioned by Mandeep requires you to have the Acrobat software.

    However if you purchased export them to PDF / service Acrobat.com you can select 'Combine files' on the right side and then click on the button 'Select files' to select the files you want to combine.

  • How to combine several pages from different files together?

    I converted a Word document to PDF, now I want to combine pdf pages to the file, how can I do?

    Hi imherelawd,

    I see you have Abobe PDF Pack, you can use the feature files to combine to combine up to 12 files in a single PDF file. But, this function combines the whole files, the pages are not specific. If that's your goal, you will need to use Acrobat, which allows you to insert selected pages from a PDF in another. If you do not have Acrobat, you can try it free for 30 days. Please visit www.adobe.com/products/acrobat.html.

    Best,

    Sara

  • How to replace JPG with weeks RAW file later?

    Hi there-

    When the Canon S95 is out LR3 don't have not recognize or import the RAW .cr2 files. When you use the camera I would take pictures in RAW and JPG formats, use LR3 to import the jpg files and manually copy the. CR2s in a separate Directory. I can tag and otherwise works on jpg files in my directory main photo in LR3, while as the CR2s gathered dust in a different directory.

    Now that LR3 supports. CR2 and I have a slow day, is there an easy way to replace all the files with the relevant RAW file jpg? Which the case for the last XMP data, ideally with the exception of the file extension they will be called the same.

    Any suggestion would be great. Thank you.

    Thronsen,

    You can import the Raws beside your existing JPEG files, but you can not replace them automatically keep the metadata.

    Using Syncomatic Plugin from John Beardy, you could transfer Rating, Label, title, caption, keywords and Collections of JPEGs from Raws of the same base name, but I don't think you can transfer develop JPEGs to Raws settings, because they are not interchangeable in any case. After you transfer you need the Raws, you could delete the JPEG files.

    Gossweiler beat

    Switzerland

  • How to use mxf with Premiere elements files?

    Any ideas on how to use my canon xf100 with elements .mxf? In addition, I don't see a setting in menu when I start a project?

    http://www.Google.com/#sclient=psy-AB&hl=en&q=convert+MXF+AVI&OQ=convert+MXF+AVI&AQ=f&AQI= g - v4 & aql = & gs_l = hp.3... 0i15l4.4835.9343.0.12811.15.13.0.2.2.0.168.1138.11j2.13.0... 0.0.EDKQ8 U_mDpc & pbx = 1 & bav = we. 2, or.r_gc.r_pw., cf.osb & fp = e3a93c99a6099aba & biw = 1905 & bih = 701

  • How to combine audio with a still image?

    I use Adobe first Pro CS5, on a Windows 7 computer. Rprp very new!

    Here is my current problem: I inserted a clip into the timeline, not related to audio and video, filled with video, I didn't. Now, I would like to put a fixed image in the video where used to be. I imported the image (a .psd) and scored the points of entry and do exactly match the audio clip. But I'm unable to add to the timeline without advance him videos.

    Can someone let me know what term, at least, I should look for a tutorial?

    Thank you!

    Just drag the rest of the video track.  You can then extend the clip to fill the empty space.

  • How to combine several single pdf files into a single PDF with multiple pages?

    How to combine several single page pdf files into a PDF file with multiple pages?

    Hi Sandra,.

    You have ExportPDF subscription to Adobe not associating the files for you. It is only used to convert PDFS into different formats.

    To combine PDF you could to buy the different subscription: Pack PDF

    Let me know if you have any questions

    Kind regards

    ~ Dominique

  • How to combine libraries of photos with pictures in Windows Media Center

    I want to know how to combine images with windows media center libraries pictures how it's done?

    Original title: search search index indexing re-indexing re-index research research research service troubleshooting troubleshooting

    Hello

    What operating system do you use?

    Please provide information more precise about what you are exactly doing.

    Refer to the below link mentioned before asking your question so that you can provide all the relevant information for us to help you:
    http://support.Microsoft.com/kb/555375

    You can also view the Sub articles that might help you.
    Windows Media Center
    http://www.Microsoft.com/Windows/Windows-Media-Center/get-started/media-library.aspx
    Add media files to Windows Media Center
    http://Windows.Microsoft.com/en-us/Windows7/add-media-files-to-Windows-Media-Center

  • How can I work with ms word 2002 docx files

    original title: ms word 2002 docx files

    How can I work with the docx files using MS Word 2002 XP?

    How can I work with the docx files using MS Word 2002 XP?

    Get the free Converter: http://office.microsoft.com/en-us/downloads/office-online-file-converters-and-viewers-HA001044981.aspx

  • DIAdem - import programmatically .csv files with. STP file without dialog box

    Does anyone know how to import programmatically with a .csv files. STP file without opening the import box dialog box every time?

    I've been through the forum and seen for .xls files and solutions through the help file which is recommended to use the ExcelImport command, but these do not seem to work for .csv file types.  I am currently using the DataFileLoad command to import the files, which works very well to load the .csv files, but it forces me to go to the. STP file for each file.

    Does anyone know a better way to import a file .csv programmatically?

    Wow... Who had a fraction of the time that does the method of the dialog box.  I'll have to revise the data portion my DiAdem Advanced manual Plugin.

    Thank you, Brad!

    Steve

  • Loading data to Essbase with ODI rules file

    Hi all

    I need to load the flat file DATA (no metadata) or an Oracle table in to ESSBASE using ODI.

    Where can I find an example or a tutorial on the loading procedure.
    I have not have how to use ODI with a rules file:

    (1) in the standard rule file I can insert a transformation (join, split ecc.) can be used
    a rule like this in ODI file?

    (2) if I put the file of IKM SQL for Hyperion Essbase (DATA) rules I have to manually set the mapping
    between the source and target? the mapping is not set in the rule file?

    (3) can I use both the type of rules (flat file or SQL) file?


    Thanks a lot for your help!

    Edited by: 882454 on 19-game-2011 2.57

    Edited by: 882454 on 2.58 19-game-2011

    If you go to the next page in my blog, you should see a link to all the different posts around ODI and hyperion knowledge modules - http://john-goodwin.blogspot.com/2011/08/odi-series-summary.html

    In ODI, you can do all the transformations, the rule of the load is really used to optimize the process of loading the data.
    You must configure your interface with source and target mapping, and then create a rule to load that corresponds to the mapping of the target.
    You can use any type of source.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • I try to combine a picture of my sister with a picture of a poem next to her. How to combine the two into a single photo?

    Paint or Windows Photo Gallery

    I try to combine a picture of my sister with a picture of a poem beside it, how to combine the two into a single photo?

    If you have the poem recorded in an image format,
    the following freeware can create a side by side
    Panorama.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Download IrfanView
    http://MajorGeeks.com/IrfanView_d4253.html
    (filename: iview433_setup.exe)
    (uncheck if you don't want Google Chrome)

    Download plug-ins too...

    IrfanView plugins
    http://MajorGeeks.com/IrfanView_PlugIns_d4908.html
    (filename: irfanview_plugins_433_setup.exe)

    When the program is installed... read more...

    Open IrfanView and go... Image / create the Image of the Panorama...
    (this will open the screen to "Create a panorama image")

    On the screen to "Create a panorama image"... left click on the add images"" button.
    (Displays the 'Open' screen. Now, drill down to the
    the folder that contains your saved Photos of veterinarians.

    Now... click left (highlighted), the two images, you want to join.
    (you can select more than one if you hold down your Ctrl key)
     
    The two images highlight... left click on the button 'open '.
    (Or... you can add the images one at a time... which is always easier)

    Now, go back to the screen "Create the panorama image.
    and the file names of the selected pictures need to be in the
    Field "Input Images.

    Now with the names of two files in 'Images of entry' field...
    You can left click on the button 'create Image '.

    (the positions left and right of these images can be swapped in)
    selection of a file name and using the "mount image" / "Move."
    Images down"buttons...)

    Now you should see a display of the combined image.
    Reach... File / save as...

    Choose a backup location / enter a file name / choose a format...
    On the left, click on the button "Save..."

  • How to deal with "Outlook" pst files

    Hi guys, just a message quicky, for various reasons in recent weeks I have had problems with my Microsoft Outlook, which I use for e-mail, etc.. I have created a number of .pst files and would like some advice as to how best to group them into a single pst file.

    Is it possible and how do I proceed.

    Regards david

    Hello

    Yes, you can combine/merge/join the files using the following (from Outlook) process:

    http://semnaitik.WordPress.com/2013/06/19/how-to-combine-multiple-Outlook-PST-files-into-a-single-file/

    or use a third-party tool:

    http://www.WikiHow.com/merge-two-pst-files-in-Microsoft-Outlook

    Kind regards.

Maybe you are looking for

  • I deleted my email account and tried to add it back, but it is said that there are already. It drives me crazy...

    I deleted my email account and tried to add it back, but it is said that there are already.

  • Vista SP2 does not install

    I am slot than Vista Ultimate 32 bit SP1I am trying to install SP2I use a DVD made from the downloaded image on the site of Ms. The installation starts, but after about 3 minutes, it will fail with the following error message."It is too late to perfo

  • Optimize/defragment memory?

    Hi, have just bought the Sansa Fuze 8 GB (great bit o ' kit!) Am running windows XP, using windows media player using the MP3 format and MTP mode.My question is I've seen deleted a lot of tracks from different CDs, I loaded to the device, I wonder -

  • Switch off the mobile control

    Hello In my application when I am on my second screen so if we press and hold the end call key then mobile BlackBerry becomes off Switch and here even if we have on the mobile by pressing again on the outfit, the button end call then mobile is on. Bu

  • Blocking blackBerry Smartphones numbers

    Hello fairly new for me but I try on my 8900 curve to make calls on my phone, he keeps asking passwrd which I do not have any idea on and my as contact blackberry service provider? Can someone give me info on how to find out what the password is for