Having issue with PDEContentRemoveElem() for deleting PDEElements

Hi,
I am facing some problem in my code for deleting the PDEElements from the input pdf file. I used the
method PDEContentRemoveElem() and still I am seeing no elements are getting deleted from the pdf
file.  I gave the full code I have written for the element deletion.  Please point me if there is something
wrong in my code..  Many thanks for you for going through my code...
void DeleteElement(PDEElement pdeElement)
      PDEContent  content =  PDEContainerGetContent(reinterpret_cast<PDEContainer>(pdeElement));
      ASInt32  numElem =  PDEContentGetNumElems(content);
     for  (ASInt32  i = 0; i < numElem; i++)
          PDEElement element =  PDEContentGetElem(content, i);
          if  (PDEObjectGetType ((PDEObject)pdeElement) ==  kPDEContainer) 
                      DeleteElement (element);
          else
                    PDEContentRemoveElem(content,i);
void  MAINFuntionForElementDeletion ()
      ASPathName aoPDFPathName = NULL;
      ASText pathText = ASTextNew();
      ASFileSys fileSys = NULL;
      pathText = ASTextFromScriptText("E:\\Temp\\INPUT.pdf", kASRomanScript);
      fileSys = ASGetDefaultFileSysForPath(ASAtomFromString("ASTextPath"), pathText);
      aoPDFPathName = ASFileSysCreatePathName (fileSys, ASAtomFromString("ASTextPath"), pathText, 0);
      AVDoc avDoc = AVDocOpenFromFile(aoPDFPathName,fileSys,pathText);
DURING
      if(avDoc!=NULL)
            PDDoc pdDoc = AVDocGetPDDoc (avDoc);
            ASInt32  j, numElems;
            int numPages = PDDocGetNumPages (pdDoc);
            PDEContent aoPDEContent = NULL;
            PDPage aoPage = NULL;
            PDEElement  pdeElement;
            aoPage = PDDocAcquirePage(pdDoc, 0);
            aoPDEContent = PDPageAcquirePDEContent(aoPage, 0);
            numElems =  PDEContentGetNumElems(aoPDEContent);
            for  (j = 0; j < numElems; j++)
                 pdeElement =  PDEContentGetElem(aoPDEContent, j);
                  if  (PDEObjectGetType ((PDEObject)pdeElement) ==  kPDEContainer)
                             DeleteElement(pdeElement);
                  else
                         PDEContentRemoveElem(aoPDEContent,j);
            // Commit the changes to the PDEContent.
            PDPageSetPDEContent(aoPage,  gExtensionID);
            PDPageReleasePDEContent(aoPage, 0);
    HANDLER
           // some code for logging
    END_HANDLER

Always delete objects in reverse iteration.   Standard programming
practice.

Similar Messages

  • HT204407 Is anyone else having issues with login for Find My Friends App?

    I keep getting the error message "either login name or password is incorrect. I have reset the password but I still get the same error message. Does anyone know the fix for this? Thanks, Terry

    I just got the same message myself. Which I have only had 2 times in three years, so I checked here.
    http://www.apple.com/support/systemstatus/
    There is an issue with the iTunes Store on Apple's end, so I assume that is why we cannot connect.

  • Is anyone having issues with their phones deleting their notes randomly? Also when you delete an email, you have to delete up to 5 times sometimes before it actually deletes from your phone?

    I can make a note and It deletes it, sometimes a week later sometimes 3-5 weeks later. BUT there's 1 note I've had for about 9 months and it's still there. I've had it since before the new iOS 7 system... And with the emails I can delete then and then they pop back up, delete again and there they are again. But it's not all the time. Just whenever it feels like it. And my phone isn't old, I've only had it about 3 months now. Is anyone else having these issues? They're driving me nuts!

    Give it a go
    Hold the cmd key (next to the spacebar) & try clicking a few messages. Command key looks a bit like a cloverleaf.
    There are other shortcut keys as I mentioned before just try a few key combinations & you'll get the hang of it.
    Once the messages are selected you can either drag them into a Mailbox or use the menus to perform operations like 'Mark as read' or 'Mark as junk' etc.
    You may want to show the mailbox list (if it is hidden). This is in the 'View menu > Show Mailbox list'. It should make it easier to move the messages around.
    The shift key is the one that lets you select a range, just select the starting message, then hold shift & select the end message.
    I think it is harder to explain in words, so try it out you'll get to grips with it.
    Good luck.

  • Im having issues with security for my apple id trying to change security questions

    Having some major issues, apple isn't letting me get to my security questions that I'm trying to change though I remember my answers it isnt accepting them so I go to my id page , and I cant get past it, Is there any way to pass the lock out screen after I wait this eight hours?

    Hello John0620,
    Thanks for the question. If you do not remember the answers to your security questions please refer to the following article:
    Apple ID: All about Apple ID security questions
    http://support.apple.com/kb/HT5665
    What should I do if I don't remember the answers to my Apple ID security questions?
    Try answering them at least once to see if you can get them right, even if you are not sure you remember the answers to your security questions.
    If you are confident you can't remember them, try one of the following:
    If you have three security questions and a rescue email address
         - sign in to My Apple ID and select the Password and Security tab to send an email to your rescue email address to reset your security questions and answers.
    If you have one security question and you know your Apple ID password
         - sign in to My Apple ID and select the Password and Security tab to reset your security question.
    If you have one security question, but don't remember your Apple ID password
         - contact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
    If you continue to have issues, please contact our Account Security Team as outlined in this article:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Thanks,
    Matt M.

  • Sun Solaris 10,Upgrade 8 or higher,having issues with VxFS,for Oracle 11gr2

    A while ago, we tried doing a prototype upgrade of our main Oracle 10g db to Oracle 11gr2.
    The OS on which our Oracle 10g is running is Sun Solaris 10, upgrade 4.
    According to Oracle 11gr2 documentation, we need Sun Solaris 10, upgrade 6 or higher for Oracle 11g2.
    The filesystem we are using is VxFS, Veritas File System.
    According to our system administrator, we had issues , making Sun Solar 10, upgrade 8 , work with the VxFS filesystem.
    I was wondering if anybody is running Oracle 11g2 on Sun Solaris 10 upgrade 6 or higher with VxFS file system.
    At present, our Oracle db upgrade project is on a hold, because of the above issue. So your help on this , can really help us in figuring out if there is an issue between VxFS filesystem and Sun Solaris 10 OS.
    Thanks
    Ashish

    Hi Ashish,
    We are not running Veritas Cluster file system.
    We tried moving our Oracle 10g r2 db on ZFS ,before doing the upgrade and performance on ZFS was worst.
    ZFS has certain memory parameter setting. If you did not configure that then ZFS will eat your complete system memory.
    My system administrator, has gotten a copy of Solaris 10 upgrade 9 and will try that with VxFS.
    I was curious to find out if folks are running Oracle 11g on Sun Solaris 10 with VxFS file system and if they had experienced any issue.If you can Install Vxfs on Oracle Soalris 10 U9, then according to me there sholudn't be any limitations for an oracle database.
    Recently i installed Oracle database 11.2.0.2 on one of my test server. I have created two databases - one on ZFS and another on ASM.
    Refer:
    http://appsdbaworkshop.blogspot.com/2010/10/installation-of-11202-on-oracle-solaris.html
    We dont have any performance issues. We are testing it for the performance benchmarks on both of the filesystem.
    If you can Install Vxfs on Oracle Soalris 10 U9, then according to me there sholudn't be any limitations for an oracle database.
    Regards,
    X A H E E R

  • Dimitri, Having issues with Anychart5 for APEX integration kit

    Hello Dimitri,
    I tried sending an email to [email protected]; however, I get an error so I hope to catch you here.
    I have installed APEX trial integration kit into another folder and modified the region to point to the correct path. The new charts show; however, some of the labels are not displaying on the 3D pie chart. I've noticed this is an issue on the sample http://anychart.apex-evangelists.com/pls/apex/f?p=755:7:1610753316996317::NO:::. Also, the legend just says value1 with no data.
    Regards,
    Kelly

    Tasty, Morten!
    Good work.
    Ben

  • Having Issues With Java for installation

    Hi Guys,
    I've played Football manager on my my ibook g4 for years, i installed the latest one last september and it was running perfectly, however i decided to uninstall it during a busy study period to aviod distractions, however when i went to reinstall it, it wouldn't work!!!!
    The gay comes with a java installation, it begins proccessing then dies out, i spoke to someone before and they said that the java supplied with the game is probably be out-dated by the software on my computer(i update regualrly).
    Is there anyway around this?

    p.s using java 1.4.2
    lemme know if you need any other information!

  • I am using an early 2008 MacBook Pro and am having issues with it deleting text on its own (in word, emails, etc.). As I am typing it all of a sudden starts deleting and I can't stop it. What can I do?

    I am using an early 2008 MacBook Pro and am having issues with it deleting text on its own (in word, emails, etc.). As I am typing it all of a sudden starts deleting and I can't stop it. This happened once before and it was due to a buldging battery pressing on the track pad. I checked the battery and it appears to be fine. What can I do?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up guest users” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.  The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • I have been having issues with not receiving texts and voicemails daily, for a few months now. If I turn the phone completely off, when I turn it back on the messages will flood in from hours before. I can't be continually turning off my phone in case som

    I have been having issues with not receiving texts and voicemails daily, for a few months now. If I turn the phone completely off, when I turn it back on the messages will flood in from hours before. I can't be continually turning off my phone in case someone left me a message. How do I resolve this issue?

    Wifi:  my Cell phone will remember 10 wifi connections.  So delete any you don't use often and your home wifi and try to enter home wifi again.
    if it still won't connect to home wifi, call your internet provider for help.  You may need a newer router or different settings Or upgraded service.   Your phone seeks the best connection and will refuse lesser connections.
    last resort.  Backup the phone.  Do a full reset, then restore as new with the backup.
    if still not fixed, go back to apple and insist on repair or replacement.
    HOWEVER.   voicemail is not a wifi issue, it's a carrier function, which is why the SIM card is a suspect.

  • I downloaded CS6 and am having issues with my print driver. It is not compatible with the HP 2600n and have tried to download drivers given to me by adobe ( (Jupiter 3) but it is not working. after a few days. Its a temporary fix and is still looking for

    I downloaded CS6 and am having issues with my print driver. It is not compatible with the HP 2600n and have tried to download drivers given to me by adobe ( (Jupiter 3) but it is not working. after a few days. Its a temporary fix and is still looking for the HP driver when i boot up. It also will not save in any print or postscript format. Does anyone know how to fix?
    Currently use a Mac with the latest Mavericks 10.9.4

        Oh boy! Acting kind of weird seems to be an understatement, aquaequus!
    What type of troubleshooting were we able to do with you? I want to make sure that we can get some sort of resolution for this problem.
    It is quite possible the battery door may get your phone in working order again. I'm not sure if the store has it in stock, but it is available in our warehouse for $14.99 which can be ordered via customer service.
    Tamara H.
    Follow us on Twitter @VZWSupport

  • Is anyone else having issues with "skipping" while the songs are playing?! It is very aggravating to us... and we've had it going on for several months now.  Any ideas at all how to fix it?

    Is anyone else having issues with "skipping" while the songs are playing?! It is very aggravating to us... and we've had it going on for several months now.  Any ideas at all how to fix it?

    So, don't use youtube.
    http://www.the-top-tens.com/lists/best-alternatives-youtube.asp
    http://www.youtubealternative.com/

  • Is anyone having issues with Android version 4.3 for Galaxy III throwing in zeroes into text messages?

    I received a message on Christmas Eve that a free update was available for my Samsung Galaxy III.  I accepted the download and discovered some enhancements and fixes that I liked (finally, my voicemail icon displays the number of waiting voicemails that I have!) but I've noticed to glaring issues:
    1. When I send text messages that include numbers (a phone number for example) the OS throws in random zeroes into the number.  I have to usually touch the ENTER key and type the number on a new line and play around with it until the number stays in the message correctly.
    2. I've had occasional lockups using the media hub which, when I do a restart, causes my settings to revert to the default factory settings....kind of a pain.
    There may be other issues. 
    Q. Has anyone out there experienced this same thing?
    Q. Is Google going to fix these issues?  I noticed that on Christmas day a half dozen or so updates were made, but these to things still are a problem. 
    Q. Also, the Verizon Wireless Software Upgrade Assistant on my laptop insists that my version is not supported.  I can still access photos and music, but it's a little annoying...

        I'm sorry you're having issues with your phone after your update BigLouie1124. I recommend enabling safe mode to see if any of your apps are causing issues with your new software. If so, you can remove them. Here are the steps http://vz.to/1cD0kqT . If you continue to have issues the last step would be a factory reset to clear up some of your issues http://vz.to/JCsr33 . Please keep us posted and continue to clear unwanted message threads and clear your browser history periodically.
    KinquanaH_VZW
    Follow us on Twitter @vzwsupport

  • I am having issues with adjusting the duration of time for each still frame and transition in imovie 11.  Each time that I adjust these times, the app does not accept the change, and automatically enters its own time. Am I doing something wrong?

    I am having issues with adjusting the duration of time for each still frame and transition in imovie 11.  Each time that I adjust these times, the application does not accept the change, and instead automatically enters its own time. Is there a work around this? Or am I doing something wrong? Please Help!
    Thank you,
    lagrl

    Have you tried turning off automatic transitions ? Choose file - project properties and follow the dialogue box to change duration with a slider.  iMovie also doesn't allow a transition to be more than 50% duration of the clip its attached to. In other words if the clip is 4 seconds the transition cannot be more than 2 seconds and remember that relates to the first clip as the following clip (right side) is pulled back to overlay it.
    Does this help.  Perhaps you already know this ?

  • HT204406 Has iTunes Match been flaky for anyone else lately. I have been having issues with some of my songs.

    Has iTunes Match been flaky for anyone else lately. I have been having issues with some of my songs. Some of the songs play, some skip.

    Either import your Songs into a new clean library, or rebuild your existing library - it would appear your current library is corrupt.

  • Hi, I'm having issues with my airdrop. I have looked in my finder perfrences and didn't see the check box for airdrop. I have a macbook air running on 10.9.4 Mavericks. Does anyone know how to get my airdrop back? Thanks.

    Hi, I'm having issues with my airdrop. I have looked in my finder perfrences and didn't see the check box for airdrop. I have a macbook air running on 10.9.4 Mavericks. Does anyone know how to get my airdrop back? Thanks.

    Mac Basics: AirDrop lets you send files from your Mac to nearby Macs and iOS devices - Apple Support

Maybe you are looking for

  • Open wallet failed error when running DBCA

    Hi, running 9i on AIX 5.3 By starting dbca, get the Error Message 'Open wallet failed' The dbca GUI comes up and runs fine. Anyway in case anyone has the problem please let me know... The wallet entry is in the sqlnet.ora WALLET_LOCATION = (SOURCE =

  • How do I get the packing slips to print the selections made under a buy now button

    So I started using paypal packing slips about a year and half ago, instead of manually copying the info into an excel document version to create the packing slip. I use the packing slips to make sure I have the order correct and done before packing a

  • Some questions on drawing

    hi all, i want to draw out a different shape depending on what key the user pressed, but how do i draw outside of the paint() method? for example, when the user presses 1 on the handphone(emulator), i draw out a rectangle. i tried to check for the ke

  • Declare variables in an MDX query

    Is it possible to declare variables in an MDX query like transact sql? something like this: DECLARE @date1 date DECLARE @month1 int set @date1 = '12-12-2012' set @month1=DATEPART(m, @date1)-1 select @date1 as dt1, @mesreferencia as mt1

  • Looking for SQL*Loader sample file

    Hi all, I'm looking for a sample SQL*Loader file that I could use to populate the Bank Statement Interface in Cash Management (Receivables Lockbox Receipts) - specifically CE_STATEMENT_HEADERS_INT_ALL and CE_STATEMENT_LINES_INTERFACE. I'm trying to p