I'm creating a Web-based label printing system. For every label, there should be a unique s/n. So when a user decided to create 1000 labels (with the same data), all of it should have unique s/n, therefore the pdf will have 1000 pages, which increases the file size.

My problem is when the user decided to create more copies, the file size will get bigger.

Is there any way that I can reduce the file size of the pdf using Itext? Or is there any way that I can generated the pdf and output it in the browser without saving it neither to server/client's HDD?

Thanks for the help!

Member Avatar for hfx642

Ideas for you to ponder...

1. Limit the number of labels that the user can generate.

2. How big are the labels? Can you create multiple labels per page?

3. If it's the same data on each label, just generate one (page of) label(s),
and tell the user to print multiple pages of the same page.
Of course, if you are also printing the s/n on each label
(meaning the data is NOT the same on each label),
this solution will not work as intended.

I wonder did you mean you want to compress the PDF file or just want to customize its size? Why not google it and select a fine [PDF processor]<URL SNIPPED> whose way of processing is simple and fast to help you with the related work. Remember to check its free trial package first if possible. I hope you success. Good luck.

Best regards,

@arronlee you just bumped 2 years old thread, with C# link to comercial product. I would not recommend to do it again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.