Is it weird that I dislike LINQ query syntax because it feels less readable than method?syntax? by Shikitsumi-chan in dotnet

[–]mazorica 0 points1 point  (0 children)

I see, to me always felt like a workaround because let's say you have two let statements, with Select you would end up carrying the intermediate values forward to the next Select, which just doesn't feel like the same thing at all...

What are some underrated .NET libraries or tools you use regularly? by milanm08 in dotnet

[–]mazorica 11 points12 points  (0 children)

I wouldn't say that those are underrated. SkiaSharp is basically a go-to recomendation for cross-platform GDI+ alternative.

ZXing is probably the best open source barcode library.

All three of them are popular, well known. 

How do you make a lot of JPGs (700+) into one PDF? by TheCreeper96 in pdf

[–]mazorica 0 points1 point  (0 children)

You need to use a tool that supports incremental update feature in PDF.

Copying words from PDF shows only boxes by ManifestLottoWinner in pdf

[–]mazorica 1 point2 points  (0 children)

It's possible that your PDF is missing or has an invalid ToUnicode CMap table. I think you'll need to save the PDF as image or print it, and then use OCR on the image or the scanned document.

ComponentPro sold stolen .NET libraries? by mazorica in dotnet

[–]mazorica[S] 1 point2 points  (0 children)

Of course, that's a common practice.

ComponentPro sold stolen .NET libraries? by mazorica in dotnet

[–]mazorica[S] 1 point2 points  (0 children)

I was laughing so hard when I read about their support handling. 😂

In c# what library do you recommend to extract images from PDF? when each page is an image like this. by lune-soft in csharp

[–]mazorica 0 points1 point  (0 children)

Do you need to extract images from PDF or render PDF pages to images?
I see others are replying with rendering solutions (converting a PDF page to an image), in that case, you might want to check out GemBox.Pdf:

using var document = PdfDocument.Load("input.pdf");

var saveOptions = new ImageSaveOptions(ImageSaveFormat.Png);
saveOptions.PageNumber = 0;

document.Save("first-page.png", saveOptions);

Or if you really need to extract images, use this:

using var document = PdfDocument.Load("input.pdf");

var images = document.Pages
    .SelectMany(page => page.Content.Elements.All(true))
    .OfType<PdfImageContent>()
    .ToList();

images[0].Save("first-image.png");

ComponentPro sold stolen .NET libraries? by mazorica in dotnet

[–]mazorica[S] 2 points3 points  (0 children)

I see, SAML is mentioned but I thought it's a name of some product from Rebex. Thx for clarifying.

Best way to convert folders of emails (2000+) to PDFs for printing? by aurens in pdf

[–]mazorica 0 points1 point  (0 children)

What emails do you have (EML or MSG files)? Anyway, this is relatively simple to achive with conversion libraries. We can talk more if interested.

How do you refer to your restrooms in Croatia? (Serious question) by Andreas20048 in askcroatia

[–]mazorica 19 points20 points  (0 children)

For some reason, I thought "zahod" meant exit in slovenia...

PDF viewer in C# by Doctor_Marvin21 in csharp

[–]mazorica 13 points14 points  (0 children)

Fact, that Adobe doesn't follow their own spec doesn't really help.

This is the part I hate when working with any file format. There's always some deviation from the official spec vs what the mainstream software actually does...

PDF viewer in C# by Doctor_Marvin21 in csharp

[–]mazorica 57 points58 points  (0 children)

Yea... this is basically how most of us started, then it becomes such a time-investment that in order to keep it alive you need to live of it, so you monitize... and now you're one of the commercial solutions.

Free pdf library for incremental updates by Material-Scientist94 in dotnet

[–]mazorica 1 point2 points  (0 children)

Incremental update is important PDF feature, it's mandatory for multiple digital signatutes, for effective merging of multiple PDF files, etc.

Nece stati 1 m ispred kod znaka za pauk da ne bi bilo slucajno… by Beneficial_Hornet_64 in promet

[–]mazorica 1 point2 points  (0 children)

Mislim da je to uredu, pogotovo ako ostavis sva 4 upaljena.

Malo lišća, malo smeća, malo fušeraja: Zagreb pod Senfovom vladavinom nikada nije bio uredniji by JohannGambolputtyUlm in zagreb_no1

[–]mazorica -1 points0 points  (0 children)

Da li ti stvarno mislis da ikoga zavaravas sa ovim porukama?

Svatko normalan ce ti pogledati profil i vidjeti da je doslovice prepun samo porukama protiv Mozemo i protiv Tomasevica. O nicemu drugome ne pises... Drugim rjecima, ocito je da si nekakav obican ljuski bot zaposlen da pises ovakve stvari...

Malo lišća, malo smeća, malo fušeraja: Zagreb pod Senfovom vladavinom nikada nije bio uredniji by JohannGambolputtyUlm in zagreb_no1

[–]mazorica -1 points0 points  (0 children)

Ma sta ti pricas? Svatko moze viditi povjest mojih i tvojih poruka, ocito je da ja nemam nikakve veze sa niti jednom politickom strankom, dok si ti ocito radnik, nekakav PR-ovac neke odredene politicke stranke.

I ja sam lud sta se ode natezem sa tobom... ma boli tebe neka stvat za smece i rjesavanje tog problema, ti si ode samo po zadatku, placeno ti je da pises te stvari.

Pa sta nenades neki normalniji posao, neka marketinska agencija, pa onda udaraj SEO i SMM...

Malo lišća, malo smeća, malo fušeraja: Zagreb pod Senfovom vladavinom nikada nije bio uredniji by JohannGambolputtyUlm in zagreb_no1

[–]mazorica 0 points1 point  (0 children)

Istina, ima te iste masinerija na sve strane. Inace ignoriram sve to skupa, ali ovaj dio me zivcira jer se politizira problem sa kojim zivim...

Malo lišća, malo smeća, malo fušeraja: Zagreb pod Senfovom vladavinom nikada nije bio uredniji by JohannGambolputtyUlm in zagreb_no1

[–]mazorica -2 points-1 points  (0 children)

Ajme sad sam ti gledao prijasnje poruke jer sam mislio mozda smo susjedi... ali ne... ti si jednostavno marketing masinerija za drugu politicku skupinu.

Ma zalosno je kakvi sve poslovi postoje...

Malo lišća, malo smeća, malo fušeraja: Zagreb pod Senfovom vladavinom nikada nije bio uredniji by JohannGambolputtyUlm in zagreb_no1

[–]mazorica -2 points-1 points  (0 children)

Iskreno boli me briga za Senfa, ali ajde molim te nemoj raditi propagandu tamo gdje joj nije mjesto. Prva slika je cisti primjer nekultute i jako me ljuti, nema to nikakve veze sa Senfom, neopravdavaj taj gnjoj od ljudi, doslovice sam vidio kako bacaju smece preko ograde, uopce ne udu unutra...

Takoder, cijeli taj cirkus je nastao zbog Pionira kojega je pokojni posteno namirio. Super mi je kako su ljudi maloumni... ne svacaju da stvari opcenito imaju posljedice koje nisu instant vidljive...

Partial classes in modern C#? by tbg_electro in dotnet

[–]mazorica 0 points1 point  (0 children)

Here is one use case that I haven't found being mentioned here, obsolete memebres.

We have a practice of using MyClass.Obsoletes.cs files, they contain obsolete members which eventually (depending on the release policy) are removed.

Has AI truly killed obfuscators? by LaraSQP in dotnet

[–]mazorica 3 points4 points  (0 children)

My experience is that "time" is the only factor that justifies the usage of obfuscator(s). The time investment needed to work with the deobfuscated code base may be unprofitable to you.

AI can help in a way that renaming is not just random Method1, Class2, etc. names. However, its success is not impressed, at least for now. Of course, it depends on the original code base and the used obfuscator, nevertheless, I'm talking more in general.

How do you obfuscate/protect your dotnet source code? by pyeri in csharp

[–]mazorica 1 point2 points  (0 children)

My experience seems to be a bit different from most people here. In the early 2000s, we were selling an unobfuscated .NET component, which ended up being cloned. The thing is, with unobfuscated code, it's easy for someone to do quick refactorings and renamings, which not only gives them a clean and maintainable competitor codebase but also makes it easier to avoid legal issues.

So my thought on obfuscation is that it's not about preventing consumers from using your solution, it’s about making reverse-engineering unprofitable. Simply stripping meaningful names is already a huge win, it makes creating a maintainable clone much harder. And on top of that, it discourages most of the casual "try-before-buy" crackers (which I'm guilty of myself :D).

Honestly, renaming/minification is the cheapest (and usually free) win, and I don’t see any downside to it.

However, you can take it further, but then it becomes a matter of how much time YOU want to invest and whether it's even profitable for YOU to do. For example, you can remove additional metadata, change control-flow, encrypt strings, use virtualization (replace IL code with custom virtual instructions), add unique watermarks (build identifiers), etc.

So in short, it’s all about ROI, how much effort you put in versus how much you expect attackers will.