├── .gitignore ├── PulasJs ├── example │ └── full.html ├── gulpfile.js └── pulas.js ├── PulasQt ├── Pulas.ico ├── Pulas.pro ├── Pulas.qrc ├── Pulas.rc ├── client.cpp ├── client.h ├── clientmanager.cpp ├── clientmanager.h ├── constant.h ├── images │ └── icon.png ├── main.cpp ├── maindialog.cpp ├── maindialog.h ├── maindialog.ui ├── pdf.cpp ├── pdf.h ├── printer.cpp └── printer.h ├── README.md └── external_libs └── poppler ├── include └── poppler │ └── qt5 │ ├── poppler-annotation.h │ ├── poppler-export.h │ ├── poppler-form.h │ ├── poppler-link.h │ ├── poppler-media.h │ ├── poppler-optcontent.h │ ├── poppler-page-transition.h │ └── poppler-qt5.h └── lib ├── libpoppler-qt5.dll └── libpoppler.dll /.gitignore: -------------------------------------------------------------------------------- 1 | PulasJs/node_modules/ 2 | PulasQt/Pulas.pro.* 3 | build-Pulas* 4 | -------------------------------------------------------------------------------- /PulasJs/example/full.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |-
28 |-(rendering_rotation + page_orientation)
. The rotation pivot
149 | * is the top-left corner of the boundary rectangle.
150 | *
151 | * In practice, %Poppler's \ref Page::renderToImage only "unrotates" the
152 | * page orientation, and does not unrotate the rendering rotation.
153 | * This ensures consistent renderings at different Page::Rotation values:
154 | * annotations are always positioned as if they were being positioned at the
155 | * default page orientation.
156 | *
157 | * Just like regular annotations, %Poppler Qt4 exposes normalized coordinates
158 | * relative to the page's default orientation. However, behind the scenes, the
159 | * coordinate system is different and %Poppler transparently transforms each
160 | * shape. If you never call either Annotation::setFlags or
161 | * Annotation::setBoundary, you don't need to worry about this; but if you do
162 | * call them, then you need to adhere to the following rules:
163 | * - Whenever you toggle the Annotation::FixedRotation flag, you must
164 | * set again the boundary rectangle first, and then you must set
165 | * again any other geometry-related property.
166 | * - Whenever you modify the boundary rectangle of an annotation whose
167 | * Annotation::FixedRotation flag is set, you must set again any other
168 | * geometry-related property.
169 | *
170 | * These two rules are necessary to make %Poppler's transparent coordinate
171 | * conversion work properly.
172 | */
173 | class POPPLER_QT5_EXPORT Annotation
174 | {
175 | friend class AnnotationUtils;
176 | friend class LinkMovie;
177 | friend class LinkRendition;
178 |
179 | public:
180 | // enum definitions
181 | /**
182 | * Annotation subclasses
183 | *
184 | * \sa subType()
185 | */
186 | // WARNING!!! oKular uses that very same values so if you change them notify the author!
187 | enum SubType
188 | {
189 | AText = 1, ///< TextAnnotation
190 | ALine = 2, ///< LineAnnotation
191 | AGeom = 3, ///< GeomAnnotation
192 | AHighlight = 4, ///< HighlightAnnotation
193 | AStamp = 5, ///< StampAnnotation
194 | AInk = 6, ///< InkAnnotation
195 | ALink = 7, ///< LinkAnnotation
196 | ACaret = 8, ///< CaretAnnotation
197 | AFileAttachment = 9, ///< FileAttachmentAnnotation
198 | ASound = 10, ///< SoundAnnotation
199 | AMovie = 11, ///< MovieAnnotation
200 | AScreen = 12, ///< ScreenAnnotation \since 0.20
201 | AWidget = 13, ///< WidgetAnnotation \since 0.22
202 | ARichMedia = 14, ///< RichMediaAnnotation \since 0.36
203 | A_BASE = 0
204 | };
205 |
206 | /**
207 | * Annotation flags
208 | *
209 | * They can be OR'd together (e.g. Annotation::FixedRotation | Annotation::DenyPrint).
210 | *
211 | * \sa flags(), setFlags(int)
212 | */
213 | // NOTE: Only flags that are known to work are documented
214 | enum Flag
215 | {
216 | Hidden = 1, ///< Do not display or print the annotation
217 | FixedSize = 2,
218 | FixedRotation = 4, ///< Do not rotate the annotation according to page orientation and rendering rotation \warning Extra care is needed with this flag: see \ref annotFixedRotation
219 | DenyPrint = 8, ///< Do not print the annotation
220 | DenyWrite = 16,
221 | DenyDelete = 32,
222 | ToggleHidingOnMouse = 64,
223 | External = 128
224 | };
225 |
226 | enum LineStyle { Solid = 1, Dashed = 2, Beveled = 4, Inset = 8, Underline = 16 };
227 | enum LineEffect { NoEffect = 1, Cloudy = 2};
228 | enum RevScope { Root = 0 /** \since 0.20 */, Reply = 1, Group = 2, Delete = 4 };
229 | enum RevType { None = 1, Marked = 2, Unmarked = 4, Accepted = 8, Rejected = 16, Cancelled = 32, Completed = 64 };
230 |
231 | /**
232 | * Returns the author of the annotation.
233 | */
234 | QString author() const;
235 | /**
236 | * Sets a new author for the annotation.
237 | */
238 | void setAuthor( const QString &author );
239 |
240 | QString contents() const;
241 | void setContents( const QString &contents );
242 |
243 | /**
244 | * Returns the unique name (ID) of the annotation.
245 | */
246 | QString uniqueName() const;
247 | /**
248 | * Sets a new unique name for the annotation.
249 | *
250 | * \note no check of the new uniqueName is done
251 | */
252 | void setUniqueName( const QString &uniqueName );
253 |
254 | QDateTime modificationDate() const;
255 | void setModificationDate( const QDateTime &date );
256 |
257 | QDateTime creationDate() const;
258 | void setCreationDate( const QDateTime &date );
259 |
260 | /**
261 | * Returns this annotation's flags
262 | *
263 | * \sa Flag, setFlags(int)
264 | */
265 | int flags() const;
266 | /**
267 | * Sets this annotation's flags
268 | *
269 | * \sa Flag, flags(), \ref annotFixedRotation
270 | */
271 | void setFlags( int flags );
272 |
273 | /**
274 | * Returns this annotation's boundary rectangle in normalized coordinates
275 | *
276 | * \sa setBoundary(const QRectF&)
277 | */
278 | QRectF boundary() const;
279 | /**
280 | * Sets this annotation's boundary rectangle
281 | *
282 | * The boundary rectangle is the smallest rectangle that contains the
283 | * annotation.
284 | *
285 | * \warning This property is mandatory: you must always set this.
286 | *
287 | * \sa boundary(), \ref annotFixedRotation
288 | */
289 | void setBoundary( const QRectF &boundary );
290 |
291 | /**
292 | * \short Container class for Annotation style information
293 | *
294 | * \since 0.20
295 | */
296 | class POPPLER_QT5_EXPORT Style
297 | {
298 | public:
299 | Style();
300 | Style( const Style &other );
301 | Style& operator=( const Style &other );
302 | ~Style();
303 |
304 | // appearance properties
305 | QColor color() const; // black
306 | void setColor(const QColor &color);
307 | double opacity() const; // 1.0
308 | void setOpacity(double opacity);
309 |
310 | // pen properties
311 | double width() const; // 1.0
312 | void setWidth(double width);
313 | LineStyle lineStyle() const; // LineStyle::Solid
314 | void setLineStyle(LineStyle style);
315 | double xCorners() const; // 0.0
316 | void setXCorners(double radius);
317 | double yCorners() const; // 0.0
318 | void setYCorners(double radius);
319 | const QVector