GithubHelp home page GithubHelp logo

zaro / pdf-metadata-editor Goto Github PK

View Code? Open in Web Editor NEW
127.0 9.0 19.0 14.16 MB

PDF Metadata Editor is a simple tool you can use to edit the metadata (Author, Keywors, etc.) of a PDF document.

Home Page: http://broken-by.me/pdf-metadata-editor/

License: MIT License

Shell 2.84% Java 96.49% HTML 0.67%

pdf-metadata-editor's Introduction

Pdf Metadata Editor

What

A simple GUI editor for PDF Metadata written in java and using Apache PDFBox.

Build

It uses maven , so just type:

mvn install

Download

Prebuilt installer can be found here

pdf-metadata-editor's People

Contributors

zaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdf-metadata-editor's Issues

support for more file-types

Hey,

it would be much appreciated if you could add support for other (document-) filetypes. I'd be interested in seeing support especially for .djvu and .ePub. It surely makes sense to add support for word-processor files , too. (I could add more but I guess this itself is already a lot to ask for?).

all the best,

Rob

Batch mode overwrites all fields (macOS)

When You just want to set a single field (and checkmark just that field) batch mode overwrites all other fields with empty strings instead of preserving the values. That makes the feature useless (at least for us)...

On Windows, it says "failed to find Java VM"

I downloaded the portable installer (http://broken-by.me/download/pme-extract-run-zip/) and tried double-clicking PdfMetadataEditor64.exe in Windows Explorer. It shows "Failed to find Java VM".
The same error is shown upon running the CLI executables.

And if I invoke the .jar using Java manually, I get an exception:

$> java -jar pdf-metadata-edit-2.2.2.jar
java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null
        at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)
        at pmedit.PDFMetadataEditWindow.initialize(PDFMetadataEditWindow.java:390)
        at pmedit.PDFMetadataEditWindow.<init>(PDFMetadataEditWindow.java:55)
        at pmedit.Main.executeCommandSwingWorker(Main.java:132)
        at pmedit.Main$CommandsExecutor.process(Main.java:62)
        at java.desktop/javax.swing.SwingWorker$3.run(SwingWorker.java:423)
        at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
        at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:847)
        at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
        at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:857)
        at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:310)
        at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:242)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

My System

Windows 10 Pro 64-Bit, Build 19041.1052.

$> where.exe java
C:\Program Files\OpenJDK\jdk-16.0.1\bin\java.exe

$> java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-24)
OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

NPE when running under jdk 10

[C:\Program Files\PdfMetadataEditor][info] Module Name: C:\Program Files\PdfMetadataEditor\PdfMetadataEditor.exe
[info] Module INI: C:\Program Files\PdfMetadataEditor\PdfMetadataEditor.ini
[info] Module Dir: C:\Program Files\PdfMetadataEditor
[info] INI Dir: C:\Program Files\PdfMetadataEditor
[info] Configured vm.location: c:\java\jdk-10.0.1\bin\server\jvm.dll
[info] Found VM: c:\java\jdk-10.0.1\bin\server\jvm.dll
[info] Expanding Classpath: pdf-metadata-edit-2.2.2.jar
[info] Generated Classpath: C:\Program Files\PdfMetadataEditor\pdf-metadata-edit-2.2.2.jar
[info] VM Args:
[info] vmarg.0=-DlauncherDDE=yes
[info] vmarg.1=-Djava.class.path=C:\Program Files\PdfMetadataEditor\pdf-metadata-edit-2.2.2.jar
[info] Registering natives for Native class
[warn] Could not find Native class
[info] Initializing DDE
java.lang.NullPointerException
at java.desktop/javax.swing.ImageIcon.(ImageIcon.java:217)
at pmedit.PDFMetadataEditWindow.initialize(PDFMetadataEditWindow.java:390)
at pmedit.PDFMetadataEditWindow.(PDFMetadataEditWindow.java:55)
at pmedit.Main.executeCommandSwingWorker(Main.java:132)
at pmedit.Main$CommandsExecutor.process(Main.java:62)
at java.desktop/javax.swing.SwingWorker$3.run(SwingWorker.java:414)
at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:834)
at java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at java.desktop/javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:844)
at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:317)
at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:249)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
^C
[C:\Program Files\PdfMetadataEditor][info] Application exited (130).

Default values not populating when file opened

Thank you for sharing this program! It has the potential to save me a lot of time - I really appreciate your efforts. I'm having an issue with the default values. I've gone into settings and entered in the values that I would like each of my files to have, but when I open a .pdf in the editor, the values are always blank; they never get the default values that I have filled in. When I go edit the default values again, my entries are stored there, they just don't get transferred to each file.

Thank you,
Adam

FileNotFoundException after "Save and rename"

After a "save and rename" the editor tries to reload the file which now is renamed. This yields a FileNotFound exception.

Patch (cannot attach it):

Index: src/main/java/pmedit/PDFMetadataEditWindow.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP

<+>UTF-8

--- src/main/java/pmedit/PDFMetadataEditWindow.java (revision 69c8375)
+++ src/main/java/pmedit/PDFMetadataEditWindow.java (revision 11570d33ea73b148d8ef4475ec9886b85bc61645)
@@ -169,6 +169,7 @@
File to = new File(toDir,toName);
try {
Files.move(pdfFile.toPath(), to.toPath());

  •            pdfFile = to;
        } catch (IOException e1) {
            JOptionPane.showMessageDialog(PDFMetadataEditWindow.this,
                    "Error while renaming file:\n" + e1.toString());
    

Doesn't work

Features "Copy XMP to document" and "Copy documento to XMP" doesn't work. Please, help me...

Thanks a lot...

Ability to use defaults to overwrite what is in PDF

First, thanks for a very useful app!

I use this to adjust CreatorTool metadata in PDFs so that my Fujitsu ScanSnap software will do OCR on any PDF rather than just the ones I actually scanned myself.

I do the same operation every time I use the app, but currently I have to manually erase the metadata and cut and paste from the defaults dialog.

It would be handy if a button could "set metadata to defaults"

macOS version results in '“Pdf Metadata Editor” is damaged and can’t be opened'

Hello, I've tried both versions of the Mac download, and also the previous version (3.0.1) and all of them result in the following error message from the system. I've done some basic troubleshooting. But so far just keep getting the same message. And I didn't see another issue mentioning that.

“Pdf Metadata Editor” is damaged and can’t be opened. You should move it to the Trash.

I imagine it has something to do with how the app is generated. I'm on a fairly new, M2 16" MacBook Pro and on the latest OS, 14.4.1. Thanks!

Exception when opening a file modified in Calibre

Hi,

Calibre has a function to embed metadata into PDF files. I have a couple of files that went through that process. When I try to open them in your editor, I get the following error message:

Error while opening file:
org.apache.xmpbox.xml.XmpParsingException: Cannot find a definition for the namespace http://calibre-ebook.com/xmp-namespace

This is clearly an exception coming from the xmpbox library. But I believe, you could handle this exception and offer the user to remove all metadata related to Calibre namespace (keeping the actual XMP data).

Is this something you would like to improve on?

cant change pdf producer

tried so many times to change pdf producer but its not been changed..is there any suggestions????

Editor GUI doesn't open, though batch one does

Hello Zaro - I am trying to install on Kubuntu 18.04 with openjdk 11.0.4 2019-07-16 preinstalled. The installer jar works and installs. The batch editor opens a GUI as I would expect (and a further GUI with parameters). But the ordinary editor tries for a short while to open, then gives up. Happy to buy a license, but worried about the ordinary editor part (apparently) not working. Any help gratefully received, thank you.

request new function

Hello Zaro,

this is very nice project.
but it would be nice, if there is a possibility to integrate own xmp-panels.
Will you do that?

looks great but doesn't do anything (!)

Is it because I'm running Mac OS Sierra? Very intuitive interface and the video tells me what I'd already worked out. Problem is none of the new data gets written back to the PDF.

Am I just being blonde (?!)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.