Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature fields for digital signage #37

Merged
merged 5 commits into from
May 13, 2024

Conversation

burka
Copy link

@burka burka commented Apr 26, 2024

Added signature fields for digital signing & fixed FormFields not to span multiple pages due to wrong position calculation.
See src/main/resources/visualtest/html/form-signature-field.html for an example.

See danfickle#681 for the old issue for the signature and danfickle#914 for the old issue for the forms with wrong positioning :-)

Thanks for keeping this project alive!

@siegelzc siegelzc self-requested a review April 27, 2024 17:30
@siegelzc siegelzc added the enhancement New feature or request label Apr 27, 2024
@burka burka force-pushed the signature-fields branch from fdce177 to e81119b Compare April 29, 2024 07:54
@burka
Copy link
Author

burka commented Apr 29, 2024

Removed the space & newline-only changes.

Comment on lines 19 to 12
import com.openhtmltopdf.render.PageBox;
import com.openhtmltopdf.util.LogMessageId;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import com.openhtmltopdf.render.PageBox;
import com.openhtmltopdf.util.LogMessageId;
import com.openhtmltopdf.css.constants.CSSName;
import com.openhtmltopdf.css.constants.IdentValue;
import com.openhtmltopdf.css.parser.FSCMYKColor;
import com.openhtmltopdf.css.parser.FSColor;
import com.openhtmltopdf.css.parser.FSRGBColor;
import com.openhtmltopdf.render.Box;
import com.openhtmltopdf.render.PageBox;
import com.openhtmltopdf.render.RenderingContext;
import com.openhtmltopdf.util.ArrayUtil;

After pulling the branch, I had to add these imports to get the file to compile.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed with those force-pushes

@burka burka force-pushed the signature-fields branch from e81119b to 46ff606 Compare May 3, 2024 11:56
@burka burka force-pushed the signature-fields branch from 46ff606 to 3e0a198 Compare May 3, 2024 12:02
@burka
Copy link
Author

burka commented May 3, 2024

I fixed the broken imports, hope everything works now :-)

Copy link
Member

@siegelzc siegelzc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just typo in test html file

…/form-signature-field.html

Co-authored-by: Zachary Siegel <[email protected]>
Copy link
Member

@siegelzc siegelzc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests run: 161, Failures: 1, Errors: 0, Skipped: 15, Time elapsed: 3.407 sec <<< FAILURE!
testSignatureField(com.openhtmltopdf.visualregressiontests.VisualRegressionTest)  Time elapsed: 0.077 sec  <<< FAILURE!
java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:87)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertTrue(Assert.java:53)
	at com.openhtmltopdf.visualregressiontests.VisualRegressionTest.testSignatureField(VisualRegressionTest.java:1518)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at com.openhtmltopdf.testlistener.PrintingRunner.run(PrintingRunner.java:17)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


Results :

Failed tests:   testSignatureField(com.openhtmltopdf.visualregressiontests.VisualRegressionTest)

Tests run: 369, Failures: 1, Errors: 0, Skipped: 21

@burka
Copy link
Author

burka commented May 7, 2024

Thanks! Can someone start the workflow? :-) @siegelzc

@siegelzc
Copy link
Member

siegelzc commented May 7, 2024

merge when ready. the release action can be ignored

@burka
Copy link
Author

burka commented May 13, 2024

Thanks! Who can merge the PR? Is there anything I can do?

@siegelzc
Copy link
Member

Thanks! Who can merge the PR? Is there anything I can do?

Oh, I'll go ahead and merge it. I thought if I approved, then you would be able to merge. I'll look in to the repository permissions on that.

@siegelzc siegelzc merged commit 4fb923e into openhtmltopdf:main May 13, 2024
5 checks passed
@burka
Copy link
Author

burka commented May 13, 2024

Great, thanks!

@burka burka deleted the signature-fields branch June 11, 2024 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants