Print Page | Close Window

[SOLVED]Force changes

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3361
Printed Date: 22 Nov 24 at 12:57PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: [SOLVED]Force changes
Posted By: bitusonline
Subject: [SOLVED]Force changes
Date Posted: 25 Jul 16 at 3:49PM
Hi friends,

Is there any function to force the update of the changes?

Problem:

I need to merge two pages on one.
I use CapturePage and DrawCapturedPage to this.

This works only if i save an then load file again.

I suppose the changes should be applied before using CapturePage/DrawCapturedPage.


Example:

This dont Works:
1 - NewDocument (Create blank New_PDF)
2 - LoadFromFile(PDF_1) and CopyPageRanges to New_PDF(page1)
3 - LoadFromFile(PDF_2) and CopyPageRanges to New_PDF (page 2)
4 - SelectDocument(New_PDF)
5 - NormalizePage(1);
5 - CapturePage(Page2) form New_PDF and DrawCapturedPage in New_PDF(page1)
6 - SaveToFile(New_PDF)


This Works:
1 - NewDocument (Create blank New_PDF)
2 - LoadFromFile(PDF_1) and CopyPageRanges to New_PDF (page1)
3 - LoadFromFile(PDF_2) and CopyPageRanges to New_PDF (page2)
4 - SaveToFile/Stream(New_PDF)
5 - LoaFromFile/Stream(New_PDF)
6 - CapturePage(page2) form New_PDF and DrawCapturedPage in New_PDF (page1)
7 - SaveToFile(New_PDF)


EDIT: I found my mistake.

I assumed that SetOrigin and SetMeasurementUnits was global, however must be set for each document... Then, New Document are using different metrics.

Setting this after NewDocument  creation solved the problem.





Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk