summaryrefslogtreecommitdiff
path: root/tikzit/src/osx/PreviewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src/osx/PreviewController.m')
-rw-r--r--tikzit/src/osx/PreviewController.m3
1 files changed, 1 insertions, 2 deletions
diff --git a/tikzit/src/osx/PreviewController.m b/tikzit/src/osx/PreviewController.m
index 94a80a4..310c2ab 100644
--- a/tikzit/src/osx/PreviewController.m
+++ b/tikzit/src/osx/PreviewController.m
@@ -109,8 +109,7 @@ static PreviewController *preview = nil;
[errorText setString:@""];
[errorTextView setHidden:YES];
- data = [NSData dataWithContentsOfFile:pdfFile];
- PDFDocument *doc = [[PDFDocument alloc] initWithData:data];
+ PDFDocument *doc = [[PDFDocument alloc] initWithURL:[[NSURL alloc] initFileURLWithPath:pdfFile]];
// pad the PDF by a couple of pixels
if ([doc pageCount] >= 1) {