saving a copy of a pdf form deletes all content excepting filled fields
Bug #299409 reported by
Emmanuel DA MOTA
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evince |
Unknown
|
Medium
|
|||
poppler (Ubuntu) |
Triaged
|
Low
|
Ubuntu Desktop Bugs |
Bug Description
Binary package hint: evince
Ubuntu 8.10
evince 2.24.1
i have to fill a pdf form, when i save a copy of this file whitout filling any field then all the content is save. When i save a copy with one ore more fields filled, only filled fields are saved and all other content is lost.
ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
ExecutablePath: /usr/bin/evince
NonfreeKernelMo
Package: evince 2.24.1-0ubuntu1
ProcEnviron:
SHELL=/bin/bash
PATH=/
LANG=fr_FR.UTF-8
SourcePackage: evince
Uname: Linux 2.6.27-7-generic i686
Changed in evince: | |
status: | Unknown → Confirmed |
Changed in evince: | |
importance: | Unknown → Medium |
Changed in evince: | |
importance: | Medium → Unknown |
Changed in evince: | |
importance: | Unknown → Medium |
Changed in evince: | |
status: | Confirmed → Unknown |
To post a comment you must log in.
The PDF is encrypted ( /Encrypt 954 0 R ) and we don't take that into account it, so that's why the rest of the document "disappears", with
iff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc :writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr, initString( new GooString((const char*)digest, 16));
index 19bb933..6c79fb6 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -836,7 +836,7 @@ void PDFDoc:
obj1.
//create ID array obj4,obj5; initArray( xref);
- Object obj2,obj3,obj4;
+ Object obj2,obj3,
obj2.
if (incrUpdate) { :writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr, initInt( xref->getLastXR efPos() ); t->set( "Prev", &obj1); rDict() ->dictLookupNF( "Encrypt" , &obj5); >set("Encrypt" , &obj5); nary(trailerDic t, outStr);
@@ -868,6 +868,12 @@ void PDFDoc:
if (incrUpdate) {
obj1.
trailerDic
+
+ xref->getTraile
+ if (!obj5.isNull())
+ {
+ trailerDict-
+ }
}
outStr->printf( "trailer\r\n");
writeDiction
the effect is exactly the opposite, the PDF is not destroyed, but our added things don't get rendered because they are not encrypted.
We might want to just "return false" if the PDF is encrypted, at least don't destroy the docuemnt, what do you say?