(Urgent)help: how to use sdk add a gif image into a pdf document

I had use sdk plus-in add a new button of mine,if I click the button,a gif image will be inserted into the current page of pdf document
My questions:
one : When I clicked the button,there was a warnning box said:the image has not enough data.I don't known why?
two : How can I be sure the position of the image which I inserted? and how to change it's position?
three:  how to use sdk get the content of the document?

hi Leonard:
I do it like you said, but
Why my image can not display in the pdf.
code is:
//====================================================================
const ASInt32 theImageByteSize = IMG_WIDTH * IMG_HEIGHT;
char* buff = new char[theImageByteSize];
PDEImage volatile pdeImage = NULL;
PDEImageAttrs pdeImageAttrs;
PDEColorSpace pdeColorSpace;
ASFixedMatrix imageMatrix;
memset(&pdeImageAttrs, 0, sizeof(PDEImageAttrs));
int hdl = _open(ImagePath, _O_RDONLY | _O_BINARY, _S_IWRITE | _S_IREAD);
if (hdl == -1)
     AVAlertNote("[%s] create fail !!!!") ;
if (_read(hdl, buff, theImageByteSize) == -1)
     AVAlertNote("read image fail!") ;
pdeImageAttrs.width = IMG_WIDTH;
pdeImageAttrs.height = IMG_HEIGHT;
pdeImageAttrs.intent = ASAtomNull;
pdeImageAttrs.bitsPerComponent = 8;
pdeImageAttrs.flags = kPDEImageExternal | kPDEImageIsIndexed;
pdeImageAttrs.decode[0] = fixedZero;
pdeImageAttrs.decode[1] = fixedOne;
pdeImageAttrs.decode[2] = fixedZero;
pdeImageAttrs.decode[3] = fixedOne;
pdeImageAttrs.decode[4] = fixedZero;
pdeImageAttrs.decode[5] = fixedOne;
ASFixedRect theMediaBox;
PDPageGetMediaBox( AVPageViewGetPage(pageView), &theMediaBox );
ASFixed theFixedWidth = (theMediaBox.right - theMediaBox.left);
ASFixed theFixedHeight = (theMediaBox.top - theMediaBox.bottom);
imageMatrix.a = ASInt16ToFixed(theFixedWidth);
imageMatrix.d = ASInt16ToFixed(theFixedHeight);
imageMatrix.b = imageMatrix.c = fixedZero;
imageMatrix.h = 0;
imageMatrix.v = 0;
const Int32 cPaletteColors = 256;
PDEIndexedColorData theIndexedData;
theIndexedData.size = sizeof(theIndexedData);
theIndexedData.baseCs = PDEColorSpaceCreateFromName(ASAtomFromString( "DeviceRGB"));
theIndexedData.hival = cPaletteColors - 1;
unsigned char data[3] = {255, 0, 0};
theIndexedData.lookup = (char *)data;
theIndexedData.lookupLen = cPaletteColors * 3;
PDEColorSpaceStruct theColorData;
theColorData.indexed = &theIndexedData;
pdeColorSpace = PDEColorSpaceCreate(ASAtomFromString( "Indexed" ), &theColorData );
pdeImage = PDEImageCreate(&pdeImageAttrs, sizeof(pdeImageAttrs), &imageMatrix,
                                            0, pdeColorSpace, NULL, NULL, NULL, (unsigned char*)buff, theImageByteSize);
I want die, I had done this for so many days, My GIF doesn't insert into pdf,
unsigned char data[3] = {255, 0, 0};
theIndexedData.lookup = (char *)data;  "
whether the data set wrong?
I confused what I do next   

Similar Messages

  • How to use sdk to get the image in the pdf file created by illustrator?

    I have some pdf files create by illustrator and saved as pdf documents,
    now I want to use the sdk to get the image in pdf files.
    how to?
    Thanks.

    Thank you first!
    Yes,you are right,since I am new to illustrator,and I want to try to write a plugin,
    I have read the sdk doc and API and opened the sample in vs2010,but no idea about how to operate the pdf doc in illustrator with api.
    Hope more advise or any examples,thank a lot.

  • InDesign CS6 - Can you add Google Walking Tour into a PDF document or interactive pdf?

    Hello,
    I am trying to figure out how to add a Google Walking tour into my pdf document. I tried using the HTML feature in InDesign CS6 but all i get is a static image of a map. Acording to the features of InDesign this should be working correct? Please let me know if this is possible or not. Thank you!
    this is an example of the kind of a tour i am talking about:
    https://www.google.com/maps?q=churchill+downs+apartments&ll=39.668589,-104.889007&spn=0.00 7325,0.016512&sll=39.669082,-104.889653&layer=c&cid=6959793594299031036&panoid=xDKaTZWvSuU KbJAQUvKKcA&cbp=13,304.18,,0,0&hq=churchill+downs+apartments&t=m&z=17&cbll=39.66918,-104.8 90121
    I've copied the HTML that Google provides for embeding but no success yet. Thanks!

    That will work in DPS, but not, AFAIK, in PDF.
    Bob

  • How do I convert multiple sheets in excel into one pdf document?

    How do I convert multiple sheets (tabs) in excel to one combined pdf document?

    Hi Ptizer,
    If you have Acrobat PDFMaker  enable on Ms Excel. You can click on Create PDF.
    And choose settings as highlighted on screen shot it should do the job for you.
    Regards,
    Ajlan Huda.

  • How to create a plugin to stamp texts and not an image into a pdf document

    How to create plugin to stamp texts and not an image.. i just want it to work like the stamper plugin found in sdk sample but here i need text to be stamped instead of an image.. Is it possible? kindly give me some ideas?how to go about it.. can this be done by modfying the stamper sample code?
    Thank you

    This is possible, but it is a serious project, not something to be cut around from sample code. You will need to study the "graphics" and "text" chapters of the PDF specification in some detail to understand the PDF graphics model, including colour spaces, graphics state, and transformation matrixes; if working with annotations understand them and the requirement for appearance stream. There are various ways to add content to a PDF, but the PDFEdit API is probably the most accessible.

  • How to use sdk in standard B1?

    Hi,All
       How to use sdk in standard B1? I want to use "sum in words" be thai languag which in standard no have so i must create it use sdk but i don't know that have solution using sdk in standard. example, Go menu Sales-A/R>Delivery and input data i want to convert price in Total to text which i use sdk for convert it But i don't khow that when i will call sdk? Can do in standard?

    Hi Virasak,
    You need to develop a (eventually small) application (= Add-On) which uses the SDK to do what you need it to do + is packaged and installed like e.g. any SAP Add-On.
    It should then just watch out for the "right" events which are propagated from the SAP Business One application through UI API (an interface in the SDK) to "interested" Add-On(s)...
    HTH,
    Frank

  • Need help how to use itunes card to download music

    Need help how to use itunes card to download music

    If you want to add the iTunes card to your account, then in the iTunes app on the iPad you should be able to scroll to the bottom of the Music tab and there should be a Redeem button - there is more info here : http://support.apple.com/kb/HT1574

  • How to use PO message type to output 'Form' as PDF file

    Dear experts,
      I am working for a topic of how to use PO message type to output 'Form' as 'PDF file', and save to external file system automatically.
      Any one familiar to this topic, please kindly give me some guide, thank you!
    Regards,
    Joyce

    Hi,
       Go through the program RSTXPDFT4 (Converting SAPscript (OTF) or ABAP List Spool Job to PDF), you will get some idea.  Using this program you can convert spool into PDF file.
    -Alpesh

  • How do I add and delete pages to a pdf document?

    How do I add and delete pages to a pdf document?

    Hi Paul,
    Adobe Acrobat has the features to add/delete/extract/crop/insert pages to your PDF files and are much more features.
    Adobe Reader has  a very limited features for editing to PDF files.
    Now you can subscribe to Acrobat Plus and see more information at https://www.acrobat.com/acrobatplus/en/home.html
    Or you can download Acrobat XI Pro for trial version from www.adobe.com.
    thank you.
    Hisami

  • How to get the image into the PDF File, Cut the image into the PDF What acrobat product help to do that?

    I need to cut some image into the PDF file, what Adobe product can help me with it?

    Hi Hugo,
    Please elaborate your issue. What exactly do you want to achieve?
    Regards,
    Rahul

  • How to include more than 12 files in a new PDF document?

    I have a Adobe PDF Pack, and when I click on crating a new PDF document, they say that I cannot combine more than 12 files...!
    And I want to have a document of hundreds of pages!
    Someone can help me?
    Pleeeeaaase!!!!!!

    Hi Hisami,
    Thank you very, very much!
    It is very useful what you explain.
    One only question, since I have the trying version of Acrobat Pro: how many files can you combine at the time with it?
    May be it depends on the files size.
    I tried yesterday to combine 50 files at the time and it just blocked everything...
    Thanks a lot!
    Have a very good day.
    Henric
    Henric Caldas
    30 rue de Belleville
    75020 Paris
    Home : +33.1.46.36.04.55
    Mobile : +33.6.59.08.02.27
    [email protected]
    Le 28 janv. 2014 à 22:48, "H.Spector" <[email protected]> a écrit :
    Re: How to include more than 12 files in a new PDF document?
    created by H.Spector in Adobe PDF Pack (formerly CreatePDF) - View the full discussion
    To combine more than 12 files into a single PDF file:
    1. Combine file 1 to file 12 then name it (combined 1 for example)
    2. Combine file 13 to file 24 then name it (combined 2 for example)
    3. Keep doing those steps #1 and #2 then combine "combined 1, Combine 2.....Combine 12).
    Another way is to use Adobe Acrobat. Please download Acrobat XI Pro Trial version from www.adobe.com or you can upgrade your subscription to Acrobat Plus(please see more information about Acrobat Plus subscription at https://www.acrobat.com/acrobatplus/en/home.html?trackingid=JPZKR).
    In Acrobat XI Pro:
    1. Launch Acrobat
    2. Select "File" menu > Create > Combine Files into a Single PDF
    3. Click "Add Files" button at top left corner
    4. After adding your files click "Combine" button at the bottom of the dialog.
    Thank you
    Hisami
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6062261#6062261
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6062261#6062261
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6062261#6062261. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe PDF Pack (formerly CreatePDF) at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Using importdata to import xml data into dynamic PDF form

    Hi again,
    Me and my colleagues have a problem using the importData service to import some xml data into an empty PDF form (represented as an XFA input variable).
    In the server log I get the error that Only XDP data is supported for XFA forms, however I only have the xml data and not the entire xdp available.
    Is this really not possible to to (like importing xml data to a form is possible in the Designer when creating forms).
    I hope the scenario is understandable
    Sincerely
    Kim Christensen
    Dafolo A/S
    Denmark
    PS: During the various projects I am working on I keep running into problems...however I am totally new to LiveCycle so I consider this very informative learning steps and appreciate all your help :-)

    Hi again,<br /><br />I have been experimenting a little with both the renderPDFForm and importData services. However I don't seem to be ble to make them work as I  need them to.<br /><br />My scenario is simple, I have one (call it a template xdp/PDF form) and lots of data in xml files (around 1000), that I need to import into the template. Therefore I have set up a "Watched Folder" to take the xml as a document (I guess this is a requirement) and then I need either the renderPDF or importData services to import the xml data into the template.<br /><br />I would like to know how I should setup the services to make this work.<br /><br />When I try to use importdata I setup the following:<br /><br />PDF document: set to be the template i need to import the xml to)<br /><br />Input data: the document variable (an xml file) that is passed to the   Watched Folder<br /><br />Data merged PDF: set to an out xfaform<br /><br />When I do this I get an Coercion error in the server log:<br /><br />2007-11-15 13:27:05,324 ERROR [com.adobe.workflow.AWS] stalling action-instance: 1506 with message: ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.<br />     at com.adobe.idp.dsc.util.CoercionUtil.toDOMDocument(CoercionUtil.java:656)<br />     at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:878)<br />     at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:803)<br />     at com.adobe.workflow.datatype.runtime.support.AbstractDataTypeRuntimeHandler.coerceFrom(Abs tractDataTypeRuntimeHandler.java:64)<br />     at com.adobe.workflow.datatype.runtime.support.AbstractComplexDataTypeRuntimeHandler.getNode (AbstractComplexDataTypeRuntimeHandler.java:47)<br />     at com.adobe.workflow.dom.VariableElement.setBoundValue(VariableElement.java:93)<br />     at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:729)<br />     at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataWithExpression(PATEx ecutionContextImpl.java:335)<br />     at com.adobe.idp.workflow.dsc.service.SetValueService.execute(SetValueService.java:46)<br />...<br />Caused by: ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: <document state="passive" senderVersion="3" persistent="false" senderPersistent="true" passivated="true" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/172.16.10.125" callbackId="0" senderCallbackId="7" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="8039" contentType="application/xml" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xml version="1.0" encoding="UTF-8"?><br /><form1><br />  <sub_BlanketTop /><br />  <sub_SubjectTop><br />    <f...</inline><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</s enderPullServantJndiName><attributes file="c:\NCRConvert\ProcessForm\stage\Wx450d4b32843a0b0bcb8ef99e\NCR-00564_dXAE3soH.xml"/ ></document> of type: com.adobe.idp.Document to type: interface org.w3c.dom.Document<br />     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)<br />     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)<br /><br />However it is possible to manually import the xml data in Acrobat Professional without any problems.<br /><br />When I use the renderPDFForm with the following settings:<br /><br />Form to render: literal value that points to the template<br /><br />Form data: document variable from watched folder (xml)<br /><br />Content Root URI: repository://<br /><br />With these settings I also get a coercion error, however it does not seem to be exactly the same.<br /><br />Sincerely<br />Kim

  • Add a GIF image file to excel reports

    Hi all
    I have a concurrent program which gives me a report in excel( I Have PL/SQL code for generating excel output which works fine)
    I want to add a gif image to the excel report output
    can anyone tell me how to add a gif file to the excel report
    Thanks

    Hi;
    Please check:
    In Report Manager, How Can We Place The Line Description In The Center Of A Page for a published FSG report? [ID 553406.1]
    http://blogs.oracle.com/xmlpublisher/2008/05/excel_limitations.html
    Hope it helps
    Regard
    Helios

  • How do I scan multiple pages into one pdf document on a HP Envy 4501 Printer

    My HP Envy 4501 Printer won't let me scan multiple pages into one pdf document.
    I went to "Advanced Settings", clicked on "file" and made sure that the check box next to "Create a separate file for each scanner page" was unchecked.
    When I clicked the Save button it showed the page that I scanned and showed 1/1.  On the right side it had options for changing the brightness and Contrast, Rotate and Crop and "Back", "Save" and "Done" buttons, but nothing about scanning another page.
    Not to mention HP's Customer Support is useless!
    I'd appreciate any help I can get with this problem.
    Thanks,
    Mark

    Hi BH,
    I see your diagram.  I just scanned something.  The screen that I'm looking at right now shows the preview page and the scroll box to the left of that just like in your diagram.  The screen does not show the + button nor does it show the red x button under the scroll box as in your diagram.  I can't see the plus sign because it is not there.
    I tried re-installing the software and drivers as you suggested but that did not have any affect.
    Thank you for trying to help me with this problem but it hasn't worked, therefore I can't mark the reply "Accept as Solution".
    I've noticed that on HP's support forum web page there is only 1 solved request for assistance.  That doesn't give me much confidence in HP.
    Please reply back to this post to let me know if there is anything else that I can try or if you know someone else at HP that can help.
    If I don't here back from you, I'm returning this HP Envy 4501 Printer to get my money back to use it to buy a printer from one of HP's competitors.
    Thanks,
    Mark  

  • How can I change the page size of a scanned PDF document?

    How can I change the page size of a scanned PDF document?
    I scanned a 50-page document with an HP 5610xi All-In-One using the software that comes with it: HP Scan Pro. Though the physical document has standard 8.5" x 11" pages, the PDF resulting from scanning has page size set to 35.42 × 48.67 inches (according to Preview's "Tools > Inspector". I want to resize the pages to 8.5" x 11". Shouldn't Preview be able to do that with "Tools > Adjust Size..."? When I try, the menu option is grey so I can't select it.
    I'm using Preview Version 4.2.

    Thanks for the insight; that explains why it's the wrong size. I selected 300dpi scanning (which is the default, actually), but HP Scan Pro evidently created a PDF with 72dpi indicated. I want it fixed because I want to distribute the file to other people and have them able to print or display it without problems.
    I still don't know why Preview won't let me change it, but your question about whether I wanted to print it did lead me to find a workaround: "File > Print" and "Save as PDF..." saved it with the correct page size.

Maybe you are looking for

  • How do I configure the portal to allow both anonymous and LDAP or Membership Logins?

    I want my portal's content to be publically accessable, to allow anonymous users to browse the content without the ability to modify layouts, content, etc. <br><br> But I can't figure out how to make the portal completely skip the login menu page. If

  • Where it PAB gets stored? How to access it?

    Hi All Through web accesss of sunone mail I can able to create the contacts and groups. But my question is where they get stored and how to access it. They can be accessed through ldap or not? If so what is the uri? Can we see the contacts in netscap

  • GPS ON 5800

    I have a new 5800 with O2 pay and go - i cannot pinpoint my current location using the nokia maps - is the GPS function available with pay and go? Solved! Go to Solution.

  • Linking BSAK with EKBE

    Hello experts, I am currently modifying a report where in I need to change some statements because it gets a PO's balance in table BSAK-wrbtr and instead I need to change it to EKBE-wrbtr. The problem is I don't know if there's a common field where I

  • GRUB2 Graphics Mode doesn't work

    I removed old grub and installed grub2 and everything went smoothly, I even got the 1024x768 resolution on grub menu. Then I slightly changed /etc/default/grub and when I again generated grub.cfg, I always get plain console resolution (80x24). Here i