2014-10-10 61 views
0

我有這個PDF那裏有標籤這樣的刪除標籤:如何從PDF

62 0 obj 
<< /Type /StructElem /S /DokumentNavn /P 56 0 R /K 2 /Pg 58 0 R >> 
endobj 
60 0 obj 
<< /Type /StructElem /S /Bundtekst /P 56 0 R /K 0 /Pg 58 0 R >> 
endobj 
61 0 obj 
<< /Type /StructElem /S /ReferenceLinjer /P 56 0 R /Lang (da) /K 1 /Pg 58 0 R >> 
endobj 
68 0 obj 
<< /Type /StructElem /S /Fritekst /P 56 0 R /K 6 /Pg 58 0 R >> 
endobj 

我已經用% 覆蓋它們。然而,檢查針對白名單的工具仍然抱怨「刪除」他們 所以我在想這個標籤也可以用在pdf的二進制部分。 可以abcpdf刪除標籤還是有其他解決方案?

回答

1

Docotic.Pdf library可以從PDF文檔中刪除結構信息。

下面是該任務的示例代碼:

public static void saveWithoutStructureInformation(string input, string output) 
{ 
    using (PdfDocument document = new PdfDocument(input)) 
    { 
     document.RemoveStructureInformation(); 

     document.SaveOptions.RemoveUnusedObjects = true; 
     document.Save(output); 
    } 
} 

聲明:我庫的供應商合作。

+0

感謝您的幫助! – Anders 2014-10-13 09:45:10