掲示板 Forums - PDFs need work
Top > renshuu.org > Bugs / Problems Getting the posts
Top > renshuu.org > Bugs / Problems
I'm finding out there are issues with PDFs and it seems the feature at times is broken. I'm not sure how long this is going on, but it seems in some cases I have some post-production work to do when I shouldn't have to do so, and there are some weird, mixed results.
Tinker view ends up as a solution for one problem, but doesn't help the others. It helps on one case with say, the 1st grade/N5 kanji list of 80 kanji, which I can use for 1 kanji per page. But it doesn't do much for me for longer lists, which also sometimes breaks the function, to which I have to change the view in order to print a PDF based on the displayed page. In addition to that, I have to consolidate them all in one list if I want to have them in one document.
The multiple kanji sheet has quite some limitations. It only goes up to 10 pages, nothing more. Size of the sheet also matters, which gives weird results. B5 will show up to 5 kanji per page. Any other size is 7 - which is weird because the description says the sheet should display up to 6 kanji? The page limit hampers the number of kanji anyway, which on top of that, the last page only shows 1 kanji.
Overall, the PDF function doesn't do what I would expect it to do, and the post-production I have to do is extra work to get what I want if I want to have the whole list. It's one thing to piecemeal the material for some practice, but if I intend on having everything I have, I shouldn't have to be doing more just for such a simple feature.
While testing this feature (hadn't used it at all) I noticed generating PDFs from Advanced Search straight up doesn't work. The IDs aren't getting populated.
In schedules and lists it works fine:
In Advanced Search it doesn't:
Anyway, looks like the PDFs get generated server-side, so you can't do anything about the current limitations. Endpoint is likely paginated and would need to be redesigned in order to work with more than one page at a time. The layout of the PDF is probably much easier to fix/improve.
It is the weekend, so i do not have time to look into this yet, but if either of you can provide very specific steps for a few of the error cases, it'll make it much easier for me to look at them later on next week.
It is the weekend, so i do not have time to look into this yet, but if either of you can provide very specific steps for a few of the error cases, it'll make it much easier for me to look at them later on next week.
It's not a complicated thing. There's only 2 options. Single kanji sheet or multi-kanji sheet. Changing the view to have 50 or up to 100 kanji on the list will dictate how much material will be used. Changing the size sheet doesn't really scale anything. That mainly affects how much is printed. Any other parameter is not significant.
It just most of all doesn't entirely play nice with lists that are at least larger than 80 kanji, which is where most of the problems begin. It's broken for the single kanji sheet, and the multi-kanji sheet sells itself short anyway.
What ギョルギ九十三 has mentioned, I haven't looked into. This sounds like something that could cause some of these problems, if not compounding it.
1. The bug I found:
Building a worksheet (PDF) requires this HTML form to be populated correctly - id = thelist_form. More specifically, the value field of the input element with id = idlist needs to be populated with the IDs of the kanji currently on display.
This only works with one page, which is why PDFs are limited in the number of kanji they can have. This is by design.
The value field gets populated when you "load" a list. This works fine in schedules and community lists, but when you load kanji from Advanced Search, the field stays empty. Naturally, when you click the Download button, nothing happens.
This is very unlikely to be related to what OP is describing as it's a client-side problem that occurs before the Ajax request.
2. What OP is (likely) describing:
An example with multi-kanji on A4:
The maximum number of kanji that get printed is 50 in any view except Tinker mode (a full page). 7 kanji per page, 1 kanji on the last page (8 pages in total).
The maximum number of kanji that get printed in Tinker mode is 64 (not the full page). 7 kanji per page, 1 kanji on the last page (10 pages in total).
An example with multi-kanji on B5:
The maximum number of kanji that get printed is 46 in any view (missing the last 4). 5 kanji per page, 1 kanji on the last page (10 pages in total).
Single-kanji sheets seem to get generated fine (A4 and B5) at 50 pages. Basically a full page.
When I try to generate a single-kanji sheet in Tinker mode it gives me an error. The backend is likely not set up to handle more than 50. To me this makes sense. There's a limit to what you can handle before you start encountering problems.
Multi-kanji sheets can definitely handle more load though. Backend should be able to handle at least 4x the amount of kanji no issue.
PS: I'm simply describing issues, not demanding changes :)
“The maximum number of kanji that get printed in Tinker mode is 64. 7 kanji per page, 1 kanji on the last page.”
That doesn’t add up. I think you must have copy-pasted the wrong numbers.
“The maximum number of kanji that get printed in Tinker mode is 64. 7 kanji per page, 1 kanji on the last page.”
That doesn’t add up. I think you must have copy-pasted the wrong numbers.
I get 10 pages. That's 9 pages of 7 kanji and one page of 1 kanji. 9*7+1 = 64
Also, can you do me a favour and check if you can generate PDFs from Advanced Search so I know it's not just something on my end?
Edit: Here's some screenshots
And this lines up with the 64th kanji in Tinker mode:
Edit: Give me sec to check what I wrote. I got a bit tangled with all of those numbers XD
Yeah, the first one was meant to be 7*7+1 = 50, my bad.
Edit: Oh, wait... what I wrote checks out, but I never specified the page difference. It's 8 pages for normal view and 10 pages for Tinker. 7*7+1 and 9*7+1. I can see why what I wrote was confusing. I'll fix it.
Ok, thanks for explaining that. I don’t understand why tinker mode has two extra pages yet, but I can try to generate pdfs from my phone. What do I need to do?
Ok, thanks for explaining that. I don’t understand why tinker mode has two extra pages yet, but I can try to generate pdfs from my phone. What do I need to do?
You can go to Advanced Search and see if you can generate PDFs. If you have same problem, the "Download" button won't do anything.
Testing the other issues on a phone is probably going to be too annoying, so I wouldn't bother. You can if you want to of course. It's the same thing, just from a list or schedule.
The download button flashes briefly when I press it, but nothing else seems to happen.
Yeah, so it's just bugged for everyone. The IDs don't get generated, so the function that makes the Ajax request "fails". I'm 99% sure it's that, since if I add some IDs manually it works.
Edit: Thank you for checking :)
I also tried generating a worksheet from a list of 200 kanji with the fish radical. I got three. My guess is that of the first 64 characters, only three had stroke data.
Interesting. From your list right? - "By radical > 195 - fish radical 魚(うお)". I get 6 pages (7*5+1) = 36 kanji. This is for multi-kanji. For single-kanji I get 13.
The form looks to be sending 109 IDs, so the problem is server-side. As you said, probably some lack of data.
Edit: To clarify, this is all on A4.
To be clear, it is possible to produce 80 kanji on the single kanji page for all page sizes. It's just that the list itself is where it stops working. If the list is somewhere above 80, it stops producing anything if you're trying to use Tinker view. I don't know so much of what's going on in the back end as that's not my thing. I would guess it is part of the problem, but it also could be cascading failures at that as well. I know now for sure the number of issues is at least more than what's going on with the backend.
“The maximum number of kanji that get printed in Tinker mode is 64. 7 kanji per page, 1 kanji on the last page.”
That doesn’t add up. I think you must have copy-pasted the wrong numbers.
No, this is consistent. What's inconsistent is how it's produced. I know that a B5 size is 5 kanji per sheet. Everything else is 7. Changing views, Tinker gives you a max of 10 pages, everything else is 8. So, depending on either of these combinations, the most you can get is 64 because the last page craps out to 1 kanji. One would think that changing to the 50 kanji view would at least get you 50, but somehow instead the best you can get is 46.
To be clear, it is possible to produce 80 kanji on the single kanji page for all page sizes. It's just that the list itself is where it stops working. If the list is somewhere above 80, it stops producing anything if you're trying to use Tinker view. I don't know so much of what's going on in the back end as that's not my thing. I would guess it is part of the problem, but it also could be cascading failures at that as well. I know now for sure the number of issues is at least more than what's going on with the backend.
You're right. I tested it and for me it breaks at 93. No idea why exactly there.

I won't bore you with the technical side, but from looking at the code I can say that none of the actual PDF generation is done on the client. It just sends a few simple instructions along with the list of IDs. Nothing wrong with those, as far as I can tell. As for the server, I have no idea what goes on over there.
I've made a small fix to the Advanced Search that will allow that idlist field to get populated.
That being said, I kind request again a specific set of steps. "It is not complicated" is unfortunately not something I can work with. renshuu is an *extremely* complex platform, and when it comes to most problems (but especially the tricky ones), the cause of the problem could be something that you (the user) or I are not even considering, and only becomes evident when the exact data used to replicate the issue is clarified.
So what I would like is something like this:
1. Go to Advanced Search
2. Tap these buttons to add this specific set of materials to the group
3. Add filters (if necessary)
4. Confirm the viewing mode is XXX
5. Tap the PDF button, then choose these specific settings ("any settings will do it" is not helpful, unfortunately).
6. Press create
7. It gives me XXX, but I expect YYY.
Thanks in advance!
"It is not complicated" is unfortunately not something I can work with.
Community lists. I'm not using Advanced Search.
That is it.
All other PDF parameters are inconsequential to the matter.
This is why I've said this isn't complicated. There's only 2 different style sheets and anything tied to that is the view and sheet dimensions to control. There is literally nothing else to do with it. Involving Advanced Search is only another thing on top of that.