Jump to content
  • Margins cause warning when printing docx in Word


    marip
    Assigned User shertage
    CategoryBug report
    PriorityHigh
    ReproducibilityAlways
    ResolutionFixed
    SeverityMajor
    StatusClosed
    Jasper template margins do not have an effect in .docx document margins. This causes some unwanted and unnecessary warnings with most printers.


    User Feedback

    Recommended Comments

    Hi,

     

    How do you see this working? Should we use the page margins declared in the report template and set them as print margins in the resulting DOCX document?

    Note that in JR, we allow content to go beyond page margin at the right and bottom, so in such cases, you would still have the problem.

     

    Thank you,

    Teodor

     

    Link to comment
    Share on other sites

    Hello,

    > Should we use the page margins declared in the report template and set them as print margins in the resulting DOCX document?

    Yes, I think that it would be a good solution.

     

    >Note that in JR, we allow content to go beyond page margin at the right and bottom, so in such cases, you would still have the problem.

    Yes, but that is a normal thing. If the content go beyond the page margin, I should get the warning.

     

    Thanks,

    Karol

    Link to comment
    Share on other sites

    Hi Teodor

     

    I was looking into the issue and the margin fix is relatively easy (see attached 2 files). However, the blocks for margin rendering are still showing up in the report and resulting document is deformed. The engine needs the smarts to strip the unnecessary elements. Looking forward for the issue to be addressed.

     

    Irena

    Link to comment
    Share on other sites

    Changed Priority from Normal to Immediate

    Changed Status from Assigned to New


    Hi all,While Printing the Docs warning message appears. " The margins of section # are set outside the printable area of the page. Do you want to continue ?" and footer is shifted on the next page if applying "Narrow" margins.But my Expectation is word docs file can be printed without warning message with adjusted margins, page footer doesn't appear on the next page.Thanks,Jawed
    Link to comment
    Share on other sites

    Changed Reproducibility from N/A to Always


    I have a need for this fix, but in an older version of Jasper Reports. Can someone post the fix here, or provide a patch file for the affected class(es), so I can apply it to my environment ?
    Link to comment
    Share on other sites

    Changed Priority from Immediate to High

    Changed Resolution from Fixed to Open

    Changed Status from Feedback Requested to Acknowledged


    In our case, we first exposed this underlying JasperReports problem when we switched our page sizes from A4 to Letter.After switching back to A4, the dialog went away, and so did the problem.So, in the JRXML file, we had the following config when using Letter and we were seeing the dialog popup problem:pageWidth="792", pageHeight="612", columnWidth="732"Changing those settings to the following A4 page size values once again, resolved the issue for us:pageWidth="842", pageHeight="595", columnWidth="782"Of course, it also required us to shift around all the elements on the page to align them properly.
    Link to comment
    Share on other sites

    Changed Status from Resolved to Feedback Requested


    Hi,I'm using Jaspersoft Studion 6.0.3 in Eclipse Luna and I seem to still get this ? Should I be setting a config property on export? Essentially if I export this directly from the preview view to docx it works okay, I can print with no warnings but as soon as I export through code (very basic codeJRDocxExporter docxExporter=new JRDocxExporter();docxExporter.setExporterInput(new SimpleExporterInput(jasperPrint));docxExporter.setExporterOutput(new SimpleOutputStreamExporterOutput(subReportPathName));docxExporter.exportReport();) It produces margins of 0, 0 , 0 , 0 in the docx and thus a print warning. My margins are currently 20 top, left and right and 38 bottom (this was needed to get it working in preview mode)Could really use some guidance if this has been fixed ?in case anyone sees this in future, I believe this does work but obviously you need to update the references in the POM (or whatever tool you use) to include the latest jar in your own application. Doh!)Thanks,Ben.
    Link to comment
    Share on other sites


×
×
  • Create New...