I want to make the targets of bookmarks fitwidth. I don't see there is such option in pdftk and cpdf. Is this possible with these tools? Or some other tools provide this feature?
I want to make the targets of bookmarks fitwidth. I don't see there is such option in pdftk and cpdf. Is this possible with these tools? Or some other tools provide this feature?
Yes but not always applied the same in all viewers. However it should be possible to set a preferred page wide strip near top of page. Here we see effect in Acrobat on clicking single bookmark.
I dont think PDFtk is that refined however in cpdf format output is
0 "FitWidth" 1 "[1/FitBH 792]"
Note:- read the manual however the first 0 may need to be 1 or more but the rest should be similar
Here is an example using the manual to alter 6 to 6.0 and zoom fit width to top of page (page height in this case is 666) and fit width works in Acrobat or some other readers, but only top of page in others like Edge.
cpdf -list-bookmarks -utf8 "cpdfmanual - Copy.pdf" >bookmarks.txt
cpdf -add-bookmarks bookmarks.txt "cpdfmanual - Copy.pdf" -o "cpdfmanual - Modified.pdf"
Note not working in current Edge or many other browsers and that with Chrome/ium represents the web majority.
However for browsers you can send URL.pdf#fragment(task=value)
bookmark_targets_fitwidth.pdf#view=FitH