Skip to content

Commit 394bf7c

Browse files
authored
Merge pull request #870 from veecue/allow-convert-from-pdf
allow conversion from PDF to PDF
2 parents e659884 + 25285a6 commit 394bf7c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

docs/document.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ For details on **embedded files** refer to Appendix 3.
625625

626626
.. method:: convertToPDF(from_page=-1, to_page=-1, rotate=0)
627627

628-
Create a PDF version of the current document and write it to memory. **All document types** (except PDF) are supported. The parameters have the same meaning as in :meth:`insert_pdf`. In essence, you can restrict the conversion to a page subset, specify page rotation, and revert page sequence.
628+
Create a PDF version of the current document and write it to memory. **All document types** are supported. The parameters have the same meaning as in :meth:`insert_pdf`. In essence, you can restrict the conversion to a page subset, specify page rotation, and revert page sequence.
629629

630630
:arg int from_page: first page to copy (0-based). Default is first page.
631631

fitz/fitz.i

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,6 @@ struct Document
11241124
fz_document *fz_doc = (fz_document *) $self;
11251125
fz_try(gctx) {
11261126
int fp = from_page, tp = to_page, srcCount = fz_count_pages(gctx, fz_doc);
1127-
if (pdf_specifics(gctx, fz_doc))
1128-
THROWMSG(gctx, "bad document type");
11291127
if (fp < 0) fp = 0;
11301128
if (fp > srcCount - 1) fp = srcCount - 1;
11311129
if (tp < 0) tp = srcCount - 1;

0 commit comments

Comments
 (0)