This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 205953

Summary: BaseDocument.print uses DrawEngine
Product: editor Reporter: emi <emi>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 205707, 202230    
Bug Blocks:    

Description emi 2011-12-05 16:11:03 UTC
BaseDocument.print(PrintContainer) still exists but uses the old DrawEngine (and on my unit test, it crashes).

Will that be migrated to PrintUtils or something from the View API?

I see that HtmlPrintContainer has addLines(List<AttributedCharacterIterator>) but that's not part of the PrintContainer signature. Shouldn't addLines() be moved into some AbstractPrintContainer so it can be reused by other PrintContainer-s?

I would need it, for example, to produce RTF output via a custom PrintContainer implementation.

I have a patch which just created a static HtmlPrintContainer.newAddLines(PrintContainer pc, Font defaultFont, Color defaultColor, Color defaultBackgroundColor, List<AttributedCharacterIterator> lines) method out of the original addLines(List<AttributedCharacterIterator> lines) method. This way I am still able to use the other PrintContainer, but it's just a workaround.
Comment 1 David Strupl 2012-11-06 15:18:42 UTC
Should this still be kept opened?
Comment 2 Martin Balin 2016-07-07 07:26:31 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss