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
2022-04-13 08:57:19 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
28a1520549ec7bc0cc454bbaad59007dcdc963ad
28a15205
1 parent
d226704b
Preliminary support for compressed objects
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
pdf/lib/src/pdf/xref.dart
pdf/lib/src/pdf/xref.dart
View file @
28a1520
...
...
@@ -20,7 +20,7 @@ import 'data_types.dart';
import
'obj/object.dart'
;
import
'stream.dart'
;
enum
PdfCrossRefEntryType
{
free
,
inUse
}
enum
PdfCrossRefEntryType
{
free
,
inUse
,
compressed
}
/// Cross-reference for a Pdf Object
class
PdfXref
{
...
...
@@ -29,6 +29,7 @@ class PdfXref {
this
.
id
,
this
.
offset
,
{
this
.
generation
=
0
,
this
.
object
,
this
.
type
=
PdfCrossRefEntryType
.
inUse
,
});
...
...
@@ -38,6 +39,9 @@ class PdfXref {
/// The offset within the Pdf file
final
int
offset
;
/// The object ID containing this compressed object
final
int
?
object
;
/// The generation of the object, usually 0
final
int
generation
;
...
...
@@ -51,6 +55,8 @@ class PdfXref {
(
type
==
PdfCrossRefEntryType
.
inUse
?
' n '
:
' f '
);
}
PdfIndirect
?
get
container
=>
object
==
null
?
null
:
PdfIndirect
(
object
!,
0
);
/// The xref in the format of the compressed xref section in the Pdf file
int
cref
(
ByteData
o
,
int
ofs
,
List
<
int
>
w
)
{
assert
(
w
.
length
>=
3
);
...
...
Please
register
or
login
to post a comment