17

I created an open-source Swift library for parsing PDF, after having faced the problem myself. I thought it would be useful to let people know about it, and so I replied to people asking for a good way to parse PDF in Swift by mentioning it.

I got flagged for self-promotion because I failed to mention the fact that I was the author of that lib. Now that I fixed the answers to add the disclaimer, should I vote to "undelete" the answers, or will the moderator do it naturally ?

EDIT: this question isn't a duplicate as I'm not asking about self-promoting. Just how to "undelete" a deleted answer.

7
  • 15
    Ideally you should also explain how you actually did it, if not include the complete code to do it, in the answer itself. Related: Are answers that just contain links elsewhere really “good answers”? Jul 26, 2018 at 13:49
  • 6
    And make sure you didn't just copy/paste your answers. If the exact same answer exactly answers multiple questions, there's a good chance those questions are duplicates. We'd rather have one answer on one question with the other questions closed in that case. Otherwise, tailor your answers to the questions themselves.
    – Kendra
    Jul 26, 2018 at 13:51
  • 13
    Project spam isn't that much better when you mention your name. Just don't spam, keep it in your back pocket when you happen to run into a question that might benefit from said library. Most important detail is that you also mention the disadvantages of the library and compare against other solutions, then it isn't spammy anymore. Jul 26, 2018 at 13:57
  • 5
    I choose to answer only question specific to "how do you parse a pdf in swift". Those questions are there because there are very very few resources for doing so. It's the reason i created the lib in the first place...
    – Ben G
    Jul 26, 2018 at 14:40
  • 1
    If a diamond mod deleted the answers you will not be able to undelete them.
    – Laurel
    Jul 27, 2018 at 1:04
  • 3
    Make sure that your answers answer the question though. The questions you answered (and that have been undeleted so far) are asking for very specific things, like the meaning of certain method or an issue about pointers. Neither of your answers address those issues.
    – g00glen00b
    Jul 27, 2018 at 7:52
  • 1
    Quite possibly a duplicate of this question: How can I undelete an answer after improving its quality? Aug 15, 2018 at 13:14

2 Answers 2

26

You should flag the post for moderator attention, explaining that you've fixed the problem that you feel resulted in its deletion. They'll either undelete it, or explain to you why your edit isn't sufficient to restore the post.

4
  • 22
    But I'd also make sure those really are answers to the questions, and the question themselves are on-topic
    – Adelin
    Jul 26, 2018 at 13:44
  • Out of curiosity, why would it be better to flag for mod attention than voting to undelete? Obviously the mods insta-deleted it, but assuming the answer is good the reopen queue should just be able to handle undeletion right?
    – Tas
    Jul 26, 2018 at 22:15
  • 1
    @Tas I believe mod-deleted posts require a mod to undelete.
    – Haem
    Jul 27, 2018 at 7:57
  • 1
    @Tas how would the reopen queue play a role here? And anyway it's straightforward to show the post to a mod before doing anything (even if it were possible to undelete), since it was a mod in the first place who decided the post was spammy. Jul 27, 2018 at 8:22
32

You didn't post the answer once, but at least three times:

https://stackoverflow.com/a/51537203

Here is a port of PDFKitten to swift, with some modifications to the way the string searching / content indexing is done, as well as support for truetype fonts.

[GitHub link]

... to a question asking about CGPDFScanner callbacks. So your answer basically states "Don't use the standard object and don't care about callbacks, use my library" - without any explanation whatsoever how that library solves the problem at hand.

https://stackoverflow.com/a/51537258

A little off-topic, but i did the exact same thing (porting PDFKitten to swift) and released the result as an open source project on github. I also did some modifications to the way the string searching / content indexing is done, as well as support for truetype fonts. You may want to look into that if you're planning on doing the same thing.

[GitHub link]

[Disclaimer : lib author]

... to a question about a specific piece of code, where the OP is asking how to iterate over a byte pointer pointing to a string. Not an answer to the question whatsoever.

https://stackoverflow.com/a/51537229

This is a pretty intensive task. There are libs like PDFKitten which are not maintained anymore. Here is a port of PDFKitten to swift that i did, with some modifications to the way the string searching / content indexing is done, as well as support for truetype fonts.

[GitHub link]

[disclaimer : lib author]

... to a question asking how to get the page contents from a CGPDFDocumentGetPage, which apparently again is about something with pointers.

In all cases, you're just spamming a link to a library you wrote. Sure, you're proud of what you built, and probably rightfully so. But that doesn't mean that you should write a boilerplate answer and post that to even tangentially related questions.

Make sure your answer answers the question. None of those three answers do so. You're just pointing them to your library, without showing any code that would solve the problem at hand. Merely adding "[Disclaimer : lib author]" doesn't make your answer better or eligible for undeletion (even though it already happened in two out of three cases).

So no, don't vote to undelete and don't flag for moderator attention until you've made sure that your answers answer the question.

6
  • Will it be better if "author of library" posts those exact contents as comment than answer? Or will it still considered spam somehow?
    – Amit Joshi
    Jul 27, 2018 at 8:29
  • 2
    No, that isn't any better. It's still unsollicited self-promotion, and doesn't help the OP any further.
    – CodeCaster
    Jul 27, 2018 at 8:51
  • Oh..Ok. But with the comments, author clearly bypass other issues (those are applicable for answer) like off-topic question, not answering the question, low quality/link only etc. And I guess, it will be hard to moderate comments. I hope SO has some way to handle this.
    – Amit Joshi
    Jul 27, 2018 at 8:56
  • @AmitJoshi It's handled the same way as with posts, flags. It happens infrequently enough that it'd just require a custom flag rather than a more specific flag.
    – Servy
    Jul 27, 2018 at 13:15
  • Ok, thanks for the feedback, i'll explain more in details why what looks like a simple function (search a pdf for text) is in fact a huge thing to accomplish. Then i'll point to the lib. Does that seem like a good idea to you ? Also, i don't think it's unrelated at all. The three posts were made be people trying to do exactly the same thing i did (parsing a pdf). They asked a detail question because they faced a first wall while trying to do so. I'm just saving them a lot of trouble. One of them even mentionned porting PDFKitten, which is exactly what i did.
    – Ben G
    Jul 27, 2018 at 19:25
  • 5
    @BenG I have no doubt your library is useful, but just posting a link to it, even with disclaimer, is not an answer. What you could do instead, for example, is actually answer OP's question with a snippet of your code and explanations (like: "here's how I solved this specific issue in my library") - and then, in this case, you could also add a link to your library and it wouldn't be a problem.
    – Eric Aya
    Jul 28, 2018 at 12:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .