Hello, On Tue, Jul 10, 2007 at 02:37:03AM +0400, Nickolay V. Shmyrev wrote: > Good news. With the amazing work of Julien and Carlos we now have > initial PDF forms support in Evince. SoC 2006 project finally landed in > svn. Currently it requires poppler HEAD, but let's hope we'll see a new > release of poppler. I tried it, and it works! Another feature that would be usefule is saving already filled in form content, e.g. in a separate file if it's not possible / difficult in the pdf itself: test.pdf test.pdf.form_content This would be really useful when editing annual recurring requests. While trying this I discovered a bug: "Save copy" works only if the temp-dir and the destination directory are on the same filesystem. I included a patch that solves the problem. -- Johannes Weißl
diff -aur evince-0.9.2svn.orig/shell/ev-window.c evince-0.9.2svn/shell/ev-window.c --- evince-0.9.2svn.orig/shell/ev-window.c 2007-07-10 17:08:15.000000000 +0200 +++ evince-0.9.2svn/shell/ev-window.c 2007-07-11 05:04:00.000000000 +0200 @@ -1942,6 +1942,13 @@ return 0; } +static gint +move_xfer_no_progress_callback (GnomeVFSXferProgressInfo *info, + gpointer *data) +{ + return 1; +} + static void ev_window_save_remote (EvWindow *ev_window, GnomeVFSURI *src, @@ -2071,22 +2078,27 @@ } if (local_uri) { - GnomeVFSURI *target_uri; + GnomeVFSURI *source_uri, *target_uri; + source_uri = gnome_vfs_uri_new (local_uri); target_uri = gnome_vfs_uri_new (uri); if (gnome_vfs_uri_is_local (target_uri)) { /* If target uri is local, just rename local_uri */ - if (gnome_vfs_move (local_uri, uri, TRUE) != GNOME_VFS_OK) + if (gnome_vfs_xfer_uri ( + source_uri, target_uri, + GNOME_VFS_XFER_REMOVESOURCE | GNOME_VFS_XFER_FOLLOW_LINKS, + GNOME_VFS_XFER_ERROR_MODE_ABORT, + GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE, + (GnomeVFSXferProgressCallback) + move_xfer_no_progress_callback, + NULL) != GNOME_VFS_OK) ev_tmp_uri_unlink (local_uri); } else { - GnomeVFSURI *source_uri; - - source_uri = gnome_vfs_uri_new (local_uri); ev_window_save_remote (ev_window, source_uri, target_uri); - gnome_vfs_uri_unref (source_uri); } gnome_vfs_uri_unref (target_uri); + gnome_vfs_uri_unref (source_uri); g_free (local_uri); }
Attachment:
pgpwOSnVHsFj6.pgp
Description: PGP signature