Updated patch v2.1 -- applies cleanly against unmodified pdf4tcl 0.9.4. Changes since initial submission: 8 field types: text, password, checkbutton, combobox, listbox, radiobutton, pushbutton, signature New options: -readonly, -required, -label, -caption, -action, -url, -group, -value, -options, -editable, -sort, -multiselect 67 new tests in form-ext.test (form-5.x to form-12.x) Bug fix in mytest glob pattern (tests/init.tcl) NeedAppearances never set (digital signature compatible) Fork with full...
Changes since initial submission: Patch now applies cleanly against unmodified pdf4tcl 0.9.4 source tree: patch -p1 < addforms-v21.patch then make 8 field types (added: password, signature as 7th/8th type)
New form types: password – masked text input combobox – dropdown with optional editing listbox – selection list with optional multiselect radiobutton – group-based selection pushbutton – reset/URL/submit actions Files provided: addforms-src-main.patch – the patch main.tcl – Patch against src/main.tcl form-ext.test – 36 tests test7.tcl – example with all types addForm-manpage.txt – documentation update for pdf4tcl.man test7.tcl ./examples/ Demo of all 7 form types addForm-manpage.txt
Sorry. I have no local patches to pdf4tcl about this. I also have the tickets 19 to 22 open here, they do not come with code either.
Andreas, knowing you, I suspect, you have private modifications to pdf4tcl, that you use :-) Can you attach the patches to the tickets here?
A CMap has too many code maps
RFE: support for page labels
metadata and setFont
Doc Issue -keywords
Doc bug: -format
RFE support for moddate and reader instructions
I decided to use the patch with full capabilities. A border is just beautiful and it is helpful to find links. I looked into pdflatex and it used color "0 1 1" for hyperlinks and "0 0 1" for internal links. That looks good. So, here is the manual entry: hyperlinkAdd x y width height url ?options? x y width height is the box sensible for the hyperlink click url is the destination URL Possible options are: * -borderwidth: width of the border around the bounding box in display pixels, 0 to hide. Default:...
Dear Peter, please find attached the patch for the command: hyperlinkAdd x y width height url where a hyperlink clickable area is added to the given rectangular PDF region. I had a version which implements a lot of options like: hyperlinkAdd x y width height url -borderwidth 3 -borderradius 15 -bordercolor {0 0 255} -borderon 10 -borderoff 2 -borderhighlight I but this looks old style. tclfpdf just implements the upper command and I think, this is reasonable. Nevertheless, pdflatex shows borders...
Make distance of lineSpacing observable
-align right is not respected, if non-standard characters are replaced by "?"
Add font capabilities for more than 256 characters - use-case: Chinese Output
Add hyperlink capabilities
::pdf4tcl::createFontSpecEnc may check for maximum codepoint count
Colorspace for Images
Consider "package require img::window" instead Img
Fixed now
Update tests to run
Use img::window [#12]
Store fonts locally for stabler tests
Changes Tk8.7 -underline type result in runtime errors
Fixed it with the lseq trick.
Better fix for [#13]
I'm not aware of a specific command for this. However, the following should work: ~~~~ set str "Example String Value" set index "end-3" set intIndex [lindex [lseq [string length $str]] $index] This technique should work for both strings and lists. proc intIndexForString {stringValue index} { return [lindex [lseq [string length $stringValue]] $index] } proc intIndexForList {listValue index} { return [lindex [lseq [llength $listValue]] $index] } ~~~ These functions should have O(1) performance regardless...
I made a fix that makes it handle it a bit more gracefully. End-style index will be treated as not existing for now. Is there a nice way to parse end-style from Tcl?
Handle Tk canvas 8.7 underline gracefully. [#13]
Split source file
Changes Tk8.7 -underline type result in runtime errors
Consider "package require img::window" instead Img
Reorganising source code.
Updated changes
Canvas method returns bbox.
Support tko::path for PDF generation.
Cleanup of font tests. Better error for unsupported file
Bumped revision to 0.9.4
Great, sorry I didn't check recent sources... Tested the new 093 script within my context and results look good! Thank you so much for all the effort you put into this project!
Great, sorry I didn't check recent sources... I'll test it on my app asap and report back!
Colorspace for Images
Fixed. But only crudely tested.
Support grayscale JPEG
Colorspace for Images
Doc, example and cleanup for Tiff
AddTiff {properly clean up opened channel}
If you have a small TIFF-file that can be used for example and test, could you add it under examples? I would like to see it working, and I cannot run tiff.test since I do not have the prerequistes.
AddTiff {properly clean up opened channel}
Add support for Tiff with Group 4 compression
Add support for Tiff with Group 4 compression
Bumped revision to 0.9.3
Save pdf4tcl state with gsave/grestore.
Release 0.9.2
Peter, here is my code: package require pdf4tcl set report [lindex $argv 0] <-- this is ASCII text data being passed in from calling program set page_num 1 set header "MMC OPERATIVE REPORT" pdf4tcl::new mypdf -paper letter -margin 0.25i mypdf startPage set width [lindex [mypdf getDrawableArea] 0] mypdf line 0 10 $width 10 mypdf setFont 12 "Helvetica-Bold" mypdf text $header -align center -x [expr {$width/2.0}] -y 0 mypdf line 0 740 $width 740 mypdf setFont 10 Courier mypdf text "Page $page_num" -align...
In this code, it seems that the "Page $page_num" is part of the issue. I did a lot of playing around with this yesterday and if I changed this to "Page '$page_num". then I would see the second page output (this is a 2 page PDF) displayed with "Page '2" displayed at the bottom. There must be some issue with the variable data being passed back to the calling program.
Peter, here is my code: package require pdf4tcl set report [lindex $argv 0] set page_num 1 set header "MMC OPERATIVE REPORT" pdf4tcl::new mypdf -paper letter -margin 0.25i mypdf startPage set width [lindex [mypdf getDrawableArea] 0] mypdf line 0 10 $width 10 mypdf setFont 12 "Helvetica-Bold" mypdf text $header -align center -x [expr {$width/2.0}] -y 0 set output [ mypdf drawTextBox 10 15 612 720 $report ] mypdf line 0 740 $width 740 mypdf setFont 10 Courier mypdf text "Page $page_num" -align center...
Hi Peter. Windows 10. I'm using a 3rd party app that allows me to call an external .exe. In this case, I'm calling tclsh.exe and then calling my script which uses your package. I'm passing in a variable which houses report text. I draw static elements like lines and header text. The 3rd party app allows me to direct output from stdout to a file, so that is what I'm doing. I'm scratching my head as to why static elements are displayed fine, but by variable report data is not visible, but the number...
I work for a health system and there is a vendor we work with that also produces PDF output, but they base64 encapsulate it before sending. Just didn't know if this is an option in the future.
Hi Peter. Windows 10. I'm using a 3rd party app that allows me to call an external .exe. In this case, I'm calling tclsh.exe and then calling my script which uses your package. I'm passing in a variable which houses report text. I draw static elements like lines and header text. The 3rd part app allows me to direct output from stdout to a file, so that is what I'm doing. I'm scratching my head as to why static elements are displayed fine, but by variable report data is not visible, but the number...
What platform? How does the stdout end up in a PDF file? Stdout is in binary mode when pdftcl writes to it so there should not be any encoding issues unless the receiving end does something.
Writing to stdout not the same as file output
Started on helper functions to extract text from PDF document.
Updated changes page.
Added getForms command for extracting Form data from PDF file.
Return more info in getForms.
Include pattern in debug output.
Make PDF reader handle incremental updates in files.
New features for form objects
Added -id and -multiline, though not exactly like in the patch.
Added -id and -multiline options to addForm method.
Make correct callback in TkPath itempdf calls.
Added clip, gsave, grestore method. Added -closed option to polygon method.
Enhancement request for Form Types
New features for form objects
Documented font handling more
Updated copyright
Corrected web page
Release 0.9.1
Thank you ! Light-speed solution, great ! Harald
Updated changes
Access method for $::pdf4tcl::Fonts
Added pdf4tcl::getFonts
Get size of drawTextBox before really drawing to decide if it fits to page
I added a -dryrun option to drawTextBox.
Added getFonts API
Added -dryrun option to drawTextBox method
Get size of drawTextBox before really drawing to decide if it fits to page
Access method for $::pdf4tcl::Fonts
Documented XObject -noimage
Extended tests
Use throw everywhere to generate errors.
Remove old version constraints in tests
Removed deprecated functionality.
Bumped revision to 0.9.0
Compress images in addRawImage if compress is on.