Closed icryrainix closed 5 years ago
Without seeing the XML code used for creating the table it is a bit difficult to analyze whether there is a chance to avoid or fix the problem.
Could you provide a sample XML I can use for testing? You could send it via private mail.
I send the code and pdf file to this email box: github@telle-online.de
I received your mail, and I will take a look at this issue within the next few days.
Commit 5c01a32a0188a8b1188d1daab131569b23394abb hopefully fixes your issue. Rows of an XML table that are affected by common row spans are now kept together on the same page.
Please give it a try.
Yes, it's OK now, thanks a lot.
Hi,
While we are using wxpdfdoc in our project, we found an issue, could you please help us on this?
I have attached the xml and pdf.
Thank and regards.
From: Nix Nimailto:nixingbiao@outlook.com Sent: 2019年7月25日 9:32 To: utelle/wxpdfdocmailto:reply@reply.github.com; utelle/wxpdfdocmailto:wxpdfdoc@noreply.github.com Cc: Nix Nimailto:nixingbiao@outlook.com; Authormailto:author@noreply.github.com Subject: RE: [utelle/wxpdfdoc] write xml with row span (#59)
Thank you very much for your quick response.
I send source code with xml script and the pdf file generated, please kindly find the attached.
Best, Nix
From: Ulrich Telle [mailto:notifications@github.com] Sent: 2019年7月24日 22:34 To: utelle/wxpdfdoc wxpdfdoc@noreply.github.com Cc: icryrainix nixingbiao@outlook.com; Author author@noreply.github.com Subject: Re: [utelle/wxpdfdoc] write xml with row span (#59)
Without seeing the XML code used for creating the table it is a bit difficult to analyze whether there is a chance to avoid or fix the problem.
Could you provide a sample XML I can use for testing? You could send it via private mail.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/utelle/wxpdfdoc/issues/59?email_source=notifications&email_token=ABLTQ6HCTU4B4AYCFFFWY2TQBBR5ZA5CNFSM4IGPWSO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2WQ6TQ#issuecomment-514658126, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABLTQ6F52FL7MLUTUFDMN7TQBBR5ZANCNFSM4IGPWSOQ.
体检编号 | 姓名 | 性别 | 年龄 | 接害工龄 | 工种 | 接触职业危害因素名称 | 异常指标 | 结论 | 处理意见 | 医学建议 |
10000051 | 胡安林 | 男 | 48 | 1.5年 | 胶棉 | 苯 | 1) 肝: 肝大 ; 2) 舒张压: 50 mmHg ↓; 3) 淋巴: 颈后淋巴结肿大 ; 4) 咽喉: 左侧上颚肿胀 ; 5) 心电图: 成对室性早搏 ; 6) 碱性磷酸酶(ALP): 30 IU/L ↓; 7) 总胆红素(T-BIL): 303 umol/L ↑; 8) 直接胆红素(DB): 30 umol/L ↑; 9) 间接胆红素(IB): 303 μmol/L ↑; 10) 总蛋白(TP): 30 g/L ↓; 11) 白蛋白(Alb): 30 g/L ↓; 12) 白/球比(A/G): 30 ↑; 13) 尿素氮(BUN): 20 mmol/L ↑; 14) 肌酐(Cr): 20 umol/L ↓; 15) 白细胞(WBC): 20 10^9/L ↑; 16) 红细胞(RBC): 20 10^12/L ↑; 17) 血红蛋白(HGB): 20 g/L ↓; 18) 红细胞压积(HCT): 20 % ↓; 19) 红细胞平均体积(MCV): 20 fl ↓; 20) 红细胞平均血红蛋白含量(MCH): 20 pg ↓; 21) 红细胞平均血红蛋白浓度(MCHC): 20 g/L ↓; 22) 红细胞分布宽度(CV): 20 % ↑; 23) 中性粒细胞比值(GR%): 20 % ↓; 24) 淋巴细胞绝对值(LY#): 20 10^9/L ↑; 25) 中性粒细胞绝对值(GR#): 20 10^9/L ↑; 26) 血小板计数(PLT): 20 10^9/L ↓; 27) 血小板平均体积(MPV): 20 fL ↑; 28) 血小板分布宽度(PDW): 20 fL ↑; 29) 嗜酸粒细胞绝对值(EO#): 02 ↑; 30) 嗜碱粒细胞绝对值(BA#): 02 ↑; 31) 嗜酸粒细胞比值(EO%): 20 % ↑; 32) 嗜碱粒细胞比值(BA%): 202 % ↑; 33) 红细胞体积分布宽度(RDW): 20 fL ↓; 34) 血小板压积(PCT): 2 ↑; 35) 单核细胞比值(MO%): 2 ↓; 36) 单核细胞绝对值(MO#): 2 ↑; 37) 尿比重(SG): 20 ; 38) 尿酸碱度: 20 ↑; 39) 脾彩超: 肋下未探及 ; | 其他疾病或异常 | 【肝大】引起肝大的原因很多,建议您去消化内科进一步检查。 【颈后淋巴结肿大】口腔、鼻咽、咽喉部病变可引起该淋巴结肿大,应注意查找病因。 【室性早搏】请到心内科进一步诊治。 【胆红素升高】请您复查,如仍高,请到消化内科进一步检查。 【血浆总蛋白异常】血浆总蛋白包括血浆中全部的蛋白质,可出现病理性和生理性波动,建议您复查或去内科咨询。 【血浆白蛋白偏低】血浆白蛋白可由多种疾病引起,如您明显减少,少于30g/L,建议您去内科进一步检查。 【总胆红素偏高】建议复查肝功能,消化内科进一步检查。 【A/G比例偏高】可能是由白、球蛋白两者变化,只是其中一者的变化幅度较大引起的,常见于慢性炎症,多发性骨髓瘤,红斑狼疮等 【血小板偏低】请复查血常规。 【红细胞增多】建议复查血常规 【中性粒细胞增多】复查血常规 【嗜酸性粒细胞增多】过敏性疾病、寄生虫病、皮肤病等可造成嗜酸性粒细胞增多。建议您复查,或去内科进一步检查。 【嗜碱性粒细胞增多】建议您复查,或去内科进一步检查。 【淋巴细胞增多】请复查血常规 |
I tried with different font size, it font size is a little bigger and the content will display in two pages, the format will be wrong.
Please kindly find the document attached.
Best regards, Nix
From: Nix Nimailto:nixingbiao@outlook.com Sent: 2020年3月20日 11:07 To: utelle/wxpdfdocmailto:reply@reply.github.com; utelle/wxpdfdocmailto:wxpdfdoc@noreply.github.com Cc: Authormailto:author@noreply.github.com Subject: RE: [utelle/wxpdfdoc] write xml with row span (#59)
Hi,
While we are using wxpdfdoc in our project, we found an issue, could you please help us on this?
I have attached the xml and pdf.
Thank and regards.
From: Nix Nimailto:nixingbiao@outlook.com Sent: 2019年7月25日 9:32 To: utelle/wxpdfdocmailto:reply@reply.github.com; utelle/wxpdfdocmailto:wxpdfdoc@noreply.github.com Cc: Nix Nimailto:nixingbiao@outlook.com; Authormailto:author@noreply.github.com Subject: RE: [utelle/wxpdfdoc] write xml with row span (#59)
Thank you very much for your quick response.
I send source code with xml script and the pdf file generated, please kindly find the attached.
Best, Nix
From: Ulrich Telle [mailto:notifications@github.com] Sent: 2019年7月24日 22:34 To: utelle/wxpdfdoc wxpdfdoc@noreply.github.com Cc: icryrainix nixingbiao@outlook.com; Author author@noreply.github.com Subject: Re: [utelle/wxpdfdoc] write xml with row span (#59)
Without seeing the XML code used for creating the table it is a bit difficult to analyze whether there is a chance to avoid or fix the problem.
Could you provide a sample XML I can use for testing? You could send it via private mail.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/utelle/wxpdfdoc/issues/59?email_source=notifications&email_token=ABLTQ6HCTU4B4AYCFFFWY2TQBBR5ZA5CNFSM4IGPWSO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2WQ6TQ#issuecomment-514658126, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABLTQ6F52FL7MLUTUFDMN7TQBBR5ZANCNFSM4IGPWSOQ.
体检编号 | 姓名 | 性别 | 年龄 | 接害工龄 | 工种 | 接触职业危害因素名称 | 异常指标 | 结论 | 处理意见 | 医学建议 |
10000051 | 胡安林 | 男 | 48 | 1.5年 | 胶棉 | 苯 | 1) 肝: 肝大 ;\n 2) 舒张压: 50 mmHg ↓;\n 3) 淋巴: 颈后淋巴结肿大 ;\n 4) 咽喉: 左侧上颚肿胀 ;\n 5) 心电图: 成对室性早搏 ;\n 6) 碱性磷酸酶(ALP): 30 IU/L ↓;\n 7) 总胆红素(T-BIL): 303 umol/L ↑;\n 8) 直接胆红素(DB): 30 umol/L ↑;\n 9) 间接胆红素(IB): 303 μmol/L ↑;\n 10) 总蛋白(TP): 30 g/L ↓;\n 11) 白蛋白(Alb): 30 g/L ↓;\n 12) 白/球比(A/G): 30 ↑;\n 13) 尿素氮(BUN): 20 mmol/L ↑;\n 14) 肌酐(Cr): 20 umol/L ↓;\n 15) 白细胞(WBC): 20 10^9/L ↑;\n 16) 红细胞(RBC): 20 10^12/L ↑;\n 17) 血红蛋白(HGB): 20 g/L ↓;\n 18) 红细胞压积(HCT): 20 % ↓;\n 19) 红细胞平均体积(MCV): 20 fl ↓;\n 20) 红细胞平均血红蛋白含量(MCH): 20 pg ↓;\n 21) 红细胞平均血红蛋白浓度(MCHC): 20 g/L ↓;\n 22) 红细胞分布宽度(CV): 20 % ↑;\n 23) 中性粒细胞比值(GR%): 20 % ↓;\n 24) 淋巴细胞绝对值(LY#): 20 10^9/L ↑;\n 25) 中性粒细胞绝对值(GR#): 20 10^9/L ↑;\n 26) 血小板计数(PLT): 20 10^9/L ↓;\n 27) 血小板平均体积(MPV): 20 fL ↑;\n 28) 血小板分布宽度(PDW): 20 fL ↑;\n 29) 嗜酸粒细胞绝对值(EO#): 02 ↑;\n 30) 嗜碱粒细胞绝对值(BA#): 02 ↑;\n 31) 嗜酸粒细胞比值(EO%): 20 % ↑;\n 32) 嗜碱粒细胞比值(BA%): 202 % ↑;\n 33) 红细胞体积分布宽度(RDW): 20 fL ↓;\n 34) 血小板压积(PCT): 2 ↑;\n 35) 单核细胞比值(MO%): 2 ↓;\n 36) 单核细胞绝对值(MO#): 2 ↑;\n 37) 尿比重(SG): 20 ;\n 38) 尿酸碱度: 20 ↑;\n 39) 脾彩超: 肋下未探及 ;\n | 其他疾病或异常 | 【肝大】引起肝大的原因很多,建议您去消化内科进一步检查。\n【颈后淋巴结肿大】口腔、鼻咽、咽喉部病变可引起该淋巴结肿大,应注意查找病因。\n【室性早搏】请到心内科进一步诊治。\n【胆红素升高】请您复查,如仍高,请到消化内科进一步检查。\n【血浆总蛋白异常】血浆总蛋白包括血浆中全部的蛋白质,可出现病理性和生理性波动,建议您复查或去内科咨询。\n【血浆白蛋白偏低】血浆白蛋白可由多种疾病引起,如您明显减少,少于30g/L,建议您去内科进一步检查。\n【总胆红素偏高】建议复查肝功能,消化内科进一步检查。\n【A/G比例偏高】可能是由白、球蛋白两者变化,只是其中一者的变化幅度较大引起的,常见于慢性炎症,多发性骨髓瘤,红斑狼疮等。\n【血小板偏低】请复查血常规。\n【红细胞增多】建议复查血常规。\n【中性粒细胞增多】复查血常规\n【嗜酸性粒细胞增多】过敏性疾病、寄生虫病、皮肤病等可造成嗜酸性粒细胞增多。建议您复查,或去内科进一步检查。\n【嗜碱性粒细胞增多】建议您复查,或去内科进一步检查。\n 【淋巴细胞增多】请复查血常规。 |
体检编号 | 姓名 | 性别 | 年龄 | 接害工龄 | 工种 | 接触职业危害因素名称 | 异常指标 | 结论 | 处理意见 | 医学建议 |
10000051 | 胡安林 | 男 | 48 | 1.5年 | 胶棉 | 苯 | 1) 肝: 肝大 ;\n 2) 舒张压: 50 mmHg ↓;\n 3) 淋巴: 颈后淋巴结肿大 ;\n 4) 咽喉: 左侧上颚肿胀 ;\n 5) 心电图: 成对室性早搏 ;\n 6) 碱性磷酸酶(ALP): 30 IU/L ↓;\n 7) 总胆红素(T-BIL): 303 umol/L ↑;\n 8) 直接胆红素(DB): 30 umol/L ↑;\n 9) 间接胆红素(IB): 303 μmol/L ↑;\n 10) 总蛋白(TP): 30 g/L ↓;\n 11) 白蛋白(Alb): 30 g/L ↓;\n 12) 白/球比(A/G): 30 ↑;\n 13) 尿素氮(BUN): 20 mmol/L ↑;\n 14) 肌酐(Cr): 20 umol/L ↓;\n 15) 白细胞(WBC): 20 10^9/L ↑;\n 16) 红细胞(RBC): 20 10^12/L ↑;\n 17) 血红蛋白(HGB): 20 g/L ↓;\n 18) 红细胞压积(HCT): 20 % ↓;\n 19) 红细胞平均体积(MCV): 20 fl ↓;\n 20) 红细胞平均血红蛋白含量(MCH): 20 pg ↓;\n 21) 红细胞平均血红蛋白浓度(MCHC): 20 g/L ↓;\n 22) 红细胞分布宽度(CV): 20 % ↑;\n 23) 中性粒细胞比值(GR%): 20 % ↓;\n 24) 淋巴细胞绝对值(LY#): 20 10^9/L ↑;\n 25) 中性粒细胞绝对值(GR#): 20 10^9/L ↑;\n 26) 血小板计数(PLT): 20 10^9/L ↓;\n 27) 血小板平均体积(MPV): 20 fL ↑;\n 28) 血小板分布宽度(PDW): 20 fL ↑;\n 29) 嗜酸粒细胞绝对值(EO#): 02 ↑;\n 30) 嗜碱粒细胞绝对值(BA#): 02 ↑;\n 31) 嗜酸粒细胞比值(EO%): 20 % ↑;\n 32) 嗜碱粒细胞比值(BA%): 202 % ↑;\n 33) 红细胞体积分布宽度(RDW): 20 fL ↓;\n 34) 血小板压积(PCT): 2 ↑;\n 35) 单核细胞比值(MO%): 2 ↓;\n 36) 单核细胞绝对值(MO#): 2 ↑;\n 37) 尿比重(SG): 20 ;\n 38) 尿酸碱度: 20 ↑;\n 39) 脾彩超: 肋下未探及 ;\n | 其他疾病或异常 | 【肝大】引起肝大的原因很多,建议您去消化内科进一步检查。\n【颈后淋巴结肿大】口腔、鼻咽、咽喉部病变可引起该淋巴结肿大,应注意查找病因。\n【室性早搏】请到心内科进一步诊治。\n【胆红素升高】请您复查,如仍高,请到消化内科进一步检查。\n【血浆总蛋白异常】血浆总蛋白包括血浆中全部的蛋白质,可出现病理性和生理性波动,建议您复查或去内科咨询。\n【血浆白蛋白偏低】血浆白蛋白可由多种疾病引起,如您明显减少,少于30g/L,建议您去内科进一步检查。\n【总胆红素偏高】建议复查肝功能,消化内科进一步检查。\n【A/G比例偏高】可能是由白、球蛋白两者变化,只是其中一者的变化幅度较大引起的,常见于慢性炎症,多发性骨髓瘤,红斑狼疮等。\n【血小板偏低】请复查血常规。\n【红细胞增多】建议复查血常规。\n【中性粒细胞增多】复查血常规\n【嗜酸性粒细胞增多】过敏性疾病、寄生虫病、皮肤病等可造成嗜酸性粒细胞增多。建议您复查,或去内科进一步检查。\n【嗜碱性粒细胞增多】建议您复查,或去内科进一步检查。\n 【淋巴细胞增多】请复查血常规。 |
I tried with different font size, if font size is a little bigger and the content will display in two pages, the format will be wrong.
If the font size is increased, then the column containing the long enumeration increases in height due to additional automatic line breaks. And this can cause layout problems.
One rule of the XML feature is that the content of a table cell has to fit on the remaining part of a page. Additionally, wxPdfDocument has an automatic page break mechanism, if output occurs below a certain page bottom margin.
The default page break margin is 20 mm from the page bottom. This page break margin can be changed. It is also possible to turn off the automatic page break feature.
For your use case, I would recommend to call
pdf.SetAutoPageBreak(false);
right at the beginning. For XML output this is usually the best approach.
However, if the content of a table cell is higher than the page height, you will still experience a page break, but only once. After the page break, the cell content not fitting on the page will not be shown at all.
This library is absolutely fantastic. I am trying to use it to generate pdf document, with write xml function, I can easily create table, but if the table with row span on multiple pages(page break), it looks a little ugly, see the picture. How can I fix it? possible to let this row start from new page? Thank you very much.