Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2020-12-26 07:50:08 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
284ebaabab1eb9455b897d44030da50fc7321fc8
284ebaab
1 parent
14026a6a
Add more parameters to PdfObject
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
17 additions
and
14 deletions
pdf/CHANGELOG.md
pdf/lib/src/annotation.dart
pdf/lib/src/catalog.dart
pdf/lib/src/encryption.dart
pdf/lib/src/font.dart
pdf/lib/src/font_descriptor.dart
pdf/lib/src/info.dart
pdf/lib/src/object.dart
pdf/lib/src/object_stream.dart
pdf/lib/src/page.dart
pdf/lib/src/page_list.dart
pdf/lib/src/signature.dart
pdf/CHANGELOG.md
View file @
284ebaa
...
...
@@ -5,6 +5,7 @@
-
A borderRadius can only be given for a uniform Border
-
Add LayoutWidgetBuilder
-
Add GridPaper widget
-
Improve internal sructure
## 1.13.0
...
...
pdf/lib/src/annotation.dart
View file @
284ebaa
...
...
@@ -33,7 +33,7 @@ import 'stream.dart';
class
PdfAnnot
extends
PdfObject
{
PdfAnnot
(
this
.
pdfPage
,
this
.
annot
)
:
assert
(
annot
!=
null
),
super
(
pdfPage
.
pdfDocument
,
'/Annot'
)
{
super
(
pdfPage
.
pdfDocument
,
type:
'/Annot'
)
{
pdfPage
.
annotations
.
add
(
this
);
}
...
...
pdf/lib/src/catalog.dart
View file @
284ebaa
...
...
@@ -33,7 +33,7 @@ class PdfCatalog extends PdfObject {
)
:
assert
(
pdfPageList
!=
null
),
assert
(
pageMode
!=
null
),
assert
(
names
!=
null
),
super
(
pdfDocument
,
'/Catalog'
);
super
(
pdfDocument
,
type:
'/Catalog'
);
/// The pages of the document
final
PdfPageList
pdfPageList
;
...
...
pdf/lib/src/encryption.dart
View file @
284ebaa
...
...
@@ -22,7 +22,7 @@ import 'object.dart';
/// Encryption object
abstract
class
PdfEncryption
extends
PdfObject
{
/// Creates an encryption object
PdfEncryption
(
PdfDocument
pdfDocument
)
:
super
(
pdfDocument
,
null
);
PdfEncryption
(
PdfDocument
pdfDocument
)
:
super
(
pdfDocument
);
/// Encrypt some data
Uint8List
encrypt
(
Uint8List
input
,
PdfObject
object
);
...
...
pdf/lib/src/font.dart
View file @
284ebaa
...
...
@@ -34,7 +34,7 @@ abstract class PdfFont extends PdfObject {
/// font name to that in Pdf, defaulting to Helvetica if not possible.
PdfFont
.
create
(
PdfDocument
pdfDocument
,
{
@required
this
.
subtype
})
:
assert
(
subtype
!=
null
),
super
(
pdfDocument
,
'/Font'
)
{
super
(
pdfDocument
,
type:
'/Font'
)
{
pdfDocument
.
fonts
.
add
(
this
);
}
...
...
pdf/lib/src/font_descriptor.dart
View file @
284ebaa
...
...
@@ -27,7 +27,7 @@ class PdfFontDescriptor extends PdfObject {
this
.
file
,
)
:
assert
(
ttfFont
!=
null
),
assert
(
file
!=
null
),
super
(
ttfFont
.
pdfDocument
,
'/FontDescriptor'
);
super
(
ttfFont
.
pdfDocument
,
type:
'/FontDescriptor'
);
/// File data
final
PdfObjectStream
file
;
...
...
pdf/lib/src/info.dart
View file @
284ebaa
...
...
@@ -28,7 +28,7 @@ class PdfInfo extends PdfObject {
this
.
subject
,
this
.
keywords
,
this
.
producer
})
:
super
(
pdfDocument
,
null
)
{
:
super
(
pdfDocument
)
{
if
(
author
!=
null
)
{
params
[
'/Author'
]
=
PdfSecString
.
fromString
(
this
,
author
);
}
...
...
pdf/lib/src/object.dart
View file @
284ebaa
...
...
@@ -25,10 +25,12 @@ class PdfObject {
/// This is usually called by extensors to this class, and sets the
/// Pdf Object Type
PdfObject
(
this
.
pdfDocument
,
[
this
.
pdfDocument
,
{
String
type
,
])
:
assert
(
pdfDocument
!=
null
),
objser
=
pdfDocument
.
genSerial
()
{
this
.
objgen
=
0
,
int
objser
,
})
:
assert
(
pdfDocument
!=
null
),
objser
=
objser
??
pdfDocument
.
genSerial
()
{
if
(
type
!=
null
)
{
params
[
'/Type'
]
=
PdfName
(
type
);
}
...
...
@@ -43,7 +45,7 @@ class PdfObject {
final
int
objser
;
/// This is the generation number for this object.
final
int
objgen
=
0
;
final
int
objgen
;
/// This allows any Pdf object to refer to the document being constructed.
final
PdfDocument
pdfDocument
;
...
...
pdf/lib/src/object_stream.dart
View file @
284ebaa
...
...
@@ -29,7 +29,7 @@ class PdfObjectStream extends PdfObject {
PdfDocument
pdfDocument
,
{
String
type
,
this
.
isBinary
=
false
,
})
:
super
(
pdfDocument
,
type
);
})
:
super
(
pdfDocument
,
type
:
type
);
/// This holds the stream's content.
final
PdfStream
buf
=
PdfStream
();
...
...
pdf/lib/src/page.dart
View file @
284ebaa
...
...
@@ -28,7 +28,7 @@ class PdfPage extends PdfObject with PdfGraphicStream {
/// This constructs a Page object, which will hold any contents for this
/// page.
PdfPage
(
PdfDocument
pdfDocument
,
{
this
.
pageFormat
=
PdfPageFormat
.
standard
})
:
super
(
pdfDocument
,
'/Page'
)
{
:
super
(
pdfDocument
,
type:
'/Page'
)
{
pdfDocument
.
pdfPageList
.
pages
.
add
(
this
);
}
...
...
pdf/lib/src/page_list.dart
View file @
284ebaa
...
...
@@ -22,7 +22,7 @@ import 'page.dart';
/// PdfPageList object
class
PdfPageList
extends
PdfObject
{
/// This constructs a [PdfPageList] object.
PdfPageList
(
PdfDocument
pdfDocument
)
:
super
(
pdfDocument
,
'/Pages'
);
PdfPageList
(
PdfDocument
pdfDocument
)
:
super
(
pdfDocument
,
type:
'/Pages'
);
/// This holds the pages
final
List
<
PdfPage
>
pages
=
<
PdfPage
>[];
...
...
pdf/lib/src/signature.dart
View file @
284ebaa
...
...
@@ -30,7 +30,7 @@ class PdfSignature extends PdfObject {
Set
<
PdfSigFlags
>
flags
,
})
:
assert
(
crypto
!=
null
),
flags
=
flags
??
const
<
PdfSigFlags
>{
PdfSigFlags
.
signaturesExist
},
super
(
pdfDocument
,
'/Sig'
);
super
(
pdfDocument
,
type:
'/Sig'
);
final
Set
<
PdfSigFlags
>
flags
;
...
...
Please
register
or
login
to post a comment