Hello,
I currently have this code in Autohotkey working to create bookmarks matched to sDet_FontName. I would like to use it to match font name and size.
To do this I set dwDetectFlags equal to 5 to match font name and font size. I do have 20 point font in my document. I have also tried nDet_Size = 20
as per a different users suggestion with no luck. To get 20 point font, what value should I give? Is dwDetectFlags equal to 5 what I am looking for?
How can I troubleshoot this?
;set bookmarks to add bookmark item level one for our header font and level two for our header font but some smaller sizes?
dwDetectFlags:=1
sDet_FontName:="Swis721 Blk BT"
nDet_FontStyle:=0 ;0 for normal 1 for bold
nDet_Size:=200 ;size 20 font
nDet_SizeDelta:=1 ;+/-.1 font acceptance (ie exactly nDet_Size)
nDet_Textcolor:=0
dwDisplayFlags:=1
dwDisplaycolor:=0
level1:=pdf_printer.AddBookmarkItem(-1, dwDetectFlags, sDet_FontName, nDet_FontStyle, nDet_Size, nDet_SizeDelta, nDet_Textcolor, dwDisplayFlags, dwDisplaycolor)
AddBookmarkItem
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Stefan - PDF-XChange
-
- Site Admin
- Posts: 3586
- Joined: Thu Jul 08, 2004 10:36 pm
Re: AddBookmarkItem
Looks like you have specified all parameters ok.
Font sizes should be specified in tenth of points, so, for 20pt 200 should be used.
I'm afraid the problem is with the font name - for some fonts the name Windows showing in the fonts like is not the same as the driver gets during printing.
Please try to use "Swiss721BT-Black" as a font name.
Font sizes should be specified in tenth of points, so, for 20pt 200 should be used.
I'm afraid the problem is with the font name - for some fonts the name Windows showing in the fonts like is not the same as the driver gets during printing.
Please try to use "Swiss721BT-Black" as a font name.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 31
- Joined: Tue Jul 23, 2013 4:49 pm
Re: AddBookmarkItem
With further testing I found out that is was the size delta. I just needed to increase that to at least around 5 or something otherwise it would not recognize the font size correctly. The font name matched fine. Thanks though.
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am
Re: AddBookmarkItem
Glad to hear it's up and running now speed804 
Cheers,
Stefan

Cheers,
Stefan