473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Remove x chars from end of binary?

Hello,

I've merged two PDF files but only one shows up. I think that I just need
to remove the %%EOF from the end of the first file.

How can I do that?

Thanks!

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Get freeware, learn things, make money.
http://www.vbmark.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nov 17 '05 #1
3 1160
vbMark <no@email.com> wrote:
I've merged two PDF files but only one shows up. I think that I just need
to remove the %%EOF from the end of the first file.

How can I do that?


You need to sort out whether they're binary files or text files - if
they're binary files, you need to think in terms of bytes rather than
characters.

If this is related to your question about appending files, the easiest
thing to do would be to decrement the Position of the writing stream by
5 before you start writing anything.

However, I *suspect* that there's rather more to the PDF format than
that. There are very few file formats which allow you to merge two
files just by copying one after another.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2
Jon Skeet [C# MVP] <sk***@pobox.com> wrote in
news:MP************************@msnews.microsoft.c om:
vbMark <no@email.com> wrote:
I've merged two PDF files but only one shows up. I think that I just
need to remove the %%EOF from the end of the first file.

How can I do that?


You need to sort out whether they're binary files or text files - if
they're binary files, you need to think in terms of bytes rather than
characters.

If this is related to your question about appending files, the easiest
thing to do would be to decrement the Position of the writing stream
by 5 before you start writing anything.

However, I *suspect* that there's rather more to the PDF format than
that. There are very few file formats which allow you to merge two
files just by copying one after another.


Yes, I agree. I've decided to go with a third-party solution.

Thank you.

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Get freeware, learn things, make money.
http://www.vbmark.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nov 17 '05 #3
Jon Skeet [C# MVP] <sk***@pobox.com> wrote in
news:MP************************@msnews.microsoft.c om:
vbMark <no@email.com> wrote:
I've merged two PDF files but only one shows up. I think that I just
need to remove the %%EOF from the end of the first file.

How can I do that?


You need to sort out whether they're binary files or text files - if
they're binary files, you need to think in terms of bytes rather than
characters.

If this is related to your question about appending files, the easiest
thing to do would be to decrement the Position of the writing stream
by 5 before you start writing anything.

However, I *suspect* that there's rather more to the PDF format than
that. There are very few file formats which allow you to merge two
files just by copying one after another.


Yes, I agree. I've decided to go with a third-party solution.

Thank you.

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Get freeware, learn things, make money.
http://www.vbmark.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: chris | last post by:
is there a quick and easy way to check a string for non numeric characters ? i have thought of making a routine to check each character to confirm it is 0 - 9 but was wondering if there was a...
5
by: Bob Smith | last post by:
Hello all, I have a question and I am not sure how I should go about doing it. I have two unsigned chars and one int. I want to copy both chars to the int. for example if char a was represented...
8
by: Nick | last post by:
Hi ! I want to load an old Pascal-Dos-File where records stand in. When i view the file in a HEX-Editor it's clear how to acces these Strings and chars in that file. Since these are old 8BIT...
9
by: spike | last post by:
I use this code to read number of characters from a file. The problem is: It only returns about 1500 chars. If i open the file in a text editor it contains almoust 3 million rows. Sure it must...
9
by: Durgesh Sharma | last post by:
Hi All, Pleas help me .I am a starter as far as C Language is concerned . How can i Right Trim all the white spaces of a very long (2000 chars) Charecter string ( from the Right Side ) ? or how...
44
by: Kosio | last post by:
-Hello, I'm looking for a way to deconstruct a (32 bit) float value to four (8 bit) char values. I then need a way to take those four (8 bit) char values and construct a (32 bit) float value. ...
1
by: vbMark | last post by:
Hello, I've merged two PDF files but only one shows up. I think that I just need to remove the %%EOF from the end of the first file. How can I do that? Thanks! --
8
by: abhi147 | last post by:
Hi , I have been trying to convert a 32 bit string like "b2a4fdf15af7c4f215e1909be4707bdb" to convert to a string of special chars like "²¤ýñZ÷Äòá?›äp{Û" I have tried a lot of things .. but...
10
by: Mike Copeland | last post by:
I have data I need to normalize - it's "name" data. For example, I have the following: "Watts, J.C." I wish to (1) parse the "first name" ("J.C.") and adjust it to "JC". Essentially, I want to...
26
by: Brad | last post by:
I'm writing a function to remove certain characters from strings. For example, I often get strings with commas... they look like this: "12,384" I'd like to take that string, remove the comma...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.