Hello,

I made with LibreOffice an XML Form, which I exported to Pdf.

I made a program, based on the example on page 185 - listing 6.19 in which I
fill in the template fields. Everything goes fine, but when I want to
flatten my form, the created pdf always causes adobe reader 10.1.2 to ask me
whether I want to save the changes made to result.pdf.
If I remove FormFlattening, no questions arise, even if I change the
radiosets. (the other fields are set to read-only)

Is there anything I can do?

The code is as follows (please note I'm using Progress Openedge, the
syntaxis is a bit different than normal .Net)
  ASSIGN oPdfWriter = PdfWriter:getInstance(oDocument, oOutputFileStream).
  ASSIGN oPDFReader  = NEW PDFReader(cTemplateDoc).
  ASSIGN oOutputFileStream   = NEW FileStream(cOutputDoc, FileMode:Create).

  ASSIGN oPDFStamper = new PdfStamper(oPDFReader, oOutputFileStream).
  ASSIGN oAcroFields = oPDFStamper:AcroFields.
    
  oAcroFields:SetField("txt11","----> ").                         
  oAcroFields:SetField("txt12","OrderN°: ").                   
  oAcroFields:SetField("txt13","123456789 ").                         
  oAcroFields:SetField("lblOrder","Order").                         
  oAcroFields:SetField("lblOffer","Offer").                         
  oAcroFields:SetField("lblOther","Other").                         
  oAcroFields:SetField("optType","Offer").                    

  oPdfStamper:FormFlattening = TRUE.

    IF valid-object(oPDFStamper)        THEN oPDFStamper:Close().
    IF valid-object(oDocument)          THEN oDocument:Close(). 
    IF valid-object(oOutputFileStream)  THEN oOutputFileStream:Close(). 
    IF valid-object(oPdfReader)         THEN oPDFReader:Close().

    DELETE OBJECT oOutputFileStream.
    DELETE OBJECT oDocument.
    DELETE OBJECT oPDFReader.
    DELETE OBJECT oPDFStamper.
    DELETE OBJECT oAcroFields.





--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/FormFlattening-causes-do-you-want-to-save-changes-tp4425011p4425011.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to