Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(577)

Issue 4240050: [PDF] Restrict scalars to the range that PDF understands. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by Steve VanDeBogart
Modified:
13 years, 8 months ago
Reviewers:
Chris Guillory, reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

[PDF] Restrict scalars to the range that PDF understands. * Add a config flag to ignore the restrictions * Apply restriction to both SkPDFScalar and scalars used in content streams. * +/- 32,767 for the integer part. * +/1 1/65536 for the fraction part. Committed: http://code.google.com/p/skia/source/detail?r=882

Patch Set 1 #

Patch Set 2 : Add escape flag. #

Total comments: 5

Patch Set 3 : Address Comments. #

Patch Set 4 : Account for all uses of sclars in pdf code. #

Patch Set 5 : Rebase #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -27 lines) Patch
M include/config/SkUserConfig.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M include/pdf/SkPDFTypes.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 2 3 7 chunks +26 lines, -26 lines 0 comments Download
M src/pdf/SkPDFTypes.cpp View 1 2 3 2 chunks +64 lines, -1 line 7 comments Download
M tests/PDFPrimitivesTest.cpp View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 19
Steve VanDeBogart
13 years, 9 months ago (2011-02-26 21:24:13 UTC) #1
reed1
http://www.thbimage.com/pdf/PDF_real_numbers_out_of_range_24080da6_8650_4ff4_9069_ffbb0fc8c2.html My read is that modern PS readers support large floats, so perhaps we don't ...
13 years, 9 months ago (2011-02-28 13:55:53 UTC) #2
Steve VanDeBogart
On 2011/02/28 13:55:53, reed1 wrote: > http://www.thbimage.com/pdf/PDF_real_numbers_out_of_range_24080da6_8650_4ff4_9069_ffbb0fc8c2.html > > My read is that modern PS ...
13 years, 9 months ago (2011-02-28 17:56:38 UTC) #3
reed1
Then can we consider a build-time or runtime flag. If we are compliant, but can't ...
13 years, 9 months ago (2011-02-28 17:59:35 UTC) #4
Steve VanDeBogart
http://codereview.appspot.com/4240050/diff/5/src/core/SkString.cpp File src/core/SkString.cpp (left): http://codereview.appspot.com/4240050/diff/5/src/core/SkString.cpp#oldcode142 src/core/SkString.cpp:142: return string + SNPRINTF(string, SkStrAppendScalar_MaxSize, "%g", value); %g is ...
13 years, 9 months ago (2011-03-01 00:02:41 UTC) #5
reed1
http://codereview.appspot.com/4240050/diff/5/include/config/SkUserConfig.h File include/config/SkUserConfig.h (right): http://codereview.appspot.com/4240050/diff/5/include/config/SkUserConfig.h#newcode129 include/config/SkUserConfig.h:129: //#define SK_ALLOW_LARGE_PDF_SCALARS Nice! http://codereview.appspot.com/4240050/diff/5/src/core/SkString.cpp File src/core/SkString.cpp (left): http://codereview.appspot.com/4240050/diff/5/src/core/SkString.cpp#oldcode142 src/core/SkString.cpp:142: ...
13 years, 9 months ago (2011-03-01 17:49:57 UTC) #6
Steve VanDeBogart
http://codereview.appspot.com/4240050/diff/5/src/pdf/SkPDFTypes.cpp File src/pdf/SkPDFTypes.cpp (right): http://codereview.appspot.com/4240050/diff/5/src/pdf/SkPDFTypes.cpp#newcode101 src/pdf/SkPDFTypes.cpp:101: if (fValue > 32767 || fValue < -32767) { ...
13 years, 9 months ago (2011-03-01 22:04:55 UTC) #7
Steve VanDeBogart
So there were two problems with the previous patch set, PDF doesn't understand scientific notation ...
13 years, 9 months ago (2011-03-03 00:06:09 UTC) #8
reed1
I'm fine with the changes to SkString.[h,cpp]. Perhaps we can check those in separately (first).
13 years, 8 months ago (2011-03-03 12:33:05 UTC) #9
Steve VanDeBogart
On 2011/03/03 12:33:05, reed1 wrote: > I'm fine with the changes to SkString.[h,cpp]. Perhaps we ...
13 years, 8 months ago (2011-03-03 18:23:09 UTC) #10
reed1
No, other than I didn't realize we couldn't use scientific notation inside pdf. Is there ...
13 years, 8 months ago (2011-03-03 18:31:25 UTC) #11
Steve VanDeBogart
On 2011/03/03 18:31:25, reed1 wrote: > No, other than I didn't realize we couldn't use ...
13 years, 8 months ago (2011-03-03 18:42:56 UTC) #12
reed1
OK. I tried making some PDFs on the mac with fractional values, and I just ...
13 years, 8 months ago (2011-03-03 18:46:12 UTC) #13
Steve VanDeBogart
Happy to look at the output. On Thu, Mar 3, 2011 at 10:45 AM, Mike ...
13 years, 8 months ago (2011-03-03 18:49:43 UTC) #14
Chris Guillory
http://codereview.appspot.com/4240050/diff/6/src/pdf/SkPDFTypes.cpp File src/pdf/SkPDFTypes.cpp (right): http://codereview.appspot.com/4240050/diff/6/src/pdf/SkPDFTypes.cpp#newcode118 src/pdf/SkPDFTypes.cpp:118: #endif // SK_SCALAR_IS_FIXED Can we make this an #else ...
13 years, 8 months ago (2011-03-03 19:19:20 UTC) #15
Steve VanDeBogart
http://codereview.appspot.com/4240050/diff/6/src/pdf/SkPDFTypes.cpp File src/pdf/SkPDFTypes.cpp (right): http://codereview.appspot.com/4240050/diff/6/src/pdf/SkPDFTypes.cpp#newcode118 src/pdf/SkPDFTypes.cpp:118: #endif // SK_SCALAR_IS_FIXED On 2011/03/03 19:19:20, Chris Guillory wrote: ...
13 years, 8 months ago (2011-03-03 19:35:36 UTC) #16
Chris Guillory
On 2011/03/03 19:35:36, Steve VanDeBogart wrote: > http://codereview.appspot.com/4240050/diff/6/src/pdf/SkPDFTypes.cpp > File src/pdf/SkPDFTypes.cpp (right): > > http://codereview.appspot.com/4240050/diff/6/src/pdf/SkPDFTypes.cpp#newcode118 ...
13 years, 8 months ago (2011-03-03 20:17:12 UTC) #17
reed1
I vote to not add more APIs to SkString just yet.
13 years, 8 months ago (2011-03-03 20:37:24 UTC) #18
Chris Guillory
13 years, 8 months ago (2011-03-03 21:13:27 UTC) #19
LGTM.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b