

If your intention is to "replace" the "stamp", you'll want to do so by removing the XObject as you are doing now, then remove the instruction, then add the new "stamp".This article is intended to give the average home user some insight into the two most popular PDF readers. It's just that your stamp is the last thing to get drawn so it goes at the end. Note: It won't always be the case that the last item in the content array will be your stamp. Remove the last item in the array, which is the instruction to draw the XObject, and you file will work without errors in all the viewers. However, you are far better off removing the drawing instruction in addition to the XObject.īecause of the way you've created the file and added the "stamp", your page content stream is an array of streams. You can make Acrobat attempt to fix problems like this by selecting Save As Optimized PDF. The other applications are more permissive with bad PDF and my guess is when they write out the file, they are removing references to non-existent objects. that's why you're getting the error in Acrobat. When you remove the "stamp" (not a stamp) Aspose seems to be removing the XObject but not the instructions to draw it from the page Contents stream. It's an XObject that gets drawn into the page content. Ok - The thing you are referring to is not a stamp annotation. The stamp is removed and file is fine, works with any PDF reader.
FOXIT PDF READER VS ADOBE WINDOWS
Using Windows (10) Reader: Only difference in the process is that opening the file to Windows Reader and save from there. Using Foxit: Only difference in the process is that opening the file to Foxit Reader and save form there.

Please contact the person who created the PDF document to correct the problem."ĮDIT: After testing more, and just opening file to Aspose, and saving it without modifications, that didn't break the file, only once the stamp was removed with Aspose method it was broken. Acrobat may not display the page correctly. Using Adobe: The process of removing stamp works fine, but trying to open the file will end up having an issue with the file. Use try catch so we can output possible error w/out break point.ĬontentEditor.DeleteStampById( stampInfo.StampId ) ĬontentEditor.Save( StampRemovedPdfFile ) Private static void RemoveStamps( string pdfFile )Ī contentEditor = new () įoreach ( Page page in )Ī stampInfos = contentEditor.GetStamps( page.Number ) įoreach ( stampInfo in stampInfos )
FOXIT PDF READER VS ADOBE CODE
OoPdfFormExample_WithStamp_SavedFromAcrobat_StampRemoved.pdfĬ# code that is used to remove the stamp(s): ///.OoPdfFormExample_WithStamp_SavedFromAdobeReader.pdf.OoPdfFormExample_WithStamp_SavedFromWindowsReader_StampRemoved.pdf.OoPdfFormExample_WithStamp_SavedFromWindowsReader.pdf.OoPdfFormExample_WithStamp_SavedFromFoxit_StampRemoved.pdf.OoPdfFormExample_WithStamp_SavedFromFoxit.pdf.OoPdfFormExample_WithStamp_StampRemoved.pdf.Now this new file is fine, but when I try to remove stamps using Aspose (and replace with new stamp later), this is where things get interesting.įiles that I've tested with: !Auvpijam7a73iDzOqc6wZPuY9l81 I don't even know what to ask :DĬreated PDF with forms using OpenOffice (version 3.4.0), stamped with Aspose PDF, opened with Adobe Reader DC (or Adobe Acrobat XI), filled, saved as new file. Issues with Adobe product that are not so obvious to figure out. What is difference in Adobe 'save as' vs. And now I am posting this here to ask more details about: I think they are not going to investigate this anytime soon as it is very specific case. I have asked questions from Aspose, and they have also tracked the issue (PDFNET-42880) in their system. I'm reaching out to larger community of developers in seek of help to understand the real cause and possibly finding a fix.
