Comments (4)
As work around you could cast PrintHelperFactoryImpl#createPrintHelper to (PrintHelperImpl). But to your point the print(java.awt.Graphics, java.awt.print.PageFormat, int) probably should be defined as abstract in the base class or the base class implements Printable as you suggested. I'll have to think about this a bit, at the moment it's not clear to me if one approach is better then the other.
Can you provide any more detail as to why you are calling print(java.awt.Graphics, java.awt.print.PageFormat, int) directly, I'm curious as this usually done by the DocPrintJob ?
from icepdf.
If I understand our spaghetti correctly: In "our" Printjob we put multiple printable things together (Plain-Text,Html, Graphics, and 1 or more pdfs . This gets done by passing the printgraphics around to each module/by using the Printable interface.
Using DocPrintJob seems like the better solution if all you want to do is printout the pdf document. However In our case the pdf is only part of a bigger printout.
from icepdf.
Thanks for the information. I think it would be best to have PrintHelper extend Printable so that you have a proper instance. I'll ready a PR for you to review.
from icepdf.
Merged fix
from icepdf.
Related Issues (20)
- file still open when call closeDocument HOT 5
- Allow copying TextMarkupAnnotation text HOT 1
- Fonts not embedded in PDFs HOT 1
- Specific symbols in annotation contents are escaped HOT 2
- Uniformize default popup size HOT 1
- Deleted annotation popup and glue components stick around HOT 1
- icepdf 7.1.4 release HOT 1
- Can't highlight text when highlight annotatoins are active HOT 1
- icepdf 7.2.0 release HOT 1
- Error display font HOT 9
- How to default select Text Selection Tool? HOT 2
- Allow for customization of icons used by provided Swing components HOT 4
- loadOrReadSystemFonts throughing exception on failure HOT 4
- Improvements to German translations.
- Pdf viewer in Javafx not propperly close, HOT 1
- Please try to add support for GraalVM native-image feature! HOT 2
- ICE-Pdf viewer can't be used with Java modular project! HOT 9
- PageText toString sometimes empty although getPageLines is not empty HOT 1
- Update delete all annotation icon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icepdf.