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

Add MergePDF Kotlin sample #9

Conversation

datalogics-saharay
Copy link
Contributor

Let's add a Kotlin sample to demonstrates how to merge two PDF files together.

@datalogics-saharay datalogics-saharay marked this pull request as ready for review February 15, 2024 23:09
@datalogics-robl datalogics-robl self-assigned this Feb 16, 2024
)
)
} catch (ex: LibraryException) {
if (!ex.message!!.contains("An incorrect structure tree was found in the PDF file but operation continued")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What does the double !! actually do here? In C, a statement like !!(int)value can be a way to turn a variable into a boolean value, is that what is happening here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Found an answer: https://kotlinlang.org/docs/null-safety.html#the-operator

To quote: "(!!) converts any value to a non-nullable type and throws an exception if the value is null. "

@datalogics-robl datalogics-robl merged commit 55de933 into datalogics:develop Feb 16, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants