[Libreoffice-bugs] [Bug 157834] Add simple arithmetic to pdf forms

2023-11-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157834

--- Comment #7 from Mike Kaganski  ---
IMO:

1. There is no built-in means to do calculations in form fields in LibreOffice,
other than writing own macros. LibreOffice *must not* put into PDFs anything
absent in the source document itself, so any document with simple form fields
(but without macros) must never obtain any scripting capability on export -
because LibreOffice is not a PDF authoring tool, but its PDF export is designed
to just store the document in another format, as is.

2. Even if there is a macro in the document, it is not a LibreOffice task to
serve as a AI to convert *programs* from one programming language (say, Basic)
and one document model (namely, LibreOffice/UNO document model) into another
language (JavaScript) and another document model (PDF API). Not only the two
document models are completely different; not only the correct automatic
translation of this kind is yet impossible even for most sophisticated AI
available currently. It is also a new security risk, which mitigation would be
put on TDF.

And then, it would still rely on an implementation of this API in other PDF
viewers, giving raise to bugs like "your PDF doesn't calculate in Reader X"...

WONTFIX IMO.

Ref:

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsapiref.pdf
https://helpx.adobe.com/acrobat/using/javascripts-pdfs-security-risk.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157834] Add simple arithmetic to pdf forms

2023-11-12 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157834

Stéphane Guillou (stragu)  changed:

   What|Removed |Added

 CC||stephane.guillou@libreoffic
   ||e.org
URL||https://ask.libreoffice.org
   ||/t/dynamic-pdf-fields/96101
   ||/4
   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=10
   ||6475
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEEDINFO

--- Comment #6 from Stéphane Guillou (stragu) 
 ---
This has been brought up on ask.LO before:
- https://ask.libreoffice.org/t/dynamic-pdf-fields/96101/4
- https://ask.libreoffice.org/t/math-calculations-in-pdf-forms/12208/4

I understand comment 4 to be the current workaround "recipe" to use a layout
created in LibreOffice, export as PDF, open it in Scribus to then add the
calculated fields (which uses JavaScript) and export again to PDF.

Adobe Acrobat (Pro and Sign as far as I can tell) also allows creating those
too.

So I guess the enhancement request is twofold:
- support calculated fields in a form created with Writer document (is there
anything in ODF for that?)
- support their export as PDF

(In reply to Mike Sapsard from comment #4)
> Although LO can do arithmetic in Base and Calc forms, this cannot be
> exported to pdf for a standalone fillable form.
Any chance you could also attach an example Calc file that has such form
controls?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157834] Add simple arithmetic to pdf forms

2023-10-20 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157834

--- Comment #5 from Mike Sapsard  ---
Created attachment 190333
  --> https://bugs.documentfoundation.org/attachment.cgi?id=190333&action=edit
Scribus interface for arithmetic

This is a screenshot of the Scribus interface for adding the capabilty. I
believe that it must use javascript underneath.

Unfortunately, it does not allow anything more than addition or multiplication
of fields.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157834] Add simple arithmetic to pdf forms

2023-10-20 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157834

--- Comment #4 from Mike Sapsard  ---
Although LO can do arithmetic in Base and Calc forms, this cannot be exported
to pdf for a standalone fillable form.

I would like to be able to create a fillable pdf form with arithmetic, in
Write, that can be sent out to other people to fill in.

In the files that I sent, LO exported Demo_Arithmetic.pdf from
Demo_Arithmetic.odt.

Scribus then imported Demo_Arithmetic.pdf and translated it to its own format -
Demo_Arithmetic.sla. I was then able to add the arithmetic using a simple
window with click to select functions to add the arithmetic. The file was then
exported again as Demo_Arithmetic_from_Scribus.pdf.

So, the first pdf file contains no arithmetic, and the second one does.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157834] Add simple arithmetic to pdf forms

2023-10-20 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157834

--- Comment #3 from Mike Kaganski  ---
(In reply to Mike Sapsard from comment #2)

The ODT in your file does not do any arithmetics. So are you asking for
"translate to PDF what is already working in ODT", or are you asking for
something else?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157834] Add simple arithmetic to pdf forms

2023-10-20 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157834

Mike Sapsard  changed:

   What|Removed |Added

 CC||mike.saps...@gmail.com

--- Comment #2 from Mike Sapsard  ---
Created attachment 190326
  --> https://bugs.documentfoundation.org/attachment.cgi?id=190326&action=edit
Files to produce working fillable pdf form.

Open zip file, which contains the route to create a working fillable pdf with
addition and multiplication. Scribus cannot do subtraction and multiplication,
without user generated javascript.

I suspect that there is embedded javascript in the fully working pdf.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 157834] Add simple arithmetic to pdf forms

2023-10-20 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=157834

--- Comment #1 from Mike Kaganski  ---
Can you please provide a Scribus-made form doing simple arithmetics without
javascript?

-- 
You are receiving this mail because:
You are the assignee for the bug.