<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0202</schemaVersion>

    <documentType>4/A</documentType>

    <periodOfReport>2006-03-06</periodOfReport>

    <dateOfOriginalSubmission>2006-03-08</dateOfOriginalSubmission>

    <issuer>
        <issuerCik>0000018396</issuerCik>
        <issuerName>CDI CORP</issuerName>
        <issuerTradingSymbol>CDI</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001158369</rptOwnerCik>
            <rptOwnerName>BALLOU ROGER H</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1717 ARCH STREET, 35TH FLOOR</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>PHILADELPHIA</rptOwnerCity>
            <rptOwnerState>PA</rptOwnerState>
            <rptOwnerZipCode>19103-2768</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>President and CEO</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2006-03-06</value>
                <footnoteId id="F1"/>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>F</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>1975</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>26.23</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>35667</value>
                    <footnoteId id="F3"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>20000</value>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Spouse</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">This transaction was in connection with the vesting of Stock Purchase Plan Units on 03/06/06.  At that time, a Form 4 was filed to report the shares which vested.  However, the shares actually received by the Reporting Person was reduced by 1,975 to satisfy the tax withholding obligations with respect to the Reporting Person.  That reduction was omitted from the Form 4 filing at that time and is now being reported in this amended filing.</footnote>
        <footnote id="F2">This is the market price of Common Stock on the date that Stock Purchase Plan Units owned by the Reporting Person vested and was therefore the price used to calculate the number of shares deducted to satisfy tax withholding obligations.</footnote>
        <footnote id="F3">The total number of shares of Common Stock directly owned by the Reporting Person as of the date that this amendment is being filed is 50,327 (including 12,834 shares of restricted stock which are subject to vesting).</footnote>
        <footnote id="F4">The total number of shares of Common Stock indirectly owned by the Reporting Person as (through his spouse) of the date that this amendment is being filed is 25,100.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>Roger H. Ballou</signatureName>
        <signatureDate>2007-08-07</signatureDate>
    </ownerSignature>
</ownershipDocument>
