Comments (10)
Ah, I can upload it by drag'n'drop. Here it is.
from pdfcpu.
There are a lot of things that can go wrong just during the initial process of detecting xref sections, xref streams and such, because PDFWriters mess up. That's why.
from pdfcpu.
This is fixed with the latest commit!
from pdfcpu.
Hell... I figured it out. The PDF needs to have a minimum size of 512 byte to get recognized by pdfcpu!
%PDF-1.0
%äöüß
1 0 obj
<<
/Type
/Catalog
/Pages 2 0 R
>>
endobj
2 0 obj
<<
/Type
/Pages
/Count 1
/Kids [ 3 0 R ]
/MediaBox [ 0 0 5 5 ]
>>
endobj
3 0 obj
<<
/Type
/Page
/Parent 2 0 R
>>
endobj
xref
0 4
0000000000 65535 f
0000000016 00000 n
0000000078 00000 n
0000000180 00000 n
trailer
<<
/Root 1 0 R
/Size 4
>>
%We need padding to reach a minimum filesize of 512 bytes.
%We need padding to reach a minimum filesize of 512 bytes.
startxref
240
%%EOF
from pdfcpu.
Can you do me a favor and share this file for analysis?
Thank you!
from pdfcpu.
Can you do me a favor and share this file for analysis?
Hm? I did. Just copy the code into a file and save it as PDF.
However, the error would have to be renamed. The problem was not my PDF, but that the minimum size in pdfcpu must be 512 bytes - as far as I know, this does not have to be the case.
from pdfcpu.
Nope that's not really how it works.
Many times the issue is how the file was saved, specific offsets and such,
A real file needs to be the starting point for analysis.
from pdfcpu.
Nope that's not really how it works.
Interesting view. This is the first time I've heard that someone prefers a binary file
Many times the issue is how the file was saved, specific offsets and such,
I've been working with handcrafted PDFs for many years and never ran into such issues. But okay...
from pdfcpu.
This is fixed with the latest commit!
Thank you! I'll test it later. The error totally confused me because I couldn't find anywhere that the PDF file had to have at least 512 bytes and all other interpreters could handle it :-)
from pdfcpu.
Well, thx for discovering this!
from pdfcpu.
Related Issues (20)
- US Letter has incorrect size HOT 2
- `pdfcpu images list` command can not get output HOT 1
- Api: merge pdf error HOT 2
- import images default command and help info mistake HOT 2
- runtime error: index out of range [0] with length 0 HOT 8
- pdfcpu info does not show author attribute
- Invalid reference in stream "Length" causes endless parsing
- Disable centered content when resize page. HOT 1
- Dereference error with a particular (corrupt?) PDF HOT 1
- api: Form fill fails with forms produced with Adobe Acrobat HOT 5
- Bookmark export does not list/export single first-level bookmark HOT 3
- api.PageCount Fails on PDF/A Compliant PDFs HOT 2
- Transparency level when using API HOT 1
- addPageWatermark: ctx.PageDict(pageNr, consolidateRes) returns no error, but nil dictionary HOT 1
- Stack overflow when optimize pdf using API HOT 3
- CLI: Add recursive functionality to the validate feature HOT 1
- CLI: Add an option to only list files that failed validation HOT 1
- support for windows 7 HOT 1
- Panic on image extract HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfcpu.