From users-return-11201-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Tue Sep 18 19:01:19 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 48F8F180672 for ; Tue, 18 Sep 2018 19:01:18 +0200 (CEST) Received: (qmail 6552 invoked by uid 500); 18 Sep 2018 17:01:17 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 6527 invoked by uid 99); 18 Sep 2018 17:01:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2018 17:01:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id F0E5C1843C4 for ; Tue, 18 Sep 2018 17:01:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.3 X-Spam-Level: X-Spam-Status: No, score=0.3 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3wtG0mjMc4GO for ; Tue, 18 Sep 2018 17:01:13 +0000 (UTC) Received: from www168.your-server.de (www168.your-server.de [213.133.104.168]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 5F0CB5F418 for ; Tue, 18 Sep 2018 17:01:13 +0000 (UTC) Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www168.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1g2JN4-0004bK-G0 for users@pdfbox.apache.org; Tue, 18 Sep 2018 19:01:06 +0200 Received: from [91.43.46.212] (helo=mbp001.fritz.box) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1g2JN4-000BZ5-94 for users@pdfbox.apache.org; Tue, 18 Sep 2018 19:01:06 +0200 From: Maruan Sahyoun Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: PDComboBox.setValue("selection text") displays nothing? Date: Tue, 18 Sep 2018 19:01:05 +0200 References: <694132258424467766b4b0ffd377205326443bf4.camel@fileaffairs.de> <8eb65698be35a1a4f393d40201718329c2930d6d.camel@fileaffairs.de> To: users@pdfbox.apache.org In-Reply-To: Message-Id: <366B60BD-034E-44D2-A4C4-C64E945098B4@fileaffairs.de> X-Mailer: Apple Mail (2.3273) X-Authenticated-Sender: sahyoun@fileaffairs.de X-Virus-Scanned: Clear (ClamAV 0.100.1/24952/Tue Sep 18 15:13:17 2018) > Am 18.09.2018 um 18:54 schrieb Dagnon, William = : >=20 > Maruan and Tilman, >=20 > Thanks for your responses: >=20 > * I can't tell how PDButtonTest is supposed to help: there are no = PDComboBox nor PDChoice controls in that class, and the only way any = controls are changed is with ctrl.setValue("string") (or=20 > checkbox.check()) which, as my screenshot shows, did change the "V" = (value) but does not display anything for combo boxes. Ah - sorry - somehow I got that you are using Checkboxes. I'll take = another look >=20 > * Per Tilman, here is 'N' highlighted: imgur.com/a/M3XORNs > This is different in a few ways from a selected, visible version: > A) this has "/DeviceGray cs" at the top, a viewable one doesn't > B) a viewable one, where I manually selected it, has "(Part ) Tj" and = later a "(B) Tj" row, whereas this one only has one "(Part B) Tj" row... >=20 > * I tried getting 2.0.11 to work locally for most of yesterday, but = WebSphere refused to load fontbox 2.0.11 for some reason - even after = extensive re-Mavening and rebuilding. >=20 > * if it helps, I'm viewing in Adobe Acrobat Reader DC 2018.11.20058 >=20 > * In comparing the file saved by PDFBox which does not display text = for the combo boxes, versus one where I manually selected what I wanted = in them (through Reader DC) and saved it, the most obvious difference is = that the PDFBox file is missing the "I: (1)" and subrow "0:0". (or = "0:1", etc., depending on which index I selected). > So.. maybe Reader knows the value from "V" but doesn't know what to = display without the index being set? >=20 >=20 > If I have time, I'll try debugging with attaching PDFBox's source, but = I doubt that'll be today. >=20 > Thanks again! >=20 >=20 > -----Original Message----- > From: Maruan Sahyoun > Sent: Tuesday, September 18, 2018 9:36 AM > To: users@pdfbox.apache.org > Subject: Re: PDComboBox.setValue("selection text") displays nothing? >=20 > Hi, >=20 > please take a look at the unit test class PDButtonTest to see how to = set the value dependent on the fields definition. You could also try to = use checkbox.getOnValues() to get the list of valid values which are = causing the individual checkboxes to be set. >=20 > Please also note that - as Tillmann already pointed out - it's a good = idea to use 2.0.11. >=20 > Eg. you might be affected by ... which has been resolved in 2.0.5., = PDFBOX-3753 which has been resolved in 2.0.6 and others. >=20 > BR > Maruan >=20 >=20 >> Maruan, please give this a try: imgur.com/a/o3SqsCn >>=20 >>=20 >> ALSO wrt: >> "Current version is 2.0.11, please retry with that one. >>=20 >> Tilman" >>=20 >> Thanks, cannot but will promote the idea localy: the version is out = of my control. Why, were fixed introduced for ComboBoxes? >>=20 >>=20 >> -----Original Message----- >> From: Maruan Sahyoun >> Sent: Monday, September 17, 2018 11:06 AM >> To: users@pdfbox.apache.org >> Subject: Re: PDComboBox.setValue("selection text") displays nothing? >>=20 >> Could you do a screenshot of the fields definition in PDFDebugger = with the subtrees expanded and upload that? >>=20 >> BR >> Maruan >>=20 >>> Thanks for the response: >>>=20 >>> PDFBox 2.0.4 >>>=20 >>> Please look right above your questions to see the 3 ways I've used = to set the values, though since I'm only ever setting a single value, = they always come down to: >>>=20 >>> ctrl.setValue(String); // the only operation on any control on the >>> PDF >>>=20 >>> While I can create a PDF, I doubt I can put it anywhere public - and = asking the lawyers about it would take a while. >>>=20 >>>=20 >>> -----Original Message----- >>> From: Maruan Sahyoun >>> Sent: Monday, September 17, 2018 10:31 AM >>> To: users@pdfbox.apache.org >>> Subject: Re: PDComboBox.setValue("selection text") displays nothing? >>>=20 >>> WARNING: This is an external email that originated outside of the = WPS email system. >>> DO NOT CLICK links or open attachments unless you recognize the = sender and know the content is safe! >>>=20 >>> Hi, >>>> Am 17.09.2018 um 17:05 schrieb Dagnon, William = : >>>>=20 >>>> Hello again all, >>>>=20 >>>> I'm trying to fill out someone else's PDF programmatically, and = while the text values work fine as before, the controls with Opts never = display their values after I've set them. In the saved PDF, there is no = text at the ComboBox's location, but using PDFDebugger the annotation = and Opts are still there. Just not visible...? "V" is the correct = value as set. >>>>=20 >>>> The control looks fine when I look at the original, and I can = select what I want from the box manually through an Adobe GUI. >>>>=20 >>>> Comparing the original vs PDFBox saved files, each of the 4 CombBox = controls have exactly these differences: >>>>=20 >>>> 1. V, because I set it >>>> 2. "P": first # in [] goes from 61 to 312, plus lower details >>>> differ 3. There is a new "I: (1)" entry for the annotation >>>>=20 >>>> Text controls: >>>>=20 >>>> 1. Have a "V" (didn't in the original - no defaults) 2. Have >>>> the same change to "P" >>>> 3. Have the same "AP" as before, or a new "AP" if one didn't = exist. >>>>=20 >>>> All of the ComboBoxes have the same font("DA: /Helv 12 Tf g"), but = the couple text controls with the same font display fine. >>>>=20 >>>> I HAVE TRIED: >>>> A) Originally I'd just control.setValue("foobar") for the Opt = controls just like the text controls, but that gave no results. >>>>=20 >>>> B) The only code example Google returns is a stackoverflow where = they have a font problem, but I tried control.setValue(opts.get(index)) = - with no further luck. >>>>=20 >>>> C) I've also looked at the opts themselves and they do exist - = though as COSString objects. But they have exactly the same text, and = I'm able to search through them for equal strings in order to determine = the index. >>>=20 >>> which version of PDFBox are you using? How do you set the value? = Would you have a sample PDF to be able to give you some specific code = (please upload to a shared location)? >>>=20 >>> BR >>> Maruan >>>=20 >>>=20 >>>>=20 >>>>=20 >>>> How ARE PDComboBox controls supposed to work? Or am I using the = wrong control altogether? >>>>=20 >>>> Thanks... >>>>=20 >>>>=20 >>>> P.S. I am now seeing a DEBUG log: "ScratchFileBuffer:516 - = ScratchFileBuffer not closed!" which I don't remember from before... >=20 > CONFIDENTIALITY NOTICE: This e-mail, including any attachments, may = contain confidential, privileged and/or proprietary information which is = solely for the use of the intended recipient(s). Any review, use, = disclosure, or retention by others is strictly prohibited. If you are = not an intended recipient, please contact the sender and delete this = e-mail, any attachments, and all copies. >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org