We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

PDF Size

Thread ID:

Created:

Updated:

Platform:

Replies:

97974 Jan 21,2011 11:26 AM Jan 26,2011 12:10 AM Windows Forms 4
loading
Tags: PDF
Enrica EANDI
Asked On January 21, 2011 11:26 AM

Hi,

i've created a PdfDocument and inserted in it many pages and many objects.

So i have created a second PdfDocument and the goal is to insert the same pages of the first PdfDocument. I've iterated the pages of the first PdfDocument, call the method CreateTemplate for every page and than draw the template in the second PdfDocument.

After all I saved the two PdfDocument on disk.

The result is that the second Pdf is larger than first...why?


regards,
Stefano


Priyadharshini J [Syncfusion]
Replied On January 24, 2011 04:45 AM

Hi Stefano,

Thank you for the details.

We could see the issue and this is due to the reason, all created pdf documents will have their own contents, here the contents of a pdf document is made as resources for another pdf document by creating a template. Hence along with the contents already present the resources added from the first document makes the second pdf document larger in size.

I have placed a sample for the same in the location below:
Forum979741883757016.zip

Kindly try this and let us know if you have any queries.

Regards,
Priyadharshini.



Enrica EANDI
Replied On January 25, 2011 03:06 AM

Hi Priyadharshini,

Thank you for your reply.

I've understand what you said but how can i resolve my problem? Have you any ideas?

I need to copy pages from a PdfDocument to another and I need that it is fast and the file size is very similar to the source. It is possible? What is the best mode? Using ImportPageRange method in PdfDocument (is it better than CreateTemplate?) ?


Thanks.

Regards,
Stefano


Enrica EANDI
Replied On January 25, 2011 04:09 AM

Hi Priyadharshini,

i tried to use ImportPageRange but the result is very similar: the file size is larger.



Regards,
Stefano


Selvakumar P [Syncfusion]
Replied On January 26, 2011 12:10 AM

Hi Stefano,

Thanks for the update.

Both the template creation and the ImportPageRange method does the function of copying contents from one document to another document.
While copying contents, we do a lot of transformations with graphical objects such as text, images etc... This makes the second document slightly larger than the first document.

Regards,
Selvakumar.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;