sumit07:
If by custom properties you're talking about things like "Author" tags and such, you might want to check out
this node. The sudoku2pdf.pl script on that node uses PDF::API2, sets the Author tag and uses another to hold the number of puzzles in the document.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
| [reply] |
| [reply] |
This book is largely Perl based.
PDF Hacks - 100 Industrial Strength Tips and Tools
Author Sid Steward.
It'll probably be on Oreilly Bookshelf if you can't get it from Amazon.
Pdf is a tricky and complex format but primarily text based so Perl can often hack into it.
Have you tried writing a marker string using Acrobat Pro or similar, then search for the marker with vim. If it remains plain text you can probably find it and identify postscript placeholders in the pdf file that give you the location. You can then use regex to write your text data on the same placeholder location in other pdf files. (I've used this technique before on pdf and it often works a treat but sometimes it's not that easy)
Remember though, a pdf isn't a simple data file, it's a postscript program so you'll break it if you aren't careful.
There are some pdf APIs available - pdflib, etc. But they aren't cheap. | [reply] |
Most pdfs are compressed. A uncompressed pdf is a plain text file that is human readable (but your eyes will blead from the endless vector graphics tokens). There are some cmd line tools which can compress/uncompress and defragment/progressive download your pdf file. The pdf format allows stream generation with a server creating a pdf as a nonseekable stream, the allocation table goes on the end, if a token/block isn't in the final allocation table it is effectively free space but its still wastes space in the pdf file. A pdf file's tree allows reference looping BTW.
| [reply] |
n do us all a fvr n skp th “txt spk.” / yu hav a kybrd / use it.
;-)
In all seriousness ... welcome to PerlMonks. We’ll be happy to help you. Now, the best way to help us to help you is to speak plainly and completely about ... what you’re doing, what you’ve tried, what you’re thinking right now about the task that is facing you, and so on. “Text speak” gets in the way very seriously. The very best way that any of us can help you, is if you give us something substantial to work from. (“We hear your distress call ... where are you right now?”) There are several hyperlinks that appear on the screen where you enter any message... please read those links! The time you save will be, umm, everyone’s.
| |