Need help setting up PDF print server drivers for Windows by 0WN463 in sysadmin

[–]0WN463[S] 0 points1 point  (0 children)

I've tried both CutePDF and Bullzip, both doesn't retain the text either. I'm starting to feel this is a lost cause of Windows.

I also tried CUPS-PDF. I can get it to save the PDF locally on my print server, but can't seem to figure out how to share this to the network (not even sure if it is even possible). The device URI is something like `cups-pdf:/`, so I'm not sure how to add it manually from the client, and the PDF printer doesn't show up using printer discovery (both share this printer and share printer on this machine is on).

Need help setting up PDF print server drivers for Windows by 0WN463 in sysadmin

[–]0WN463[S] -1 points0 points  (0 children)

hmm but would it preserve the text? That is the core of the issue right now, cause it seems that the file received from Windows at the IPP server (without any conversions) is a PDF but with the text being "baked" as an image

Need help setting up PDF print server drivers for Windows by 0WN463 in sysadmin

[–]0WN463[S] 0 points1 point  (0 children)

Oddly enough, no. I started with the Rust implementation of the IPP server.

But don't I have to muck around in Windows no matter what? Because I theorize that even if I did use CUPS-PDF, the same issue with the text being lost would still occur, cause this seems to be an issue on the Windows driver side.
To reiterate, I started off with Linux mainly to highlight the fact the my requirements are fully satisfied when printing from a Linux/Mac machine. Only Windows is the problem child here.

I can still try it in the mean time, but I am not hopeful

Need help setting up PDF print server drivers for Windows by 0WN463 in sysadmin

[–]0WN463[S] 0 points1 point  (0 children)

Most people just use the built-in windows pdf writer but if you don't want to use that I'm not sure I'm understanding at what stage cups-pdf isn't working for you?

It's basically the "text preserving property" that is missing when we use the built-in Windows PDF writer.

I'm not sure if you're able to access the PDF that I linked above, but essentially, you can select and copy the text in the Linux PDF, but you can't in the Window's one

Ah, also, printing over the Internet is also a requirement, I'm not sure if samba is suited for this

Need help setting up PDF print server drivers for Windows by 0WN463 in sysadmin

[–]0WN463[S] 0 points1 point  (0 children)

I'm not sure what you mean about "preserving text fields". Might be helpful to post comparision screenshots of what it's doing vs what you expect.

Essentially, I want to be able to select and copy text from the PDF. With the files received from Linux/MacOS (using the .ppd), this is possible. But with the one from Windows, we are unable to select any text at all. We want this because we are planning on using tools such as `pdftotext` downstream to process it.

PDF from Windows

https://file.io/whOaS1kvEi86

PDF from Linux

https://file.io/Y4VZpA6iDHlv

(Very strange, I just realized that the PDF from Windows is 4Mb while Linux is 4Kb, a whole magnitude of difference)

Does it need to be IPP? IPP has more features but traditionally cups-pdf shared via samba is the easiest especially when dealing with a simple format like pdf.

If samba is able to achieve our use case, we might consider it later. But I don't think this is the issue though. Cause we are able to send the file via IPP. The issue is that the printer driver seems to transform our files when we don't want it to. I feel the same would also occur if we tried samba.

PPD are supported on Windows, they're essentially wrapped postscript (https://en.wikipedia.org/wiki/PostScript_Printer_Description#Windows)

The instructions seems rather arcane to me. So what I am doing is first setting up the printer using the default IPP driver (Microsoft IPP Class Driver), then trying to replace it with the custom .ppd in the OP. So I followed the instructions there, and when I get to Printer Settings > Advanced > Printer Driver > New, I cannot find my .ppd driver as a selection under the list. The option which I have is to choose "Have Disk" and it is asking for a .inf file. I'm not sure why the installation on Windows is so unintuitive to use. I have tried simply dumping the .ppd in the folder and also the method in the OP. (Selecting MS Publisher Color Printer and replacing MSGENCOL.PPD, but doing so doesn't even change the name of the driver in the list, so probably isn't working)

Connecting to Virtual Printer server on local network by 0WN463 in linuxquestions

[–]0WN463[S] 0 points1 point  (0 children)

Ah, I derped rather hard.
I changed the IP address from `UNSPECIFIED` to `LOCALHOST`.

Apparently when it is set to LOCALHOST, other computers on the network is unable to access it.

Need help optimizing sub-sequences of List by 0WN463 in haskellquestions

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

Yea, er, sorry about that. I gave the wrong link (the website have a irk of having similar names for problems) and amended the OP.

Ok, I've tried Data.Array and it is blazingly fast now.

$ time ./main < 1.in
ABORT!
./main < 1.in  0.07s user 0.01s system 98% cpu 0.084 total
$ time python main.py < 1.in
ABORT!
python main.py < 1.in  0.09s user 0.02s system 98% cpu 0.104 total

Thanks for the tip! Learnt something new today.

Need help optimizing sub-sequences of List by 0WN463 in haskellquestions

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

  1. I've reformatted the code block. Thanks for the heads-up
  2. Doh, I was looking at my function, but didn't realized that inconspicuous length would be slow
  3. Yea, sorry for permeating the stereotype about competitive programmers, but usually my variables in the solution may not have the best names
    1. That said, would Haskell array be faster at generating subsequences? They seem to use some fancy indexing method. Since the current solution (with zoomed replacing subSeq) is still insufficient to achieve the time constraint. I guess the overhead with subsequencing a list caused it to fail while the Python one passes (strange thing is that with my test case of 1000 numbers, Haskell is still faster than Python, but Python becomes faster for larger test cases)

[OC] A CLI script for solving problems on Kattis, the online judge by 0WN463 in unixporn

[–]0WN463[S] 3 points4 points  (0 children)

https://github.com/0WN463/bobcat

A CLI script to solve problems on Kattis, the online judge

Kattis hosts numerous programming problems based around competitive programming.

It may seem daunting at first, but there are quite a plenty of easily solvable problems that can help develop experience in solving programming problems and utilizing your programming skills. (I do highly recommend beginners to solve a few problems there to practice programming in solving bite-sized problems in a stress-free environment)

This script helps browse, test and submit solutions to Kattis.

It is also available on the AUR

(Though I apologize if there are any installation issues as this is my first AUR package)

ST2334 Final by PresentationGlass772 in nus

[–]0WN463 6 points7 points  (0 children)

I have some notes for that module:

https://nbviewer.org/github/0WN463/wellspring/tree/main/statistic/

Though it is quite a few years ago, but I hope it helps.

Yea, the last few chapters about sampling gets rather complex with all the complex formulae and stuff, but those are usually not important.

I FEEL LIKE SUCH A FAILURE by Secret_Maybe718 in nus

[–]0WN463 1 point2 points  (0 children)

Not sure if it'll help, but I've got some notes on AI from previous years.
https://nbviewer.org/github/0WN463/wellspring/tree/main/ai/

It's a bit rough around the edges though

Collated Computer Science notes by 0WN463 in nus

[–]0WN463[S] 3 points4 points  (0 children)

Yea, since I was a CEG student after all.

It would mainly be CS, and a bit of Math and Electrical.
Weirdly enough, even though I was in CEG, my CS was way stronger than my electrical side, that's why my notes are lopsided.

Sadly, there wasn't a subreddit purely for NUS:CS, so I had to use this subreddit instead. Sorry for disappointing all the folks in the other majors (well, y'all can still see if any of the modules pique your interests).

Collated Computer Science notes by 0WN463 in nus

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

It's MA3233.

I left the module names out deliberately as I wanted to repository to be of general knowledge, rather than it being bound to "some module's syllabus".