
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
djvused2pdfmark
Advanced tools
npm i -g djvused2pdfmark
When converting a djvu file to a pdf, it's often desirable to transfer the outline & metadata to the pdf as well.
PDF supports a special pdfmark
operator that is used for features
like bookmarks & docinfo. Using ghostscript, you can augment an
existing pdf w/ pdfmark commands:
$ gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf input.pdf example.pdfmark
djvused2pdfmark helps you to create such example.pdfmark
file.
djvused(1) util exports/imports outlines in the form of sexps:
(bookmarks
("Preface" "#1")
("1 Introduction" "#2"
("1.1 Foo" "#3")
("1.2 Bar" "#4"
("1.2.1 start" "#5"))
("1.3 Baz" "#6"))
("2 Setup" "#7")
)
To convert them in pdfmark commands, run:
$ djvused -e print-outline file.djvu | djvused2pdfmark
[/Page 1 /Title (Preface) /OUT pdfmark
[/Count 3 /Page 2 /Title (1 Introduction) /OUT pdfmark
[/Page 3 /Title (1.1 Foo) /OUT pdfmark
[/Count 1 /Page 4 /Title (1.2 Bar) /OUT pdfmark
[/Page 5 /Title (1.2.1 start) /OUT pdfmark
[/Page 6 /Title (1.3 Baz) /OUT pdfmark
[/Page 7 /Title (2 Setup) /OUT pdfmark
Only outlines that point to page numbers are supported for now.
For some reason djvused(1) doesn't use sexps for metadata parts, but a bizarre list of pairs:
key1\t"value1"
key2\t"value2"
...
To convert them to pdf docinfo, pass 'meta' CL argument to djvused2pdfmark cmd:
$ djvused -e print-outline file.djvu | djvused2pdfmark meta
[ /Author (John Doe\, Jane Doe)
/CreationDate (D:19980101000000)
/Creator (Heaven knows)
/Producer (A \(custom makefile!)
/Title (Foo Bar)
/Subject (An Administrator Guide to Foobar)
/Keywords (one\, two)
/ModDate (D:20180101000000)
/DOCINFO pdfmark
MIT.
FAQs
Convert djvu bookmarks (outline) or meta to pdfmark code
We found that djvused2pdfmark demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.