Artwork

Content provided by HPR Volunteer and Hacker Public Radio. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by HPR Volunteer and Hacker Public Radio or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

HPR2771: Embedding hidden text in Djvu files

 
Share
 

Manage episode 229462016 series 108988
Content provided by HPR Volunteer and Hacker Public Radio. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by HPR Volunteer and Hacker Public Radio or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

To embed text into a Djvu file, you must create a djvused script detailing the page and bitmap location of one of: character, word, line, paragraph, or region.

For good measure, you should first list the contents of your Djvu bundle:

$ djvused -e 'select; ls' test.djvu 1 P 177062 p0001.djvu 2 P 199144 p0002.djvu 3 P 12323 p0003.djvu 4 P 57059 p0004.djvu 5 P 96725 p0005.djvu 6 P 53868 p0006.djvu 

Then define the location of text in a file called, for instance, content.dsed. Assume that my page is 1000 px by 1000 px:

select; remove-ant; remove-txt select "p0004.djvu" # page 4 set-txt (page 0 0 1000 1000 (word 100 600 450 800 "Hello" ) (word 100 600 450 800 "world" )) . select "p0005.djvu" set-txt (page 0 0 1000 1000 (line 100 400 900 600 "Hacker Puppy Radio")) 

Apply this script to your Djvu file with dvjused:

djvused -f ./content.dsed -s test.djvu 

Converting from PDF to Djvu

You can convert PDF files to Djvu with the djvudigital command. Due to license incompatibility, it does require you to compile a Ghostscript plugin, but it's an easy build. Get the gsdjvu code, and then follow its README instructions.

Once you've built the Ghostscript driver, you can convert PDF to Djvu:

djvudigital --words foo.pdf foo.djvu 
  continue reading

4105 episodes

Artwork
iconShare
 
Manage episode 229462016 series 108988
Content provided by HPR Volunteer and Hacker Public Radio. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by HPR Volunteer and Hacker Public Radio or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

To embed text into a Djvu file, you must create a djvused script detailing the page and bitmap location of one of: character, word, line, paragraph, or region.

For good measure, you should first list the contents of your Djvu bundle:

$ djvused -e 'select; ls' test.djvu 1 P 177062 p0001.djvu 2 P 199144 p0002.djvu 3 P 12323 p0003.djvu 4 P 57059 p0004.djvu 5 P 96725 p0005.djvu 6 P 53868 p0006.djvu 

Then define the location of text in a file called, for instance, content.dsed. Assume that my page is 1000 px by 1000 px:

select; remove-ant; remove-txt select "p0004.djvu" # page 4 set-txt (page 0 0 1000 1000 (word 100 600 450 800 "Hello" ) (word 100 600 450 800 "world" )) . select "p0005.djvu" set-txt (page 0 0 1000 1000 (line 100 400 900 600 "Hacker Puppy Radio")) 

Apply this script to your Djvu file with dvjused:

djvused -f ./content.dsed -s test.djvu 

Converting from PDF to Djvu

You can convert PDF files to Djvu with the djvudigital command. Due to license incompatibility, it does require you to compile a Ghostscript plugin, but it's an easy build. Get the gsdjvu code, and then follow its README instructions.

Once you've built the Ghostscript driver, you can convert PDF to Djvu:

djvudigital --words foo.pdf foo.djvu 
  continue reading

4105 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide